-
Notifications
You must be signed in to change notification settings - Fork 229
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
Marketplace sample calls #962
Conversation
I want to put the return values into classes and fix webgl, will complete early monday and get juan to double check. |
Updating to 2022 to gain better code coverage on this PR within the new system, will include webgl and classes update momentarily before getting Juan to test. |
2022 update
Menu update
Fixed, had to make a jslib and thread that into the stack to get it to work on webgl, also closes #959 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Majority of the samples are working, but some are failing. Here is the current status:
Working
- GetProjectItems ✅
- GetMarketplaceItems ✅
- GetItem ✅
- GetProjectTokens ✅
- GetCollectionTokens721 ✅
- GetCollectionTokens1155
- GetCollectionToken ✅
- GetTokenOwners ✅
- CreateCollection721 ✅
- CreateCollection1155 ✅
- CreateMarketplace ✅
Functionality working but I get errors
- DeleteCollection ✅ ❌
NullReferenceException: Object reference not set to an instance of an object
Scripts.EVM.Remote.CSServer.DeleteData (System.String _bearerToken, System.String _path) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs:60)
Scripts.EVM.Marketplace.Marketplace.DeleteCollection (System.String _bearerToken, System.String _collectionId) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Marketplace/Marketplace.cs:283)
MarketplaceCalls.DeleteCollection () (at Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Marketplace/MarketplaceCalls.cs:204)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <e307bbb467104258887a104f6151f183>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
Failing
- Mint721 ❌
- Mint 1155 ❌
Full log for Mint error:
[Web3] [WalletConnect SDK] [JsonRpcProvider] Got payload {"id":439372001364994,"jsonrpc":"2.0","method":"irn_subscription","params":{"id":"13b6432a6b7fd533950b29d25b66ce86af943bc559d989b7e5edb1f2c2e87002","data":{"topic":"7b62869c46b6c9c9b015407e455d6f8583bf7673c3fc40a130a15635a98ce19a","message":"ALH23F3Cf4j/71q2ju8NSdhu4NydT0WI5w6/PKlufQofeuCM7DhpSPtBlZKRfFYKtuxqyJeH00CC6FZ9AWhe9Ov7nvfs05I5dXoSWBnoy6vHhdBtQTf6KV81zrmvQNXOezCnH0+FSdyT95TILnh+nM4SD+2bMCVT7sUWDDFV6HADZ86ARH3yn/d8BsfteLLsNUlVlMkhk+A+cpQ5Z0wxiizPvNz4u27ReR3aKJztevrGmWhkA50vp+b+Zm40","publishedAt":1716296880237,"tag":1109}}}
[Web3] [WalletConnect SDK] [JsonRpcProvider] Payload has ID 439372001364994
[Web3] [WalletConnect SDK] Got generic response for type System.String
[Web3] [WalletConnect SDK] Got response for type System.String
WalletConnectException: User disapproved requested chains
WalletConnectSharp.Sign.Engine.Request[T,TR] (System.String topic, T data, System.String chainId, System.Nullable`1[T] expiry) (at <8a03767a7c084e38b9e400624d188dfb>:0)
ChainSafe.Gaming.WalletConnect.WalletConnectProvider.Request[T] (T data, System.Nullable`1[T] expiry) (at <0d45ab63aa8549c4ad1635c4b8a7792b>:0)
ChainSafe.Gaming.WalletConnect.WalletConnectTransactionExecutor.SendTransaction (ChainSafe.Gaming.Evm.Transactions.TransactionRequest transaction) (at <0d45ab63aa8549c4ad1635c4b8a7792b>:0)
ChainSafe.Gaming.Evm.Contracts.Contract.SendWithReceipt (System.String method, System.Object[] parameters, ChainSafe.Gaming.Evm.Transactions.TransactionRequest overwrite) (at <a5a8db86682c403bbecf38c48c360d65>:0)
ChainSafe.Gaming.Evm.Contracts.Contract.Send (System.String method, System.Object[] parameters, ChainSafe.Gaming.Evm.Transactions.TransactionRequest overwrite) (at <a5a8db86682c403bbecf38c48c360d65>:0)
Scripts.EVM.Token.Evm.ContractSend (ChainSafe.Gaming.Web3.Web3 web3, System.String method, System.String abi, System.String contractAddress, System.Object[] args, Nethereum.Hex.HexTypes.HexBigInteger value) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs:26)
Scripts.EVM.Marketplace.Marketplace.Mint721CollectionNft (System.String _collectionContract, System.String _uri) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Marketplace/Marketplace.cs:234)
MarketplaceCalls.Mint721CollectionNft () (at Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Marketplace/MarketplaceCalls.cs:184)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <e307bbb467104258887a104f6151f183>:0)
UnityEngine.UnitySynchronizationContext+WorkRequest.Invoke () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:153)
UnityEngine.UnitySynchronizationContext.Exec () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:83)
UnityEngine.UnitySynchronizationContext.ExecuteTasks () (at /Users/bokken/build/output/unity/unity/Runtime/Export/Scripting/UnitySynchronizationContext.cs:107)
- DeleteMarketplace ❌
Error deleting: HTTP/1.1 404 Not Found
But Marketplace exists and is not deployed:
{
"id": "0d6419b6-ed27-4372-90d3-3ed2d183549a",
"name": "test delete",
"description": "",
"owner": "6dabb083-f75d-482c-8b2b-aad3818ff93b",
"chain_id": 11155111,
"banner": "",
"project_id": "6aa5af5a-cf38-4093-b78a-c1c13b58d0f4",
"contract_address": "",
"deployed": false,
"created_at": 1716296563,
"updated_at": 1716296563
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Issues were fixed!
Mint1155 ✅
WebGL ✅
I didnt find any more issues, awesome work! The only annoying thing is the Bearer token that expires
Marketplace write calls are now functional within the sample scene, these functions can easily be added to a GUI to populate it with data as the user wishes.
To test: