Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Optional NFT Royalties #34

Merged
merged 34 commits into from
Sep 6, 2023
Merged
Show file tree
Hide file tree
Changes from 18 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
2bb0316
Add INFTCollectionWithRoyalty
h0ngcha0 Aug 17, 2023
83211ca
Restructure the source code
h0ngcha0 Aug 17, 2023
3518146
Implement simple royalty
h0ngcha0 Aug 17, 2023
a717e5a
Add basic logic for Royalty
h0ngcha0 Aug 18, 2023
ade603f
Remove collectionId from NFTListing; Fix tests
h0ngcha0 Aug 18, 2023
7114f27
Improve nft-collection.test.ts
h0ngcha0 Aug 18, 2023
06a546d
Restructure tests
h0ngcha0 Aug 18, 2023
28082aa
Test nft open collection with royalty
h0ngcha0 Aug 19, 2023
d22d0d7
Improve nft-public-sale-collection-random.test.ts
h0ngcha0 Aug 19, 2023
3865be1
Improve nft-public-sale-collection-sequential.test.ts
h0ngcha0 Aug 20, 2023
7cb8ba1
Test royalty for random public sales collection
h0ngcha0 Aug 20, 2023
34194a3
Test royalty for sequential public sales collection
h0ngcha0 Aug 20, 2023
d64191e
Restructure NFTCollectionHelper
h0ngcha0 Aug 20, 2023
64ecf69
Test open collection with royalty in marketplace
h0ngcha0 Aug 21, 2023
348db11
Test royalty for open collection in marketplace
h0ngcha0 Aug 21, 2023
52cc295
Test royalty for public sale open collection in marketplace
h0ngcha0 Aug 21, 2023
20451de
Test royalty for public sale seqential collection in marketplace
h0ngcha0 Aug 21, 2023
f225025
Support optional royalty in UI
h0ngcha0 Aug 21, 2023
08701b9
Improve NFTListing.buy
h0ngcha0 Aug 24, 2023
24e14dc
Merge branch 'master' into nft-royalties
h0ngcha0 Aug 24, 2023
d994d92
Update alephium full node version
h0ngcha0 Aug 24, 2023
3989199
Show royalty fee when listing NFT
h0ngcha0 Aug 24, 2023
9a2f3a7
Display royalty rate for NFT
h0ngcha0 Aug 24, 2023
73cabfd
set ignoreUnusedConstantsWarnings to false
h0ngcha0 Aug 24, 2023
46730d5
Update explorer-backend version
h0ngcha0 Aug 27, 2023
ee1e6a5
Upgrade to SDK 0.18.3, use INFTCollectionWithRoyalty interface from SDK
h0ngcha0 Aug 28, 2023
d50b708
Fix review comments
h0ngcha0 Aug 28, 2023
218fdf5
Remove collectionId from NFT contract
h0ngcha0 Aug 29, 2023
97f54ac
Set correct collection id
h0ngcha0 Aug 29, 2023
e4901f4
Refactor
h0ngcha0 Aug 29, 2023
1cd4413
Introduce utility functions to get NodeProvider and ExplorerProvider
h0ngcha0 Aug 30, 2023
a9ba4ce
Remove listing fee
h0ngcha0 Aug 30, 2023
d550822
Add withdraw button for NFT collection
h0ngcha0 Aug 31, 2023
da4ba6f
Update to SDK 0.21.1
h0ngcha0 Sep 6, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
132 changes: 101 additions & 31 deletions .project.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"fullNodeVersion": "v2.3.5",
"fullNodeVersion": "v2.5.0",
"compilerOptionsUsed": {
"ignoreUnusedConstantsWarnings": true,
"ignoreUnusedConstantsWarnings": false,
"ignoreUnusedVariablesWarnings": false,
"ignoreUnusedFieldsWarnings": false,
"ignoreUnusedPrivateFunctionsWarnings": false,
Expand Down Expand Up @@ -30,13 +30,27 @@
"codeHashDebug": "",
"warnings": []
},
"CreateOpenCollectionWithRoyalty": {
"sourceFile": "scripts/create_open_collection_with_royalty.ral",
"sourceCodeHash": "2345e06af03b32ac6edb2292d3053f54408401c1953a5354b5d98d34c883d0eb",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"CreatePublicSaleCollectionSequential": {
"sourceFile": "scripts/create_public_sale_collection_sequential.ral",
"sourceCodeHash": "007ef83801b19fc8d54572f4cb4f422f08c0e300af8085d95f98180aae03563d",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"CreatePublicSaleCollectionSequentialWithRoyalty": {
"sourceFile": "scripts/create_public_sale_collection_sequential_with_royalty.ral",
"sourceCodeHash": "0de405465c941f616d4f3c4513bba704a7e0fd1c6a8c558cc778f3a423dc4f9b",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"INFT": {
"sourceFile": "../node_modules/@alephium/web3/std/nft_interface.ral",
"sourceCodeHash": "491b0726ad455d7f2df52f71e071f34c2630de3e17f1e3fb9fd5d7efd81461a0",
Expand All @@ -51,95 +65,151 @@
"codeHashDebug": "",
"warnings": []
},
"INFTCollectionWithRoyalty": {
"sourceFile": "nft/nft_collection_with_royalty.ral",
"sourceCodeHash": "09233066d1600c978b98fd78ce646009e6c41b940d90a19784d0cd6deff9f06c",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"ListNFT": {
"sourceFile": "scripts/list_nft.ral",
"sourceCodeHash": "b96140af4aac6d3e1792c86c54006ce7e804daa5241da9f20921d3a247ffe2db",
"sourceCodeHash": "f14931f8e8b82d4f6885cf615290be45c4a3498cce3999482da8013aabc5cfe9",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"MintBatchSequential": {
"sourceFile": "scripts/mint_batch_sequential.ral",
"sourceCodeHash": "d300bfa5b990134d624406de8320d5db6a31f98db78a992fe13e042500ca0338",
"sourceCodeHash": "c8f2041c63ac683e5c6ae85d95a1753c6ec3b57cd193eb8e7614ac8d4ba70c86",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"MintNextSequential": {
"sourceFile": "scripts/mint_next_sequential.ral",
"sourceCodeHash": "26f8c7f67df347d4fa6285234bb8d9fbb29f42303b8601c36c1fabb9d553e582",
"sourceCodeHash": "74f54a1fea71452583d897d4d354ea07c282bf4f7cdcd445b7facbd3d3b7b761",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"MintOpenNFT": {
"sourceFile": "scripts/mint_open_nft.ral",
"sourceCodeHash": "34657308e7e00d73f528be8d5eaec1bfe189df4a52e6d7430516940cf9b650ae",
"sourceCodeHash": "dc6542ff119bd55c8a99a7e57ec0746552a249f1d7793c7e7f13094276dab606",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"MintSpecificPublicSaleNFT": {
"sourceFile": "scripts/mint_specific_public_sale_nft.ral",
"sourceCodeHash": "410576e3d5646cdbface29cb5455dbb4f73d5211efaa3337a9d8c5e102b63727",
"MintSpecific": {
"sourceFile": "scripts/mint_specific.ral",
"sourceCodeHash": "059aacb90dbc2b6ca1c00727355c41d054259d355d2095eafd5fa27feca7e916",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"NFT": {
"sourceFile": "nft/nft.ral",
"sourceCodeHash": "4661df2d0bad5bd322f19201e11323aca6ec8e6c9b90baf8afbcd6df9e5734d6",
"sourceCodeHash": "e6fe674d9764b443a7b560ade8c0e7c5402a666f68d427dd49bc6b2a123a3639",
"bytecodeDebugPatch": "",
"codeHashDebug": "299d7f939788bf812205d8776b49e6bc393574848cc173c92bb7798ebc518925",
"codeHashDebug": "b8e82cf387eec8d85c0b905dfc970c39c5d68152d65e4727d075ef96f1dd8096",
"warnings": []
},
"NFTCollectionBase": {
"sourceFile": "nft/nft_collection_base.ral",
"sourceCodeHash": "fae915dab1d8ee8ea07ede0f4699d1af125fa45df69a2e7fc2b4bc5be822fc32",
"sourceCodeHash": "37a2b6d89df3a139704d892a7b65c1be338ac02da18e89515c7ebaafbd52a876",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"NFTListing": {
"sourceFile": "marketplace/nft_listing.ral",
"sourceCodeHash": "1aa5b46efca2f69d8fb9f2cb092f52a27781314dc6583530a982a3c639febc60",
"sourceCodeHash": "a103faa767c64a3d304a00952c162e75330bf2fc7673581e221abd045c24147a",
"bytecodeDebugPatch": "",
"codeHashDebug": "75efad551c880c1ee3041efd5f8e71790cc433a870445e2a39eb21f570385c16",
"codeHashDebug": "2456fae6208da884e1a556eb7d5c4c987ca5177876a06c289e53fa416123fc8d",
"warnings": []
},
"NFTMarketPlace": {
"sourceFile": "marketplace/nft_marketplace.ral",
"sourceCodeHash": "c7ce3b7da580e862fe8dd1cd25ce1d9ab8bceb64f0e709a4e7c42fcfe1b2d10e",
"sourceCodeHash": "4866238fa3b525e242a368bd3955a2d528ec2fbadb6d53c1c7da317ac0df952e",
"bytecodeDebugPatch": "",
"codeHashDebug": "1d9858f16b5f5cc1783b08e1bd2b78775ab2ae64340346db1aea940d873bd439",
"codeHashDebug": "a97ef1c41491db40e5f728e072e3a10fb2c30b7bd31261d5981eb59944bd00d8",
"warnings": []
},
"NFTMarketPlaceUtils": {
"sourceFile": "marketplace/nft_marketplace_utils.ral",
"sourceCodeHash": "c069f8bee7006bc872eadef6f90489eb97fa2bdcb3289ea4a09029333209d223",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"NFTOpenCollection": {
"sourceFile": "nft/nft_open_collection.ral",
"sourceCodeHash": "7918b4ea7bf9b579aeb954b9861cd7b3ba0fa902b9dc60f40ee61f2042475f82",
"sourceFile": "nft/open/nft_open_collection.ral",
"sourceCodeHash": "db0f6a2cc27e735bff53dff47aa8f1af2a041fd595252c4a0a9c0f8bf968400a",
"bytecodeDebugPatch": "",
"codeHashDebug": "34880ed9de1e709b511299a7fb61c4cedc74f7518e9e0de709580d49705a97e4",
"codeHashDebug": "333ca3637f631d1d5aa21f8fd577d0e9c6046354f027f36754a8d241f9ffe071",
"warnings": []
},
"NFTPublicSaleCollection": {
"sourceFile": "nft/nft_public_sale_collection.ral",
"sourceCodeHash": "7966ff11c239b6d316b04f7724eb90c806436816f8b2343f5d97579770ed3e5a",
"NFTOpenCollectionBase": {
"sourceFile": "nft/open/nft_open_collection_base.ral",
"sourceCodeHash": "df53d3fb71d5968ccdee43af096f0518daab13f171d17a28afb2e54eb35a1594",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"NFTOpenCollectionWithRoyalty": {
"sourceFile": "nft/open/nft_open_collection_with_royalty.ral",
"sourceCodeHash": "8f18508518882cd4b1008f121326a978ddb745915b4a97859465b752f9ceb6a1",
"bytecodeDebugPatch": "",
"codeHashDebug": "3b4c08e7310992836fd02eef32c87357b566e73af9b48d66f2779fef01ef9f17",
"warnings": []
},
"NFTPublicSaleCollectionBase": {
"sourceFile": "nft/publicsale/nft_public_sale_collection_base.ral",
"sourceCodeHash": "61636618408880f90b522a118061ebf8a5be96d133905b219b6116e90c1f84fc",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"NFTPublicSaleCollectionRandom": {
"sourceFile": "nft/nft_public_sale_collection_random.ral",
"sourceCodeHash": "f2f3a82d37edba85fafb2802a2e5a6e24821f2089afbb3e9dd1b32253ab38b66",
"sourceFile": "nft/publicsale/random/nft_public_sale_collection_random.ral",
"sourceCodeHash": "4b8182a167ff30b7ea9582ff7eee9f0228d4aacaa7aac5e840e40ede33f62886",
"bytecodeDebugPatch": "",
"codeHashDebug": "7074851e77dd80518734906b7536dd0ba9efa2e22536561fdd03f3f8771ccc35",
"warnings": []
},
"NFTPublicSaleCollectionRandomBase": {
"sourceFile": "nft/publicsale/random/nft_public_sale_collection_random_base.ral",
"sourceCodeHash": "e104564950b41ccca3a2c2c11bd7317b50d6bc71fc5b0c779f47f0b29eb5838e",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"NFTPublicSaleCollectionRandomWithRoyalty": {
"sourceFile": "nft/publicsale/random/nft_public_sale_collection_random_with_royalty.ral",
"sourceCodeHash": "05293541e0a9fd52c2e6f1af7d27c7506dedf5aed5acabd4afefd91e7f93872b",
"bytecodeDebugPatch": "",
"codeHashDebug": "3895b997ff50f3c7fcbbcbdeceeebf48e0fd96a66f8343afa075aa771cae28d4",
"codeHashDebug": "50df8ca765d1002b77e3b419aca80bc666e6af46a4ccb4da0e0acab1c4903a93",
"warnings": []
},
"NFTPublicSaleCollectionSequential": {
"sourceFile": "nft/nft_public_sale_collection_sequential.ral",
"sourceCodeHash": "0ec798a05d35612db10e72c5cd2d3cb1931bf22e244cafa0860b935becade481",
"sourceFile": "nft/publicsale/sequential/nft_public_sale_collection_sequential.ral",
"sourceCodeHash": "c91a068902fd88be4b6be7d0907595b0ca0710fd92ee03cd608f3cf79c1b5cbb",
"bytecodeDebugPatch": "",
"codeHashDebug": "5ee60118831827b115399ce7c58f067b08c17362f29ffd5d44d7ed80198d68b5",
"warnings": []
},
"NFTPublicSaleCollectionSequentialBase": {
"sourceFile": "nft/publicsale/sequential/nft_public_sale_collection_sequential_base.ral",
"sourceCodeHash": "489099a4680652de1f7967f7be02400f91006f18fcf2577d6e7860094e07d060",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
},
"NFTPublicSaleCollectionSequentialWithRoyalty": {
"sourceFile": "nft/publicsale/sequential/nft_public_sale_collection_sequential_with_royalty.ral",
"sourceCodeHash": "34977f83c71d50bca80ccc6bb4f82c39597355bca1df10fa921cbe10a2e88d31",
"bytecodeDebugPatch": "",
"codeHashDebug": "0ad17171a21b266240713ad96da4baf6cd16adcc651343f4f353292728791618",
"codeHashDebug": "9aa33812192edd3f903b92df13b6dc5115bd4ffcb848d38c6ed545b88b6a48b5",
"warnings": []
},
"UpdateAdmin": {
Expand Down Expand Up @@ -177,9 +247,9 @@
"codeHashDebug": "",
"warnings": []
},
"WithdrawFromPublicSaleCollection": {
"sourceFile": "scripts/withdraw_from_public_sale_collection.ral",
"sourceCodeHash": "4d4608cadbef112ce1e2bdd85d886f7575886dade06c7645f8a448aa5779f31a",
"WithdrawFromPublicSaleCollectionRandom": {
"sourceFile": "scripts/withdraw_from_public_sale_collection_random.ral",
"sourceCodeHash": "f10884867e350ba20332119d7ec1fa319f7837f032cd24c4a3cda7e2e6478ecb",
"bytecodeDebugPatch": "",
"codeHashDebug": "",
"warnings": []
Expand Down
Loading
Loading