Sepolia Switch - #729
Sepolia Switch#729
Conversation
almost all passing
…web3.unity into sneakz/sepolia-take-2
…web3.unity into sneakz/sepolia-take-2
…web3.unity into sneakz/sepolia-take-2
update templates
gas limit fixed
| /// <param name="_multicall">[Optional] The Multicall specific parameters, if any.</param> | ||
| /// <param name="_rpc">[Optional] The RPC (Remote Procedure Call) configuration, if needed.</param> | ||
| /// <returns>String encoded response from the MultiCall contract.</returns> | ||
| public static async Task<string> Multicall(Web3 web3, string _chain, string _network, string _contract, string _abi, string _method, string _args, string _multicall = "", string _rpc = "") |
There was a problem hiding this comment.
Where is this method switched to?
There was a problem hiding this comment.
The initial function doesn't work on Sepolia as it was using the API for Goerli, similar for AllNfts which I'll look at for my next PR. Anyway I've amended and tested it with owner of batch 721 and multicall here starting on line 81.
https://github.com/ChainSafe/web3.unity/blob/82b53e47c22f3061fc40ab5215a2ad17ee5389af/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs
|
I have following issues:
|
Remove tests
Gelato fix
RyRy79261
left a comment
There was a problem hiding this comment.
Overall looks good, just some minor semantics comments
| namespace Scripts.EVM.Token | ||
| { | ||
| public static class CommonMethod | ||
| public static class EthMethod |
There was a problem hiding this comment.
Eth method was what we were using before in the other scripts that weren't common method, I merged them. I honestly prefer eth method though as above evm method - ethereum virtual machine method - eth method. Don't think it matters too much anyway unless you guys really think we should change it.
juans-chainsafe
left a comment
There was a problem hiding this comment.
So far I only tested with Metamask, but I have some feedback:
- ❌ SponsorCall fails with:
Web3Exception: GelatoRelaySDK/SponsoredCall: Failed with error: HTTP.POST to https://api.gelato.digital/relays/v2/sponsored-call responded with error: {"message":"Unauthorized sponsored target contract: 0x763D37aB388C5cdd2Fb0849d6275802F959fbF30"}
ChainSafe.GamingSdk.Gelato.Gelato.SponsoredCall (ChainSafe.GamingSdk.Gelato.Dto.SponsoredCallRequest request) (at <bd92b5b0e746460a848a0fcb5ec11108>:0)
GelatoSample.SponsorCall () (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/GelatoSample.cs:91)
GelatoCalls.GelatoSponsorCall () (at Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Gelato/GelatoCalls.cs:44)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <b6c5d0f08ddf477186f780f49bb14dee>: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)
- ❌ Samples that requires to sign a transaction in the wallet can't track the transaction output (I see that the transaction is made successfully in the wallet, but in the console I get 2 different outputs: a "transaction not found" error or nothing happens), the error output:
Web3Exception: transaction not found
ChainSafe.Gaming.Evm.Providers.RpcProviderExtensions.GetTransaction (ChainSafe.Gaming.Evm.Providers.IRpcProvider provider, System.String transactionHash) (at <a9022bec331e4a99a4e22386a313a3bb>:0)
ChainSafe.Gaming.WalletConnect.WalletConnectTransactionExecutor.SendTransaction (ChainSafe.Gaming.Evm.Transactions.TransactionRequest transaction) (at <0267720df1f44a20996aa61ee805516f>:0)
ChainSafe.Gaming.Evm.Contracts.Contract.SendWithReceipt (System.String method, System.Object[] parameters, ChainSafe.Gaming.Evm.Transactions.TransactionRequest overwrite) (at <a9022bec331e4a99a4e22386a313a3bb>:0)
ChainSafe.Gaming.Evm.Contracts.Contract.Send (System.String method, System.Object[] parameters, ChainSafe.Gaming.Evm.Transactions.TransactionRequest overwrite) (at <a9022bec331e4a99a4e22386a313a3bb>:0)
Scripts.EVM.Token.Erc721.MintErc721 (ChainSafe.Gaming.Web3.Web3 web3, System.String abi, System.String contractAddress, System.String uri) (at /Users/juanmanuelspoleti/Desktop/workspace/web3.unity/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs:153)
Erc721Calls.MintErc721 () (at Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs:119)
System.Runtime.CompilerServices.AsyncMethodBuilderCore+<>c.<ThrowAsync>b__7_0 (System.Object state) (at <b6c5d0f08ddf477186f780f49bb14dee>: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)
Happens on samples like:
- Mint ERC20
- Transfer ERC20
- Mint ERC721
- Transfer ERC721
- GetNonce
- SendArray
allerc prep
…web3.unity into sneakz/sepolia-take-2
juans-chainsafe
left a comment
There was a problem hiding this comment.
All working now! but in WebGL we have a different error, created this ticket for that: #730
* tests tests * almost all passing almost all passing * Duplicates removed * organizing * Cleanup * cleanup * Cleanup Cleanup * ecdsa ecdsa * Update SampleBehaviour.cs * Cleanup Cleanup * cleanup cleanup * cleanup cleanup * Update SampleMain.unity * Auto-duplicate Packages Samples * Update ChainlinkLootboxSampleLauncher.cs * Auto-duplicate Packages Samples * Update Erc721Tests.cs * Update Chains.cs * Published Solution Dependencies to Package Libraries as DLLs * Update Erc721Tests.cs * Update EvmTests.cs * Update Erc721.cs * update templates update templates * gas limit fixed gas limit fixed * Auto-duplicate Packages Samples * update update * ownerOf ownerOf * Auto-duplicate Packages Samples * owner of batch working * Auto-duplicate Packages Samples * tests * Auto-duplicate Packages Samples * Update Erc1155Tests.cs * tests fixed tests fixed * Auto-duplicate Packages Samples * Update SampleMain.unity * Auto-duplicate Packages Samples * Remove tests Remove tests * Gelato fix Gelato fix * Auto-duplicate Packages Samples * Update SampleLogin.unity * Auto-duplicate Packages Samples * allerc prep allerc prep * Auto-duplicate Packages Samples --------- Co-authored-by: sneakzttv <sneakzttv@users.noreply.github.com>
* tests tests * almost all passing almost all passing * Duplicates removed * organizing * Cleanup * cleanup * Cleanup Cleanup * ecdsa ecdsa * Update SampleBehaviour.cs * Cleanup Cleanup * cleanup cleanup * cleanup cleanup * Update SampleMain.unity * Auto-duplicate Packages Samples * Update ChainlinkLootboxSampleLauncher.cs * Auto-duplicate Packages Samples * Update Erc721Tests.cs * Update Chains.cs * Published Solution Dependencies to Package Libraries as DLLs * Update Erc721Tests.cs * Update EvmTests.cs * Update Erc721.cs * update templates update templates * gas limit fixed gas limit fixed * Auto-duplicate Packages Samples * update update * ownerOf ownerOf * Auto-duplicate Packages Samples * owner of batch working * Auto-duplicate Packages Samples * tests * Auto-duplicate Packages Samples * Update Erc1155Tests.cs * tests fixed tests fixed * Auto-duplicate Packages Samples * Update SampleMain.unity * Auto-duplicate Packages Samples * Remove tests Remove tests * Gelato fix Gelato fix * Auto-duplicate Packages Samples * Update SampleLogin.unity * Auto-duplicate Packages Samples * allerc prep allerc prep * Auto-duplicate Packages Samples --------- Co-authored-by: sneakzttv <sneakzttv@users.noreply.github.com>





Changing all contracts and config over to Sepolia so that we're not caught out come early next year.
Updated all the sample scene, lootbox, web3auth and gelato calls to use Sepolia.
Added some new tests for ECDSA coverage & some other missing functions. Also updated the rest to match the new config.
Updated byte array result values in tests to big integers for ease of use. (converting byte arrays is tedious)
We had 3 eth method and ABI scripts all doing the same thing, got rid of the duplicates and updated the references.
Added a contract class next to the ABIs in runtime/evm/token to manage duplicate variables. Cleaned up some code too as i could change a few raw values to references.
Tests, samples & lootboxes all reference the ERC contracts and ABIs above so we only have to change them in 1 place.
Balance of batch for erc721 was using the old api which doesn't work on Sepolia (fun), i've updated this to use multicall now.
I've also uploaded these contracts to a repo here for future reference https://github.com/ChainSafe/SDKSampleContracts as i had to dive through the ABIs to build them to get the proper responses without changing the tests expected results.
Updated expected and actual positions for assert in tests as they were in the wrong order and added some helper comments.
Fixed tracker issue "Eliminate duplicated logic in the Chains class, considering the functionality of ChainProvider" Removed the duplicate functions as they had no usages anyway.
--------------------To Test----------------------------
Set server settings to Sepolia.
Import samples & lootboxes via package manager.
Login to main scene to test that everything is functioning as intended via Metamask.
Login to main scene to test that everything is functioning as intended via Web3Auth.
Run the lootboxes scene to test that everything is functioning as intended.
Check the test runner to ensure that all new tests are passing.