From bcd44763a79f60348758eb76136edeff4b0b7583 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 14:50:48 +0800 Subject: [PATCH 01/44] tests tests --- .../Runtime/Scripts/EVM/Token/Evm.cs | 3 +- .../Tests/Runtime/Erc1155Tests.cs | 14 +- .../Tests/Runtime/Erc20Tests.cs | 56 +++--- .../Tests/Runtime/Erc721Tests.cs | 30 +-- .../Tests/Runtime/EvmTests.cs | 175 ++++++++++-------- .../Tests/Runtime/SampleTestsBase.cs | 6 +- ...15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity | 125 +++++++++++++ ...b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta | 7 + ...8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity | 125 +++++++++++++ ...de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta | 7 + ...ac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity | 125 +++++++++++++ ...96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta | 7 + .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 2 +- .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 8 +- .../Assets/walletconnect.json | 1 + .../Assets/walletconnect.json.meta | 7 + 16 files changed, 555 insertions(+), 143 deletions(-) create mode 100644 src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity create mode 100644 src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta create mode 100644 src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity create mode 100644 src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta create mode 100644 src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity create mode 100644 src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta create mode 100644 src/UnitySampleProject/Assets/walletconnect.json create mode 100644 src/UnitySampleProject/Assets/walletconnect.json.meta diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs index 4d41a1be3..ce8a2d40f 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs @@ -12,6 +12,7 @@ using Nethereum.Hex.HexTypes; using Nethereum.Signer; using Nethereum.Util; +using UnityEngine; using Web3Unity.Scripts.Library.IPFS; using Web3Unity.Scripts.Prefabs; @@ -124,12 +125,10 @@ public static async Task SignVerify(Web3 web3, string message) { var playerAccount = await web3.Signer.GetAddress(); var signatureString = await web3.Signer.SignMessage(message); - var msg = "\x19" + "Ethereum Signed Message:\n" + message.Length + message; var msgHash = new Sha3Keccack().CalculateHash(Encoding.UTF8.GetBytes(msg)); var signature = MessageSigner.ExtractEcdsaSignature(signatureString); var key = EthECKey.RecoverFromSignature(signature, msgHash); - return key.GetPublicAddress() == playerAccount; } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs index 6c4c1a8a4..7844ad11a 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs @@ -18,14 +18,14 @@ public class Erc1155Tests #region Balances private readonly string[] _accounts = new[] { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xE51995Cdb3b1c109E0e6E67ab5aB31CDdBB83E4a" }; - private const string ContractAddress = "0x2c1867bc3026178a47a677513746dcc6822a137a"; - private readonly string[] _tokenIds = { "0x01559ae4021aee70424836ca173b6a4e647287d15cee8ac42d8c2d8d128927e5", "0x01559ae4021aee70424836ca173b6a4e647287d15cee8ac42d8c2d8d128927e5" }; + private const string ContractAddress = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; + private readonly string[] _tokenIds = { "1", "2" }; #endregion #region Texture - private const string NftTextureContractAddress = "0x0288B4F1389ED7b3d3f9C7B73d4408235c0CBbc6"; + private const string NftTextureContractAddress = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; #endregion @@ -52,8 +52,8 @@ public IEnumerator Setup() var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { - projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "5", - "Ethereum", "Goerli", "Geth", "https://goerli.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); + projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", + "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } var web3Builder = new Web3Builder(projectConfigScriptableObject) @@ -89,7 +89,7 @@ public IEnumerator TestBalanceOfBatch() } private const string ExpectedUriResult = - "https://ipfs.io/ipfs/f01559ae4021aee70424836ca173b6a4e647287d15cee8ac42d8c2d8d128927e5"; + "https://ipfs.chainsafe.io/ipfs/QmfUHuFj3YL2JMZkyXNtGRV8e9aLJgQ6gcSrqbfjWFvbqQ"; [UnityTest] public IEnumerator TestUri() @@ -174,7 +174,7 @@ public IEnumerator TestImportNFTTexture() }; #endregion - var texture = Erc1155.ImportNftTexture1155(web3, NftTextureContractAddress, "0"); + var texture = Erc1155.ImportNftTexture1155(web3, NftTextureContractAddress, "1"); yield return new WaitUntil(() => texture.IsCompleted); CollectionAssert.AreEqual(bytesOfTheTexture, texture.Result.EncodeToJPG(1)); } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs index 17eeaf23d..76c9fc019 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs @@ -17,7 +17,9 @@ public class Erc20Tests #region Contract Calls private const string Account = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private const string ContractAddress = "0x3E0C0447e47d49195fbE329265E330643eB42e6f"; + private const string ContractAddress = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; + // Mint ERC20 function adjusts the total supply so we have a duplicate here that doesn't change for the test to pass + private const string TotalSupplyAddress = "0xd1A103234d1D65E0E817A523d679B114cf86521A"; #endregion @@ -34,11 +36,10 @@ public IEnumerator Setup() var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { - projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "5", - "Ethereum", "Goerli", "Geth", "https://goerli.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); + projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", + "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } - var web3Builder = new Web3Builder(projectConfigScriptableObject).Configure(services => { services.UseUnityEnvironment(); @@ -57,12 +58,12 @@ public IEnumerator Setup() public IEnumerator TestBalanceOf() { var getBalanceOf = Erc20.BalanceOf(web3, ContractAddress, Account); - yield return new WaitUntil(() => getBalanceOf.IsCompleted); - - Assert.AreEqual(new BigInteger(new byte[] - { - 0, 0, 0, 64, 234, 237, 116, 70, 208, 156, 44, 159, 12 - }), getBalanceOf.Result); + yield return new WaitUntil(() => getBalanceOf.IsCompleted); + Assert.AreEqual(new BigInteger(1000000000000000000), getBalanceOf.Result); + //Assert.AreEqual(new BigInteger(new byte[] + //{ + // 0, 0, 0, 64, 234, 237, 116, 70, 208, 156, 44, 159, 12 + //}), getBalanceOf.Result); } [UnityTest] @@ -70,7 +71,6 @@ public IEnumerator TestDecimals() { var getDecimals = Erc20.Decimals(web3, ContractAddress); yield return new WaitUntil(() => getDecimals.IsCompleted); - Assert.AreEqual(new BigInteger(18), getDecimals.Result); } @@ -79,44 +79,38 @@ public IEnumerator TestName() { var getName = Erc20.Name(web3, ContractAddress); yield return new WaitUntil(() => getName.IsCompleted); - - Assert.AreEqual("ChainToken", getName.Result); + Assert.AreEqual("CsTestErc20", getName.Result); } [UnityTest] public IEnumerator TestNativeBalanceOf() { var getNativeBalanceOf = Erc20.NativeBalanceOf(web3, Account); - - yield return new WaitUntil(() => getNativeBalanceOf.IsCompleted); - - - Assert.AreEqual(new BigInteger(new byte[] - { - 0, 144, 99, 20, 5, 161, 13, 3 - }), getNativeBalanceOf.Result); + yield return new WaitUntil(() => getNativeBalanceOf.IsCompleted); + Assert.AreEqual(new BigInteger(500000000000000000), getNativeBalanceOf.Result); + //Assert.AreEqual(new BigInteger(new byte[] + //{ + // 0, 144, 99, 20, 5, 161, 13, 3 + //}), getNativeBalanceOf.Result); } [UnityTest] public IEnumerator TestSymbol() { var getSymbol = Erc20.Symbol(web3, ContractAddress); - yield return new WaitUntil(() => getSymbol.IsCompleted); - - Assert.AreEqual("CT", getSymbol.Result); + Assert.AreEqual("CST", getSymbol.Result); } [UnityTest] public IEnumerator TestTotalSupply() { - var getTotalSupply = Erc20.TotalSupply(web3, ContractAddress); - + var getTotalSupply = Erc20.TotalSupply(web3, TotalSupplyAddress); yield return new WaitUntil(() => getTotalSupply.IsCompleted); - - Assert.AreEqual(new BigInteger(new byte[] - { - 0, 0, 0, 64, 234, 237, 116, 70, 208, 156, 44, 159, 12 - }), getTotalSupply.Result); + Assert.AreEqual(new BigInteger(1000000000000000000), getTotalSupply.Result); + //Assert.AreEqual(new BigInteger(new byte[] + //{ + // 0, 0, 0, 64, 234, 237, 116, 70, 208, 156, 44, 159, 12 + //}), getTotalSupply.Result); } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index e0b3a4630..6baed955b 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -17,22 +17,24 @@ public class Erc721Tests { // Fields + //public const string Erc721 = "0xF7B58448FEFdC634ccFE1624Dc9356C55b8d126c"; #region Balances - private const string balanceOfContractAddress = "0x9123541E259125657F03D7AD2A7D1a8Ec79375BA"; + private const string balanceOfContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; private const string balanceOfAccount = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion #region OwnerOf - private const string ownerOfContractAddress = "0x06dc21f89f01409e7ed0e4c80eae1430962ae52c"; - private const string ownerOfTokenId = "0x01559ae4021a565d5cc4740f1cefa95de8c1fb193949ecd32c337b03047da501"; - private const string ownerOfExpected = "0x7Ea535884Ba8342bE7aDbef0Fa6822E629162375"; - private const string ownerOfBatchContractAddress = "0x47381c5c948254e6e0E324F1AA54b7B24104D92D"; - private string[] ownerOfBatchTokenIds = { "33", "29" }; - public string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; - private string[] ownerOfBatchExpected = { "0x5e8caec3a556cbb8a3cb689560ea811bdddc8d90", "0x80cc9a67ead304bbb3b6cfca804773ef51da872c" }; + private const string ownerOfContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + private const string ownerOfTokenId = "2"; + private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; + private const string ownerOfBatchContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + private string[] ownerOfBatchTokenIds = { "1", "2" }; + public string multicall = ""; + //public string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; + private string[] ownerOfBatchExpected = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; #endregion @@ -44,8 +46,8 @@ public class Erc721Tests #region Uri - private const string uriContractAddress = "0x06dc21f89f01409e7ed0e4c80eae1430962ae52c"; - private const string uriTokenId = "0x01559ae4021a565d5cc4740f1cefa95de8c1fb193949ecd32c337b03047da501"; + private const string uriContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + private const string uriTokenId = "1"; #endregion @@ -75,8 +77,8 @@ public IEnumerator Setup() var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { - projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "5", - "Ethereum", "Goerli", "Geth", "https://goerli.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); + projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", + "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } var web3Builder = new Web3Builder(projectConfigScriptableObject) @@ -100,7 +102,7 @@ public IEnumerator TestBalanceOf() var getBalanceOf = Erc721.BalanceOf(web3, balanceOfContractAddress, balanceOfAccount); yield return new WaitUntil(() => getBalanceOf.IsCompleted); - Assert.AreEqual(2, getBalanceOf.Result); + Assert.AreEqual(3, getBalanceOf.Result); } [UnityTest] @@ -122,7 +124,7 @@ public IEnumerator TestOwnerOfBatch() } private const string ExpectedUriResult = - "https://ipfs.io/ipfs/f01559ae4021a565d5cc4740f1cefa95de8c1fb193949ecd32c337b03047da501"; + "https://ipfs.chainsafe.io/ipfs/QmfUHuFj3YL2JMZkyXNtGRV8e9aLJgQ6gcSrqbfjWFvbqQ"; [UnityTest] public IEnumerator TestUri() diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 53c0824e1..b499a1d0a 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -11,23 +11,19 @@ public class EvmTests : SampleTestsBase { #region ContractCalls - private const string ContractSendMethodName = "addTotal"; - + private const string ContractSendMethod = "addTotal"; private const int IncreaseAmount = 1; - - private const string Abi = "[ { \"inputs\": [ { \"internalType\": \"uint8\", \"name\": \"_myArg\", \"type\": \"uint8\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - - private const string ContractAddress = "0x7286Cf0F6E80014ea75Dbc25F545A3be90F4904F"; + private const string Abi = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + private const string ContractAddress = "0xCb0FdD2837a61d7c39ce0fbF56403Db601CAeFd4"; #endregion #region Array - private const string SendArrayAbi = "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"setStore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bought\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStore\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - - private const string SendArrayAddress = "0x5244d0453A727EDa96299384370359f4A2B5b20a"; - - private const string SendArrayMethodName = "setStore"; + private const string ArrayAbi = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + private const string ArrayAddress = "0xCb0FdD2837a61d7c39ce0fbF56403Db601CAeFd4"; + private const string GetArrayMethod = "getStore"; + private const string SendArrayMethod = "setStore"; private static readonly List ArrayToSend = new List() { @@ -39,7 +35,7 @@ public class EvmTests : SampleTestsBase #region MintErc20 - private const string Mint20Contract = "0x714d32fA722461A2c8F0b4EB98ff5cFF8F908Df2"; + private const string Mint20Contract = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; private const string Mint20ToAccount = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; private const int Mint20Amount = 1; @@ -48,15 +44,15 @@ public class EvmTests : SampleTestsBase #region Mint721 private const string Mint721Abi = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - private const string Mint721Contract = "0x0B102638532be8A1b3d0ed1fcE6eC603Bec37848"; - private const string Mint721Uri = "ipfs://QmNn5EaGR26kU7aAMH7LhkNsAGcmcyJgun3Wia4MftVicW/1.json"; + private const string Mint721Contract = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + private const string Mint721Uri = "QmfUHuFj3YL2JMZkyXNtGRV8e9aLJgQ6gcSrqbfjWFvbqQ"; #endregion #region Mint1155 private string Mint1155Abi = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - private string Mint1155Contract = "0xA0a53f1Cabf7D723Ab2087400681039917D1B6D4"; + private string Mint1155Contract = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; private const int Mint1155Id = 1; private const int Mint1155Amount = 1; @@ -64,9 +60,16 @@ public class EvmTests : SampleTestsBase #region Transfer - private const string TransferErc20ContractAddress = "0xc778417e063141139fce010982780140aa0cd5ab"; - private const string TransferErc721ContractAddress = "0x358AA13c52544ECCEF6B0ADD0f801012ADAD5eE3"; - private const string TransferErc1155ContractAddress = "0xe793e17Ec93bEc809C5Ac6dd0d8b383446E65B78"; + private const string TransferErc20ContractAddress = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; + private BigInteger TransferErc20Amount = 1; + + private const string TransferErc721ContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + private const int Transfer721Id = 5; + + private const string TransferErc1155ContractAddress = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; + private const int Transfer1155Id = 1; + private const int Transfer1155Amount = 1; + private const string SendToAddress = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; #endregion @@ -84,14 +87,14 @@ public override IEnumerator Setup() [UnityTest] public IEnumerator TestContractSend() { - config.TestResponse = "0x9de3bb69db4bd93babef923f5da1f53cdb287d9ebab9b4177ba2fb25e6a09225"; + config.TestResponse = "0x3f32788de980b1570256a805c7ef193e48da263954d4c106bd7b9514d460753e"; object[] args = { IncreaseAmount }; - var sendContract = Evm.ContractSend(web3, ContractSendMethodName, Abi, ContractAddress, args); + var sendContract = Evm.ContractSend(web3, ContractSendMethod, Abi, ContractAddress, args); yield return new WaitUntil(() => sendContract.IsCompleted); @@ -99,16 +102,13 @@ public IEnumerator TestContractSend() Assert.IsTrue(sendContract.IsCompletedSuccessfully); - Assert.AreEqual(sendContract.Result, string.Empty); + Assert.AreEqual(string.Empty, sendContract.Result); } - [UnityTest] + [UnityTest] public IEnumerator TestGetArray() { - string contractAddress = "0x5244d0453A727EDa96299384370359f4A2B5b20a"; - string abi = "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"setStore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bought\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStore\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - string method = "getStore"; - var getArray = Evm.GetArray(web3, contractAddress, abi, method); + var getArray = Evm.GetArray(web3, ArrayAddress, ArrayAbi, GetArrayMethod); yield return new WaitUntil(() => getArray.IsCompleted); @@ -121,6 +121,22 @@ public IEnumerator TestGetArray() }); } + [UnityTest] + public IEnumerator TestSendArray() + { + config.TestResponse = "0x3446b949c3d214fba7e61c9cf127eac6cd0b2983564cf76be618099879b6f1e1"; + + var sendArray = Evm.SendArray(web3, SendArrayMethod, ArrayAbi, ArrayAddress, ArrayToSend.ToArray()); + + yield return new WaitUntil(() => sendArray.IsCompleted); + + if (sendArray.Exception != null) throw sendArray.Exception; + + Assert.IsTrue(sendArray.IsCompletedSuccessfully); + + Assert.AreEqual(string.Empty, sendArray.Result); + } + [UnityTest] public IEnumerator TestGetBlockNumber() { @@ -163,7 +179,7 @@ public IEnumerator TestGetGasPrice() [UnityTest] public IEnumerator TestGetGasNonce() { - config.TestResponse = "0x527fcd7356738389d29a96342b5fba92ab1348b744409d5bf4ce0ca2fbc2f25e"; + config.TestResponse = "0xaba88d9a1977c8d78ddfb3d973798eb061bd495189d7cbfa832f895896417cd1"; var getGasNonce = Evm.GetNonce(web3); @@ -171,6 +187,7 @@ public IEnumerator TestGetGasNonce() if (getGasNonce.Exception != null) throw getGasNonce.Exception; + Debug.Log(getGasNonce.Result); //just assert successful completion because result is always changing Assert.IsTrue(getGasNonce.IsCompletedSuccessfully); } @@ -178,14 +195,14 @@ public IEnumerator TestGetGasNonce() [UnityTest] public IEnumerator TestTransactionStatus() { - config.TestResponse = "0x1e989dbcc43e078b19ea8ea201af195e74397b494b7acd4afcca67e65e5c3339"; + config.TestResponse = "0xaba88d9a1977c8d78ddfb3d973798eb061bd495189d7cbfa832f895896417cd1"; var getTransactionStatus = Evm.GetTransactionStatus(web3); yield return new WaitUntil(() => getTransactionStatus.IsCompleted); if (getTransactionStatus.Exception != null) throw getTransactionStatus.Exception; - + Debug.Log(getTransactionStatus.Result); //just assert successful completion because result is always changing Assert.IsTrue(getTransactionStatus.IsCompletedSuccessfully); } @@ -201,29 +218,13 @@ public IEnumerator TestUseRegisteredContract() Assert.IsTrue(useRegisteredContract.IsCompletedSuccessfully); - Assert.AreEqual(useRegisteredContract.Result, new BigInteger(0)); - } - - [UnityTest] - public IEnumerator TestSendArray() - { - config.TestResponse = "0x6a33280f3b2b907da613b18b09f863cd835f1977a4131001ace5602899fc98c7"; - - var sendArray = Evm.SendArray(web3, SendArrayMethodName, SendArrayAbi, SendArrayAddress, ArrayToSend.ToArray()); - - yield return new WaitUntil(() => sendArray.IsCompleted); - - if (sendArray.Exception != null) throw sendArray.Exception; - - Assert.IsTrue(sendArray.IsCompletedSuccessfully); - - Assert.AreEqual(sendArray.Result, string.Empty); + Assert.AreEqual(new BigInteger(0), useRegisteredContract.Result); } [UnityTest] public IEnumerator TestSendTransaction() { - config.TestResponse = "0xa60bef1df91bedcd2f3f79e6609716ef245fd1202d66c6e35694b43529bf2e71"; + config.TestResponse = "0x3446b949c3d214fba7e61c9cf127eac6cd0b2983564cf76be618099879b6f1e1"; var sendTransaction = Evm.SendTransaction(web3, SendToAddress); @@ -233,7 +234,7 @@ public IEnumerator TestSendTransaction() Assert.IsTrue(sendTransaction.IsCompletedSuccessfully); - Assert.AreEqual(sendTransaction.Result, config.TestResponse); + Assert.AreEqual(config.TestResponse, sendTransaction.Result); } [UnityTest] @@ -241,7 +242,7 @@ public IEnumerator TestSha3() { var sha3 = Evm.Sha3("It’s dangerous to go alone, take this!"); - Assert.AreEqual(sha3, "45760485edafabcbb28570e7da5ddda4639abb4794de9af6de1d6669cbf220fc"); + Assert.AreEqual("45760485edafabcbb28570e7da5ddda4639abb4794de9af6de1d6669cbf220fc", sha3); yield return null; } @@ -250,7 +251,7 @@ public IEnumerator TestSha3() public IEnumerator TestSignMessage() { config.TestResponse = - "0x87dfaa646f476ca53ba8b6e8d122839571e52866be0984ec0497617ad3e988b7401c6b816858df27625166cb98a688f99ba92fa593da3c86c78b19c78c1f51cc1c"; + "0xda2880dde86b7d870ac9ddfa690010bed8a679350415f8e9cce02d87bac91651081c40455538bce7a18792e3f2ea56457183e8dba8568f3a92785ab0d743ce0b1b"; var signMessage = Evm.SignMessage(web3,"The right man in the wrong place can make all the difference in the world."); @@ -260,15 +261,15 @@ public IEnumerator TestSignMessage() Assert.IsTrue(signMessage.IsCompletedSuccessfully); - Assert.AreEqual(signMessage.Result, config.TestResponse); + Assert.AreEqual(config.TestResponse, signMessage.Result); } [UnityTest] public IEnumerator TestSignVerify() { config.TestResponse = - "0x5c996d43c2e804a0d0de7f8b07cc660bbae638aa7ea137df6156621abe5e1fbb1727ebb06f7e0067537cb0f942825fa15ead9dea6d74e4d17fa6e69007cb59561c"; - + "0xda2880dde86b7d870ac9ddfa690010bed8a679350415f8e9cce02d87bac91651081c40455538bce7a18792e3f2ea56457183e8dba8568f3a92785ab0d743ce0b1b"; + var signVerify = Evm.SignVerify(web3, "A man chooses, a slave obeys."); yield return new WaitUntil(() => signVerify.IsCompleted); @@ -277,13 +278,13 @@ public IEnumerator TestSignVerify() Assert.IsTrue(signVerify.IsCompletedSuccessfully); - Assert.AreEqual(signVerify.Result, true); + Assert.AreEqual(true, signVerify.Result); } [UnityTest] public IEnumerator TestMintErc20() { - config.TestResponse = "0xd3027fbfd9d5ddb5ea0ef75f5b128581d9268ad67728d150657f915c8910f9f0"; + config.TestResponse = "0xbcff4755f1736b8ddfedb6d88fa6fbea5630fcc7e2f4b6e88da6ad19eb1fcaa6"; var mint20 = Erc20.MintErc20(web3, Mint20Contract, Mint20ToAccount, Mint20Amount); @@ -292,14 +293,16 @@ public IEnumerator TestMintErc20() if (mint20.Exception != null) throw mint20.Exception; Assert.IsTrue(mint20.IsCompletedSuccessfully); + + Debug.Log(mint20.Result); - Assert.AreEqual(mint20.Result, string.Empty); + Assert.AreEqual(string.Empty, mint20.Result); } [UnityTest] public IEnumerator TestMintErc721() { - config.TestResponse = "0xd3027fbfd9d5ddb5ea0ef75f5b128581d9268ad67728d150657f915c8910f9f0"; + config.TestResponse = "0xe4ff82c87784590c747ee8528506168f8a3165c8e6980f77e388f9a521f9d6bc"; var mint721 = Erc721.MintErc721(web3, Mint721Abi, Mint721Contract, Mint721Uri); @@ -308,14 +311,16 @@ public IEnumerator TestMintErc721() if (mint721.Exception != null) throw mint721.Exception; Assert.IsTrue(mint721.IsCompletedSuccessfully); + + Debug.Log(mint721.Result); - Assert.AreEqual(mint721.Result, string.Empty); + Assert.AreEqual(string.Empty, mint721.Result); } [UnityTest] public IEnumerator TestMintErc1155() { - config.TestResponse = "0xd3027fbfd9d5ddb5ea0ef75f5b128581d9268ad67728d150657f915c8910f9f0"; + config.TestResponse = "0xae4160283393f81033e5ff17b2f2732b27e7db21fd3a0eba064dffc01688861c"; var mint1155 = Erc1155.MintErc1155(web3, Mint1155Abi, Mint1155Contract, Mint1155Id, Mint1155Amount); @@ -324,55 +329,63 @@ public IEnumerator TestMintErc1155() if (mint1155.Exception != null) throw mint1155.Exception; Assert.IsTrue(mint1155.IsCompletedSuccessfully); + + Debug.Log(mint1155.Result); - Assert.AreEqual(mint1155.Result, string.Empty); + Assert.AreEqual(string.Empty, mint1155.Result); } [UnityTest] - public IEnumerator TestTransferErc721() + public IEnumerator TestTransferErc20() { - config.TestResponse = "0x0e292ae8c5ab005d87581f32fd791e1b18b0cfa944d6877b41edbdb740ee8586"; + config.TestResponse = "0x5d00d99c01cd8cc42e1ecc0f7597ab4a9875a3a28ceea3b61fc29607b6c49293"; - var transferErc721 = Erc721.TransferErc721(web3, TransferErc721ContractAddress, SendToAddress, 0); + var transferErc20 = Erc20.TransferErc20(web3, TransferErc20ContractAddress, SendToAddress, TransferErc20Amount); - yield return new WaitUntil(() => transferErc721.IsCompleted); + yield return new WaitUntil(() => transferErc20.IsCompleted); - if (transferErc721.Exception != null) throw transferErc721.Exception; + if (transferErc20.Exception != null) throw transferErc20.Exception; - Assert.IsTrue(transferErc721.IsCompletedSuccessfully); + Assert.IsTrue(transferErc20.IsCompletedSuccessfully); + + Debug.Log(transferErc20.Result); - Assert.AreEqual(transferErc721.Result, string.Empty); + Assert.AreEqual(new object[] { false }, transferErc20.Result); } [UnityTest] - public IEnumerator TestTransferErc1155() + public IEnumerator TestTransferErc721() { - config.TestResponse = "0xb018a043ac0affe05159a53daa8656dbbad61c839eaf89622d7813226f222876"; + config.TestResponse = "0xee15948660ad815b376131f5cccae4ce0578fb6bd96d4c4f5c3fa7bae172a5bb"; - var transferErc1155 = Erc1155.TransferErc1155(web3, TransferErc1155ContractAddress, 101, 1, SendToAddress); + var transferErc721 = Erc721.TransferErc721(web3, TransferErc721ContractAddress, SendToAddress, Transfer721Id); - yield return new WaitUntil(() => transferErc1155.IsCompleted); + yield return new WaitUntil(() => transferErc721.IsCompleted); - if (transferErc1155.Exception != null) throw transferErc1155.Exception; + if (transferErc721.Exception != null) throw transferErc721.Exception; - yield return new WaitUntil(() => transferErc1155.IsCompletedSuccessfully); + Assert.IsTrue(transferErc721.IsCompletedSuccessfully); + + Debug.Log(transferErc721.Result); - Assert.AreEqual(transferErc1155.Result, string.Empty); + Assert.AreEqual(string.Empty, transferErc721.Result); } [UnityTest] - public IEnumerator TestTransferErc20() + public IEnumerator TestTransferErc1155() { - config.TestResponse = "0xba90b6fb8cbee5fd0ad423cc74bb4a365bb88b260601933aac86b947945c5465"; + config.TestResponse = "0x95ad5385b189a7f3059412db5e720a7beeef4a20b48a87f4974b8d9ff9bfb56d"; - var transferErc20 = Erc20.TransferErc20(web3, TransferErc20ContractAddress, SendToAddress, 1000000000000000); + var transferErc1155 = Erc1155.TransferErc1155(web3, TransferErc1155ContractAddress, Transfer1155Id, Transfer1155Amount, SendToAddress); - yield return new WaitUntil(() => transferErc20.IsCompleted); + yield return new WaitUntil(() => transferErc1155.IsCompleted); - if (transferErc20.Exception != null) throw transferErc20.Exception; + if (transferErc1155.Exception != null) throw transferErc1155.Exception; - Assert.IsTrue(transferErc20.IsCompletedSuccessfully); + yield return new WaitUntil(() => transferErc1155.IsCompletedSuccessfully); + + Debug.Log(transferErc1155.Result); - Assert.AreEqual(transferErc20.Result, new object[] { false }); + Assert.AreEqual(string.Empty, transferErc1155.Result); } } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs index 329033b47..f07ac6c0c 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs @@ -26,8 +26,8 @@ public virtual IEnumerator Setup() var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { - projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "5", - "Ethereum", "Goerli", "Geth", "https://goerli.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); + projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", + "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } var web3Builder = new Web3Builder(projectConfigScriptableObject).Configure(services => @@ -40,7 +40,7 @@ public virtual IEnumerator Setup() { // set wallet to testing Testing = true, - TestWalletAddress = "0x55ffe9E30347266f02b9BdAe20aD3a86493289ea", + TestWalletAddress = "0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44", }; services.UseWalletConnect(config); diff --git a/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity b/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity new file mode 100644 index 000000000..0547b8542 --- /dev/null +++ b/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity @@ -0,0 +1,125 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} diff --git a/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta b/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta new file mode 100644 index 000000000..54bfd5af8 --- /dev/null +++ b/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: a364d2c30a99ddc4b8a69988117ea27d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity b/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity new file mode 100644 index 000000000..0547b8542 --- /dev/null +++ b/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity @@ -0,0 +1,125 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} diff --git a/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta b/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta new file mode 100644 index 000000000..394e59633 --- /dev/null +++ b/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 36312d79c884c8f47b1e32bd9820da6e +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity b/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity new file mode 100644 index 000000000..0547b8542 --- /dev/null +++ b/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity @@ -0,0 +1,125 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!29 &1 +OcclusionCullingSettings: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_OcclusionBakeSettings: + smallestOccluder: 5 + smallestHole: 0.25 + backfaceThreshold: 100 + m_SceneGUID: 00000000000000000000000000000000 + m_OcclusionCullingData: {fileID: 0} +--- !u!104 &2 +RenderSettings: + m_ObjectHideFlags: 0 + serializedVersion: 9 + m_Fog: 0 + m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} + m_FogMode: 3 + m_FogDensity: 0.01 + m_LinearFogStart: 0 + m_LinearFogEnd: 300 + m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} + m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} + m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} + m_AmbientIntensity: 1 + m_AmbientMode: 3 + m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} + m_SkyboxMaterial: {fileID: 0} + m_HaloStrength: 0.5 + m_FlareStrength: 1 + m_FlareFadeSpeed: 3 + m_HaloTexture: {fileID: 0} + m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} + m_DefaultReflectionMode: 0 + m_DefaultReflectionResolution: 128 + m_ReflectionBounces: 1 + m_ReflectionIntensity: 1 + m_CustomReflection: {fileID: 0} + m_Sun: {fileID: 0} + m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} + m_UseRadianceAmbientProbe: 0 +--- !u!157 &3 +LightmapSettings: + m_ObjectHideFlags: 0 + serializedVersion: 12 + m_GIWorkflowMode: 1 + m_GISettings: + serializedVersion: 2 + m_BounceScale: 1 + m_IndirectOutputScale: 1 + m_AlbedoBoost: 1 + m_EnvironmentLightingMode: 0 + m_EnableBakedLightmaps: 0 + m_EnableRealtimeLightmaps: 0 + m_LightmapEditorSettings: + serializedVersion: 12 + m_Resolution: 2 + m_BakeResolution: 40 + m_AtlasSize: 1024 + m_AO: 0 + m_AOMaxDistance: 1 + m_CompAOExponent: 1 + m_CompAOExponentDirect: 0 + m_ExtractAmbientOcclusion: 0 + m_Padding: 2 + m_LightmapParameters: {fileID: 0} + m_LightmapsBakeMode: 1 + m_TextureCompression: 1 + m_FinalGather: 0 + m_FinalGatherFiltering: 1 + m_FinalGatherRayCount: 256 + m_ReflectionCompression: 2 + m_MixedBakeMode: 2 + m_BakeBackend: 1 + m_PVRSampling: 1 + m_PVRDirectSampleCount: 32 + m_PVRSampleCount: 512 + m_PVRBounces: 2 + m_PVREnvironmentSampleCount: 256 + m_PVREnvironmentReferencePointCount: 2048 + m_PVRFilteringMode: 1 + m_PVRDenoiserTypeDirect: 1 + m_PVRDenoiserTypeIndirect: 1 + m_PVRDenoiserTypeAO: 1 + m_PVRFilterTypeDirect: 0 + m_PVRFilterTypeIndirect: 0 + m_PVRFilterTypeAO: 0 + m_PVREnvironmentMIS: 1 + m_PVRCulling: 1 + m_PVRFilteringGaussRadiusDirect: 1 + m_PVRFilteringGaussRadiusIndirect: 5 + m_PVRFilteringGaussRadiusAO: 2 + m_PVRFilteringAtrousPositionSigmaDirect: 0.5 + m_PVRFilteringAtrousPositionSigmaIndirect: 2 + m_PVRFilteringAtrousPositionSigmaAO: 1 + m_ExportTrainingData: 0 + m_TrainingDataDestination: TrainingData + m_LightProbeSampleCountMultiplier: 4 + m_LightingDataAsset: {fileID: 0} + m_LightingSettings: {fileID: 0} +--- !u!196 &4 +NavMeshSettings: + serializedVersion: 2 + m_ObjectHideFlags: 0 + m_BuildSettings: + serializedVersion: 2 + agentTypeID: 0 + agentRadius: 0.5 + agentHeight: 2 + agentSlope: 45 + agentClimb: 0.4 + ledgeDropHeight: 0 + maxJumpAcrossDistance: 0 + minRegionArea: 2 + manualCellSize: 0 + cellSize: 0.16666667 + manualTileSize: 0 + tileSize: 256 + accuratePlacement: 0 + maxJobWorkers: 0 + preserveTilesOutsideBounds: 0 + debug: + m_Flags: 0 + m_NavMeshData: {fileID: 0} diff --git a/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta b/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta new file mode 100644 index 000000000..9f80a3223 --- /dev/null +++ b/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 3d5877ddfaf69354c97f913ff0027a5d +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 23f9fa380..8a1af0646 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -27,7 +27,7 @@ public class EvmCalls : MonoBehaviour # region Contract Send private string methodSend = "addTotal"; - private string contractAddressSend = "0x7286Cf0F6E80014ea75Dbc25F545A3be90F4904F"; + private string contractAddressSend = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; private int increaseAmountSend = 1; #endregion diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index c1c8b2f04..841d7ec6e 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -13,19 +13,19 @@ public class Erc20Calls : MonoBehaviour #region Balance Of - private string contractBalanceOf = "0x3E0C0447e47d49195fbE329265E330643eB42e6f"; + private string contractBalanceOf = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion #region Custom Balance Of - private string contractToken = "0x714d32fA722461A2c8F0b4EB98ff5cFF8F908Df2"; + private string contractToken = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; #endregion #region Native Balance Of - private string accountNativeBalanceOf = "0xaBed4239E4855E120fDA34aDBEABDd2911626BA1"; + private string accountNativeBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion @@ -38,7 +38,7 @@ public class Erc20Calls : MonoBehaviour #region Transfer private const string toAccount = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; - private string contractTransfer = "0xc778417e063141139fce010982780140aa0cd5ab"; + private string contractTransfer = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; private BigInteger amountTransfer = 1000000000000000; #endregion diff --git a/src/UnitySampleProject/Assets/walletconnect.json b/src/UnitySampleProject/Assets/walletconnect.json new file mode 100644 index 000000000..b3bdfc4ba --- /dev/null +++ b/src/UnitySampleProject/Assets/walletconnect.json @@ -0,0 +1 @@ +{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Object, mscorlib]], mscorlib","wc@2:core:0.3//keychain":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]], mscorlib","client_ed25519_seed":"811b5dc560f97acf870ab4c1ead8d5f8f483d0d69f7ffde381af448d6440d74b","eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e":"2d3f71f75076ca88c2b046c733a4b89521b6f3be742110d387c4c7e85284def5","ce15eada277f997bcd8f37f88991e22085791fb95efd439089a0ad66703ace17":"489035dd80a5adc7bb210f5d090d8541f41f5b16bbf25e21e31cec12e1add977","c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2":"ca4ea08ced683f57a73c030dceb89122a969d18050b1f39f50c7f1a650f1b8f0","9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259":"30a1e2aa20d58c60b260fd30a1271b0a9b551aa974f36550991e3db8670c724d","05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861":"095b67d80ab0ab4c71bd040c44870245596ceea053bdb5b0a315b848b900b594"},"wc@2:core:0.3//Web3.Unity-core-expirer":{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"topic:eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","expiry":1699771422},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"id:1699771123171597","expiry":1699771423},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"topic:c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","expiry":1702363163},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"id:1699771156309657","expiry":1699771456},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"topic:05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","expiry":1700375962}]},"wc@2:core:0.3//Web3.Unity-core-pairing":{"$type":"WalletConnectSharp.Core.Models.Pairing.PairingStruct[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Pairing.PairingStruct, WalletConnectSharp.Core","topic":"eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","expiry":1699771422,"relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"active":false,"peerMetadata":null},{"$type":"WalletConnectSharp.Core.Models.Pairing.PairingStruct, WalletConnectSharp.Core","topic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","expiry":1702363163,"relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"active":true,"peerMetadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"MetaMask Wallet","description":"MetaMask Wallet Integration","url":"https://metamask.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"metamask://","universal":"https://metamask.app.link/"},"verifyUrl":null}}]},"wc@2:core:0.3//Web3.Unity-core-relayer-subscription":{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription, WalletConnectSharp.Core","id":"dc5c1f13f3bbcb965e1e4838976979696bb54ae78b8fc38b98ddac64ca514392","topic":"eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}},{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription, WalletConnectSharp.Core","id":"25f6b5b55adceb6672d9341fb62f00b91133a0c0a8b4a0b26c44c11923961006","topic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}},{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription, WalletConnectSharp.Core","id":"eb8e8da92189a96849ee47f8f87219fcf4716cfdcff4f507e2a7059d2d80e45f","topic":"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}}]},"wc@2:core:0.3//Web3.Unity-core-history-of-type-WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose-WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse":{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign],[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]][], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign],[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Core","id":1699771123171597,"topic":"eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","request":{"$type":"WalletConnectSharp.Network.Models.JsonRpcRequest`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign]], WalletConnectSharp.Network","method":"wc_sessionPropose","params":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign","relays":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}]},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"optionalNamespaces":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign]], mscorlib"},"sessionProperties":null,"proposer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"ce15eada277f997bcd8f37f88991e22085791fb95efd439089a0ad66703ace17","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}}},"id":1699771123171597,"jsonrpc":"2.0"},"response":{"$type":"WalletConnectSharp.Network.Models.JsonRpcResponse`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Network","id":1699771123171597,"jsonrpc":"2.0","error":{"$type":"WalletConnectSharp.Network.Models.Error, WalletConnectSharp.Network","code":5002,"message":"User rejected methods.","data":null}},"chainId":null},{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign],[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Core","id":1699771156309657,"topic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","request":{"$type":"WalletConnectSharp.Network.Models.JsonRpcRequest`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign]], WalletConnectSharp.Network","method":"wc_sessionPropose","params":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign","relays":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}]},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"optionalNamespaces":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign]], mscorlib"},"sessionProperties":null,"proposer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}}},"id":1699771156309657,"jsonrpc":"2.0"},"response":{"$type":"WalletConnectSharp.Network.Models.JsonRpcResponse`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Network","id":1699771156309657,"jsonrpc":"2.0","result":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"responderPublicKey":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452"}},"chainId":null}]},"wc@2:client0.3//Web3.Unity-core-proposal":{"$type":"WalletConnectSharp.Sign.Models.ProposalStruct[], WalletConnectSharp.Sign","$values":[{"$type":"WalletConnectSharp.Sign.Models.ProposalStruct, WalletConnectSharp.Sign","id":1699771156309657,"expiry":1699771456,"relays":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}]},"proposer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"optionalNamespaces":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign]], mscorlib"},"sessionProperties":null,"pairingTopic":null}]},"wc@2:core:0.3//Web3.Unity-core-messages":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core]], mscorlib","eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e":{"$type":"WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core","313c1f2a2fd8759cbf48796e644cad2fda759f279a63996a238208ac0d6f7a0f":"AAXHxYBce4IJuacxsj2PKL4QDHnhkecc+jRPVM7bubbcKL7XsO8AkdB/qoDLygqZR+m8+7xh2xKkaZLCX4KNBjwZ3hYI0DDSAp4mPv30yqQBiu0hFnnPDEQL+gKDa6MWMni6ywMbZtFvYSK5eSiwsI40v4TChMCZVcLU799ygTOcBwkMitNsMKnHKvB785tn1tDSyYJSscuM6n4vJVX4aosTmQ1NdkVRc4S75U0co2cAUdVgyt5OIqEDq/5ALKYjUAXzS0jZhm/lKSEGj+VH2RGiqixIGaniQGueygOJ+V+XWJviYNB6fcEyYFd5kuMDx0Z90DhpNbGz/6N1erqJlopO/dq/mW20bcohG0dGUHi3PQqgxEXnB4+CV81kpYbOKJ9/LC4bcDw8kiRI98yeq00yFRwtkxrWn9V/HOQjCwb9HhkGzdPXaCQwqceCMAbFu0CZ3eqQt49q5VlW8H4xUcNNU6mLxSiURxXm1q5tFAajWTw9NlRlaz/Svcp4dOoy8qmtp4AQzb2ovwzfZYhhqHqCm0fxPeDeEVfwwdEga/fXtM+pjztN7damYZj42q/asawsiw3IsO8/mdSR7Xe/yjcxbW9xV6BSACXJsIywnjvw4ex5mvwBb3Q6yxBrfTIdt+OShNp/lXc5lcMYrYht6HG2TsUumuMtGEUm5O4oaYuu1G5+EaOK56X7wFODL3bwPPRxo4fhWvYky70U5fbiPJqhc8vs8kyqlbcdH+Cmx2TE9auqx5llqDSnHNxnYTliw0v3zgFLESdDscppxC4VAJ6ITZI0gWg9psIWDkKTp9QB6QNENzJ58R6plGg3N/Ef5ji8Fn6FMUDP05gpaB1UEuLu9aKTRQA8/w74Gku4/VMocojY6QZ6cUJlOgtbrXgTdjy2VuAAUfW8osoPxkjF7oRCOg+cmbdQ9ZK4Nj+1KUGNVu+PpwWQu8yWrobyK8k19OvANwXNbCSMIMdG+cpDJW+GRHhYTIqgJfYXyrcM6Pw4ebKasaG/8l8AD9i39/6UBC04PAyxlD+HYV0/kZeqChVhrC5S6P6bb/jlD1juj3rcMLyBhCzrSdco2yf3MBUO/QrfTRNcYIVo2ckrujrHoygD1RmP05LIP7SynxcjyAiuD0Dkm5wqGs7y5OpnWZ8auKq/r5rJGIZYvcD6hjIxjnJKa0i8nlgxwRlwfifYzFazoafZOIkDeLEc3Ul+D/4xsiBiSSUnDhBD8rewoTSBp65AC68ZfRvRlL1M1EQ/K4W1gHmPt4WNIm5XOINRwsKekuj2WZT2+T6BfQvhCnkgsiQ/ly2USCBCG/1BlUIKdm3VkVpEN1V5Srd1D17YlB9ABpa0qCX3Dc6rAVGtlwjiskMlL7ulXQqDyaZdZkTzVtkjRK0hR0AeiB/g6jSQS8cuxVkd7ZmdyiGZ+6MkO4tUExrw9LLTfXqTVE9UDjkaFJb0LOA8GgO6eJ0wsjZshlj2MYIWD0GwsSwOBmKIBUM+","2211c830acb11b9312f9aac84c7697303e9ed4d1e116d01d425e9e8c08371a73":"AP4StmP5gZyNDM1arqBGczPUzsTnRh6Jo0YQXQtwF/BouCPn8iZvExY9IX5A6zH+xtoCpnz+HsaBFroeLuuvgG1mpDJzdGZ3X53yIucRBNoeSkU58cQ18tne+ZK8tpwDbKnYFG1CLz81Ypb3TPzc/tQwoL64EFWLo5cvLk8="},"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2":{"$type":"WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core","f964803ee771ec2864d7355d6fe0b6da3b96f86971e0646e8d8cd18b9ab2c733":"AIrHn6wJklM1IW8oraKFnSviGb5b/feKVtdkbmsHCglRWXfPQ71hpdwCatJQiszJH00pDyDL4RtIqoNcdzLN1yPlTywfrmDChYQ5S74EsDrM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r0CMdIKNzNQ5cUVSKQPiuTifj64fnL5dn18MUGLNQqwKst8SEQaRZ2OF1ee/+YLi9ZMe+HMYLKQZCjkXnYZkXc41cpHTjWUywypz/FWMpWWfV1rdJrOSzvYB27u/JnVvkTWGiekIgQgc2jYEWqb4HM65tgtnugI9RRpsbpmSL1cpS13iLiL2ILwbWUXVvLPYgsc5Cz/07xeRQpTCCPrWLOvZtm4g37pmezlH1+08Rn/0HhbETNN/oqVi3rHH0rIQvK/S9Z10L/7I/vGbRH4RNIq8rDcJHqGiB1Ik9H","71c5d760e7b872362fe7cbda7708f0079928993c44d3cfbaba5d1c12192f8dea":"AIYt6fzSdB40WTgA1FDDE7Yny/qYiOmVErLxGjwqUGcXQM2jLZyBa6gXLVRR9Gfb3+iFU1w96UpsXuFmr/YIZL9fiuZsIFKQsmrM1144iuih7vLDnIeOyKLaUM1cEYUGG27etEFz0KFMzm1LutvKui5AnDA3Kt07prV/U2eZIaCmnRJWlFAHVZOqFEVQh0mPls2m02ORKaYzDs6bjet9RVB4NdbnB8jcB3A5J7FXgnvxa+ttLLmxWITIQlbXSAzUAhw="},"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861":{"$type":"WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core","10fbea7d66b50c6b0625d14566959684ee111f5fc70c3060c874c33933b96fc3":"ALcazKytwR26kaVbv89A5vKLnTc4/jEBF0flkjdN5FwfaqWoqOreLeQf2fvG2WolxSASgZ151pjNty83YxCcODDiAMYP5sm26qwRaRML/Xk7WcUgRLED610SBZoDaMUTSFSJPmv+8gQBsBllfrVNoOAJJ4XQ2H8KM5qhn3CzfFcsi6uFS+0xBOF/9q2XtSNaSIucaZYftB7vBrmYNhzbQui95bIdsHg5tBTYm+N/6W1o2YgX+W4EpFfpwdYsLXdzSiZRGFrc9LE669cM0tUwYMT0I61KMtANAS+UameWdq+FPa9d2sMEFTZO5eqlXNJV3ZV7rndoQ3JZO/p3JFFC0uj9mcz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"ABm0kE0i7PJRtxA1bORJUQsV/ZsP9LywdcgGRdNyRuQ8k0zUzp+HWNjtzxXDuv6CLHkue5V5IgfyC4WDDhmItiOurtSwLwtkXoVQWOLGQ9giLg=="}},"wc@2:core:0.3//Web3.Unity-core-history-of-type-WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle-System.Boolean":{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign],[System.Boolean, mscorlib]][], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign],[System.Boolean, mscorlib]], WalletConnectSharp.Core","id":1699771162238431,"topic":"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","request":{"$type":"WalletConnectSharp.Network.Models.JsonRpcRequest`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign]], WalletConnectSharp.Network","method":"wc_sessionSettle","params":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign","pairingTopic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"namespaces":{"$type":"WalletConnectSharp.Sign.Models.Namespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.Namespace, WalletConnectSharp.Sign","accounts":{"$type":"System.String[], mscorlib","$values":["eip155:11155111:0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]},"chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]}}},"expiry":1700375962,"controller":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"MetaMask Wallet","description":"MetaMask Wallet Integration","url":"https://metamask.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"metamask://","universal":"https://metamask.app.link/"},"verifyUrl":null}}},"id":1699771162238431,"jsonrpc":"2.0"},"response":{"$type":"WalletConnectSharp.Network.Models.JsonRpcResponse`1[[System.Boolean, mscorlib]], WalletConnectSharp.Network","id":1699771162238431,"jsonrpc":"2.0","result":true},"chainId":null}]},"wc@2:client0.3//Web3.Unity-core-session":{"$type":"WalletConnectSharp.Sign.Models.SessionStruct[], WalletConnectSharp.Sign","$values":[{"$type":"WalletConnectSharp.Sign.Models.SessionStruct, WalletConnectSharp.Sign","topic":"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","pairingTopic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"expiry":1700375962,"acknowledged":true,"controller":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452","namespaces":{"$type":"WalletConnectSharp.Sign.Models.Namespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.Namespace, WalletConnectSharp.Sign","accounts":{"$type":"System.String[], mscorlib","$values":["eip155:11155111:0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]},"chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]}}},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"self":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}},"peer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"MetaMask Wallet","description":"MetaMask Wallet Integration","url":"https://metamask.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"metamask://","universal":"https://metamask.app.link/"},"verifyUrl":null}}}]}} \ No newline at end of file diff --git a/src/UnitySampleProject/Assets/walletconnect.json.meta b/src/UnitySampleProject/Assets/walletconnect.json.meta new file mode 100644 index 000000000..b7557c6e1 --- /dev/null +++ b/src/UnitySampleProject/Assets/walletconnect.json.meta @@ -0,0 +1,7 @@ +fileFormatVersion: 2 +guid: 2488da8dcd6d83d4295eb5a2736b17f9 +TextScriptImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: From 1d192d034e1ddf6dff84a215eee0c0d5303a4249 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 15:08:24 +0800 Subject: [PATCH 02/44] almost all passing almost all passing --- .../Tests/Runtime/EvmTests.cs | 18 ++++++++++++++++++ .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 2 +- .../Assets/walletconnect.json | 1 - .../Assets/walletconnect.json.meta | 7 ------- 4 files changed, 19 insertions(+), 9 deletions(-) delete mode 100644 src/UnitySampleProject/Assets/walletconnect.json delete mode 100644 src/UnitySampleProject/Assets/walletconnect.json.meta diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index b499a1d0a..a0fb93922 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -13,6 +13,8 @@ public class EvmTests : SampleTestsBase private const string ContractSendMethod = "addTotal"; private const int IncreaseAmount = 1; + private const string ContractCallMethod = "myTotal"; + private const string CallAmount = "1"; private const string Abi = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; private const string ContractAddress = "0xCb0FdD2837a61d7c39ce0fbF56403Db601CAeFd4"; @@ -83,6 +85,22 @@ public override IEnumerator Setup() web3 = web3Result; } + + [UnityTest] + public IEnumerator TestContractCall() + { + object[] args = { config.TestWalletAddress }; + + var callContract = Evm.ContractCall(web3, ContractCallMethod, Abi, ContractAddress, args); + + yield return new WaitUntil(() => callContract.IsCompleted); + + if (callContract.Exception != null) throw callContract.Exception; + + Assert.IsTrue(callContract.IsCompletedSuccessfully); + + Assert.AreEqual(CallAmount, callContract.Result[0].ToString()); + } [UnityTest] public IEnumerator TestContractSend() diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 8a1af0646..04fd54ab0 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -35,7 +35,7 @@ public class EvmCalls : MonoBehaviour #region Contract Call private string methodCall = "myTotal"; - private string contractAddressCall = "0xC71d13c40B4fE7e2c557eBAa12A0400dd4Df76C9"; + private string contractAddressCall = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; #endregion diff --git a/src/UnitySampleProject/Assets/walletconnect.json b/src/UnitySampleProject/Assets/walletconnect.json deleted file mode 100644 index b3bdfc4ba..000000000 --- a/src/UnitySampleProject/Assets/walletconnect.json +++ /dev/null @@ -1 +0,0 @@ -{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.Object, mscorlib]], mscorlib","wc@2:core:0.3//keychain":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]], mscorlib","client_ed25519_seed":"811b5dc560f97acf870ab4c1ead8d5f8f483d0d69f7ffde381af448d6440d74b","eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e":"2d3f71f75076ca88c2b046c733a4b89521b6f3be742110d387c4c7e85284def5","ce15eada277f997bcd8f37f88991e22085791fb95efd439089a0ad66703ace17":"489035dd80a5adc7bb210f5d090d8541f41f5b16bbf25e21e31cec12e1add977","c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2":"ca4ea08ced683f57a73c030dceb89122a969d18050b1f39f50c7f1a650f1b8f0","9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259":"30a1e2aa20d58c60b260fd30a1271b0a9b551aa974f36550991e3db8670c724d","05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861":"095b67d80ab0ab4c71bd040c44870245596ceea053bdb5b0a315b848b900b594"},"wc@2:core:0.3//Web3.Unity-core-expirer":{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"topic:eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","expiry":1699771422},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"id:1699771123171597","expiry":1699771423},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"topic:c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","expiry":1702363163},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"id:1699771156309657","expiry":1699771456},{"$type":"WalletConnectSharp.Core.Models.Expirer.Expiration, WalletConnectSharp.Core","target":"topic:05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","expiry":1700375962}]},"wc@2:core:0.3//Web3.Unity-core-pairing":{"$type":"WalletConnectSharp.Core.Models.Pairing.PairingStruct[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Pairing.PairingStruct, WalletConnectSharp.Core","topic":"eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","expiry":1699771422,"relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"active":false,"peerMetadata":null},{"$type":"WalletConnectSharp.Core.Models.Pairing.PairingStruct, WalletConnectSharp.Core","topic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","expiry":1702363163,"relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"active":true,"peerMetadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"MetaMask Wallet","description":"MetaMask Wallet Integration","url":"https://metamask.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"metamask://","universal":"https://metamask.app.link/"},"verifyUrl":null}}]},"wc@2:core:0.3//Web3.Unity-core-relayer-subscription":{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription, WalletConnectSharp.Core","id":"dc5c1f13f3bbcb965e1e4838976979696bb54ae78b8fc38b98ddac64ca514392","topic":"eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}},{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription, WalletConnectSharp.Core","id":"25f6b5b55adceb6672d9341fb62f00b91133a0c0a8b4a0b26c44c11923961006","topic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}},{"$type":"WalletConnectSharp.Core.Models.Subscriber.ActiveSubscription, WalletConnectSharp.Core","id":"eb8e8da92189a96849ee47f8f87219fcf4716cfdcff4f507e2a7059d2d80e45f","topic":"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}}]},"wc@2:core:0.3//Web3.Unity-core-history-of-type-WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose-WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse":{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign],[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]][], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign],[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Core","id":1699771123171597,"topic":"eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e","request":{"$type":"WalletConnectSharp.Network.Models.JsonRpcRequest`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign]], WalletConnectSharp.Network","method":"wc_sessionPropose","params":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign","relays":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}]},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"optionalNamespaces":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign]], mscorlib"},"sessionProperties":null,"proposer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"ce15eada277f997bcd8f37f88991e22085791fb95efd439089a0ad66703ace17","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}}},"id":1699771123171597,"jsonrpc":"2.0"},"response":{"$type":"WalletConnectSharp.Network.Models.JsonRpcResponse`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Network","id":1699771123171597,"jsonrpc":"2.0","error":{"$type":"WalletConnectSharp.Network.Models.Error, WalletConnectSharp.Network","code":5002,"message":"User rejected methods.","data":null}},"chainId":null},{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign],[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Core","id":1699771156309657,"topic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","request":{"$type":"WalletConnectSharp.Network.Models.JsonRpcRequest`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign]], WalletConnectSharp.Network","method":"wc_sessionPropose","params":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionPropose, WalletConnectSharp.Sign","relays":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}]},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"optionalNamespaces":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign]], mscorlib"},"sessionProperties":null,"proposer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}}},"id":1699771156309657,"jsonrpc":"2.0"},"response":{"$type":"WalletConnectSharp.Network.Models.JsonRpcResponse`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign]], WalletConnectSharp.Network","id":1699771156309657,"jsonrpc":"2.0","result":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionProposeResponse, WalletConnectSharp.Sign","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"responderPublicKey":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452"}},"chainId":null}]},"wc@2:client0.3//Web3.Unity-core-proposal":{"$type":"WalletConnectSharp.Sign.Models.ProposalStruct[], WalletConnectSharp.Sign","$values":[{"$type":"WalletConnectSharp.Sign.Models.ProposalStruct, WalletConnectSharp.Sign","id":1699771156309657,"expiry":1699771456,"relays":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions[], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"}]},"proposer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"optionalNamespaces":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign]], mscorlib"},"sessionProperties":null,"pairingTopic":null}]},"wc@2:core:0.3//Web3.Unity-core-messages":{"$type":"System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core]], mscorlib","eed2ac6daabad6d21f9feece96f055691474fa5bd0dea5162a44e50a2ac8738e":{"$type":"WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core","313c1f2a2fd8759cbf48796e644cad2fda759f279a63996a238208ac0d6f7a0f":"AAXHxYBce4I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fTRNcYIVo2ckrujrHoygD1RmP05LIP7SynxcjyAiuD0Dkm5wqGs7y5OpnWZ8auKq/r5rJGIZYvcD6hjIxjnJKa0i8nlgxwRlwfifYzFazoafZOIkDeLEc3Ul+D/4xsiBiSSUnDhBD8rewoTSBp65AC68ZfRvRlL1M1EQ/K4W1gHmPt4WNIm5XOINRwsKekuj2WZT2+T6BfQvhCnkgsiQ/ly2USCBCG/1BlUIKdm3VkVpEN1V5Srd1D17YlB9ABpa0qCX3Dc6rAVGtlwjiskMlL7ulXQqDyaZdZkTzVtkjRK0hR0AeiB/g6jSQS8cuxVkd7ZmdyiGZ+6MkO4tUExrw9LLTfXqTVE9UDjkaFJb0LOA8GgO6eJ0wsjZshlj2MYIWD0GwsSwOBmKIBUM+","2211c830acb11b9312f9aac84c7697303e9ed4d1e116d01d425e9e8c08371a73":"AP4StmP5gZyNDM1arqBGczPUzsTnRh6Jo0YQXQtwF/BouCPn8iZvExY9IX5A6zH+xtoCpnz+HsaBFroeLuuvgG1mpDJzdGZ3X53yIucRBNoeSkU58cQ18tne+ZK8tpwDbKnYFG1CLz81Ypb3TPzc/tQwoL64EFWLo5cvLk8="},"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2":{"$type":"WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core","f964803ee771ec2864d7355d6fe0b6da3b96f86971e0646e8d8cd18b9ab2c733":"AIrHn6wJklM1IW8oraKFnSviGb5b/feKVtdkbmsHCglRWXfPQ71hpdwCatJQiszJH00pDyDL4RtIqoNcdzLN1yPlTywfrmDChYQ5S74EsDrM80iQvgbjpuCDJWZGefdBnhwoQYzCI4cQPKCRGq5iOu5zUqBREemRVHms4X0+dLyW6dE6oqWmnnOcp57Uvzerq04PPfsNGknR+k9FddqAdNACvtQpLRjfjDMV4txhCbQ6OPhYIiHn7g/cG5YCDSRU6RmKXsEngRZVuXVNW7y4XytCo/4rbUjORlhHE2q/ma9gxxMjHnQdOT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z/07xeRQpTCCPrWLOvZtm4g37pmezlH1+08Rn/0HhbETNN/oqVi3rHH0rIQvK/S9Z10L/7I/vGbRH4RNIq8rDcJHqGiB1Ik9H","71c5d760e7b872362fe7cbda7708f0079928993c44d3cfbaba5d1c12192f8dea":"AIYt6fzSdB40WTgA1FDDE7Yny/qYiOmVErLxGjwqUGcXQM2jLZyBa6gXLVRR9Gfb3+iFU1w96UpsXuFmr/YIZL9fiuZsIFKQsmrM1144iuih7vLDnIeOyKLaUM1cEYUGG27etEFz0KFMzm1LutvKui5AnDA3Kt07prV/U2eZIaCmnRJWlFAHVZOqFEVQh0mPls2m02ORKaYzDs6bjet9RVB4NdbnB8jcB3A5J7FXgnvxa+ttLLmxWITIQlbXSAzUAhw="},"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861":{"$type":"WalletConnectSharp.Core.Interfaces.MessageRecord, WalletConnectSharp.Core","10fbea7d66b50c6b0625d14566959684ee111f5fc70c3060c874c33933b96fc3":"ALcazKytwR26kaVbv89A5vKLnTc4/jEBF0flkjdN5FwfaqWoqOreLeQf2fvG2WolxSASgZ151pjNty83YxCcODDiAMYP5sm26qwRaRML/Xk7WcUgRLED610SBZoDaMUTSFSJPmv+8gQBsBllfrVNoOAJJ4XQ2H8KM5qhn3CzfFcsi6uFS+0xBOF/9q2XtSNaSIucaZYftB7vBrmYNhzbQui95bIdsHg5tBTYm+N/6W1o2YgX+W4EpFfpwdYsLXdzSiZRGFrc9LE669cM0tUwYMT0I61KMtANAS+UameWdq+FPa9d2sMEFTZO5eqlXNJV3ZV7rndoQ3JZO/p3JFFC0uj9mczFNmOhTy8tUY126u0P4z3ScZ5WcNili044IvHa57Scb0Pjno4y47DeVl2Q3o3IdSI4mo6CYWTfpcsbnSy9Z3T96bfzqNf3lK9hQZU/wcDS6Rq8EtlVBQNn2tylP55W5IJZgI+p9+jsjxBwogJK9MNTGAfRE7YxYMAZqJofSSZYlzFgLDrWMa2IGUHtQlEOIZbPJ64uro65tOX6YKIIZqwSQScXwZ8ZYL+vjU5UPgl0N4WZnVQ8PlHp750sYNXGItxXWFvBbdTc7Ws4zJ2e36D+zgHmzM7zdftSK0+y7M79EJp1wUggad7UekbxCo24xDXoCl+UAWi0OMbLKk7LSSfqFXuXp3WPBal+UTfw9pBnH5z4yVNfvz1uFO2LEnpe4jlp9ivWwTQ/GX+bbfkRt2QInx7Zpz/TU2rsZKB9pcoShobvC+bsCj961zVsbpLg0iKkoSBeKsgD9DNrOCyaoxjaHk2ti6VWjzmoY9TUcVDQhFi5TpQpCYP/YZNWjpLX/1nyEgoq7QNMb21vfgOiL/dJ1ye88MEDM73phYTLdralQhzOstzipZ8omu4oJYK2okavwSsMRkKq+/6lOq8NTOu/LergNB3VMFu3NXrBfmVDpuVJZoGAluF3lFaz0XyTufJ8z5WLgpyxH8SBN7dGXABT2inzhWwNqx0iGyFVrYQw4zGaJvqaa2hd7DqRTWRxLCVSjLuD9AmIRUkqS/ybKCtDcD3luojfJlTnxLNXNiCkvYxQ8RPaP92Yu0hGKLkfI75tr55nXTjlefhrZuulPFqQzPM4qjqstF4lTjWykgxL0mcOOIc0hi95Fzfx2fhiUuCRnOszkgoM/UCb2lh9v/MzB2207HLJ7yEdLbLqznp6aBsxlYCBSqg+CrPLFgGxVMjcLDD23y6srVAJtRvAZiJpk6icm1cneY6500iM78osXGcl/eX72Bi4Mj2VpA9+ax4evaquUuyRb2eyFdpzWcLOIufVAOk01DJjUsLlw99Ej4tjbIiP4wwIkCE87uXoreG5sKCCCFTwiYPvUw==","c0aa85e60050edddfa156925a6042f49c95064ec32899010c28fb657a7f7a2c7":"ABm0kE0i7PJRtxA1bORJUQsV/ZsP9LywdcgGRdNyRuQ8k0zUzp+HWNjtzxXDuv6CLHkue5V5IgfyC4WDDhmItiOurtSwLwtkXoVQWOLGQ9giLg=="}},"wc@2:core:0.3//Web3.Unity-core-history-of-type-WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle-System.Boolean":{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign],[System.Boolean, mscorlib]][], WalletConnectSharp.Core","$values":[{"$type":"WalletConnectSharp.Core.Models.History.JsonRpcRecord`2[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign],[System.Boolean, mscorlib]], WalletConnectSharp.Core","id":1699771162238431,"topic":"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","request":{"$type":"WalletConnectSharp.Network.Models.JsonRpcRequest`1[[WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign]], WalletConnectSharp.Network","method":"wc_sessionSettle","params":{"$type":"WalletConnectSharp.Sign.Models.Engine.Methods.SessionSettle, WalletConnectSharp.Sign","pairingTopic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"namespaces":{"$type":"WalletConnectSharp.Sign.Models.Namespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.Namespace, WalletConnectSharp.Sign","accounts":{"$type":"System.String[], mscorlib","$values":["eip155:11155111:0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]},"chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]}}},"expiry":1700375962,"controller":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"MetaMask Wallet","description":"MetaMask Wallet Integration","url":"https://metamask.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"metamask://","universal":"https://metamask.app.link/"},"verifyUrl":null}}},"id":1699771162238431,"jsonrpc":"2.0"},"response":{"$type":"WalletConnectSharp.Network.Models.JsonRpcResponse`1[[System.Boolean, mscorlib]], WalletConnectSharp.Network","id":1699771162238431,"jsonrpc":"2.0","result":true},"chainId":null}]},"wc@2:client0.3//Web3.Unity-core-session":{"$type":"WalletConnectSharp.Sign.Models.SessionStruct[], WalletConnectSharp.Sign","$values":[{"$type":"WalletConnectSharp.Sign.Models.SessionStruct, WalletConnectSharp.Sign","topic":"05881a764f65a1e72714c589243f3624281fc5db8133e1801c4aaf22d4c53861","pairingTopic":"c6a48dd45de80808ca8d3d3db82c62f8bdcffb89acdb8d9b015ed25f712d87e2","relay":{"$type":"WalletConnectSharp.Core.Models.Relay.ProtocolOptions, WalletConnectSharp.Core","protocol":"irn"},"expiry":1700375962,"acknowledged":true,"controller":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452","namespaces":{"$type":"WalletConnectSharp.Sign.Models.Namespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.Namespace, WalletConnectSharp.Sign","accounts":{"$type":"System.String[], mscorlib","$values":["eip155:11155111:0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]},"chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]}}},"requiredNamespaces":{"$type":"WalletConnectSharp.Sign.Models.RequiredNamespaces, WalletConnectSharp.Sign","eip155":{"$type":"WalletConnectSharp.Sign.Models.ProposedNamespace, WalletConnectSharp.Sign","chains":{"$type":"System.String[], mscorlib","$values":["eip155:11155111"]},"methods":{"$type":"System.String[], mscorlib","$values":["eth_sendTransaction","eth_signTransaction","eth_sign","personal_sign","eth_signTypedData"]},"events":{"$type":"System.String[], mscorlib","$values":["chainChanged","accountsChanged"]}}},"self":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"9abb12797d2fb3048ac31890bb00d85fad365aecd271f39a04431ac4949b9259","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"Web3.Unity","description":"web3.unity is an open-source gaming SDK written in C# and developed by ChainSafe Gaming. It connects games built in the Unity game engine to the blockchain. The library currently supports games built for web browsers (WebGL), iOS/Android mobile, and desktop. web3.unity is compatible with most EVM-based chains such as Ethereum, Polygon, Moonbeam, Cronos, Nervos, and Binance Smart Chain, letting developers easily choose and switch between them to create the best in-game experience.","url":"https://chainsafe.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"","universal":""},"verifyUrl":""}},"peer":{"$type":"WalletConnectSharp.Sign.Models.Participant, WalletConnectSharp.Sign","publicKey":"992460ed3324194ca2f63e30cd56bc4bebe48bacafcdb2b338db74ba4f947452","metadata":{"$type":"WalletConnectSharp.Core.Metadata, WalletConnectSharp.Core","name":"MetaMask Wallet","description":"MetaMask Wallet Integration","url":"https://metamask.io/","icons":{"$type":"System.String[], mscorlib","$values":[]},"redirect":{"$type":"WalletConnectSharp.Core.Models.RedirectData, WalletConnectSharp.Core","native":"metamask://","universal":"https://metamask.app.link/"},"verifyUrl":null}}}]}} \ No newline at end of file diff --git a/src/UnitySampleProject/Assets/walletconnect.json.meta b/src/UnitySampleProject/Assets/walletconnect.json.meta deleted file mode 100644 index b7557c6e1..000000000 --- a/src/UnitySampleProject/Assets/walletconnect.json.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 2488da8dcd6d83d4295eb5a2736b17f9 -TextScriptImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From a0a82d6b50f632bc166420e1b57f465dbb08af07 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 15:53:59 +0800 Subject: [PATCH 03/44] Duplicates removed --- .../Runtime/Scripts/ABI.cs | 17 ---------- .../Runtime/Scripts/ABI.cs.meta | 11 ------- .../Runtime/Scripts/EVM/Token/Erc1155.cs | 18 +++++------ .../Runtime/Scripts/EVM/Token/Erc20.cs | 32 ++++++++----------- .../Runtime/Scripts/EVM/Token/Erc721.cs | 11 +++---- .../Runtime/Scripts/EVM/Token/Methods.cs | 4 ++- .../Runtime/Scripts/EthMethod.cs | 17 ---------- .../Runtime/Scripts/EthMethod.cs.meta | 11 ------- .../Runtime/Scripts/Samples/ABI.cs | 17 ---------- .../Runtime/Scripts/Samples/ABI.cs.meta | 11 ------- .../Runtime/Scripts/Samples/EthMethod.cs | 17 ---------- .../Runtime/Scripts/Samples/EthMethod.cs.meta | 11 ------- .../Scripts/Samples/MultiCallSample.cs | 3 +- .../Scene/Rewards/Erc1155NftRewardFactory.cs | 4 +-- .../Scene/Rewards/Erc1155RewardFactory.cs | 4 +-- .../Scene/Rewards/Erc20RewardFactory.cs | 4 +-- .../Scene/Rewards/Erc721NftRewardFactory.cs | 3 +- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 9 +++--- .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 3 +- .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 1 - .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 1 - 21 files changed, 45 insertions(+), 164 deletions(-) delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs.meta delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs.meta delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs.meta delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs delete mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs.meta diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs deleted file mode 100644 index 117f754ea..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace ChainSafe.Gaming.UnityPackage -{ - public class ABI - { - public const string ERC_20 = - "[ { \"inputs\": [ { \"internalType\": \"string\", \"name\": \"name_\", \"type\": \"string\" }, { \"internalType\": \"string\", \"name\": \"symbol_\", \"type\": \"string\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"subtractedValue\", \"type\": \"uint256\" } ], \"name\": \"decreaseAllowance\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"addedValue\", \"type\": \"uint256\" } ], \"name\": \"increaseAllowance\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"recipient\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"recipient\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; - - public const string ERC_1155 = - "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mintBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - - public const string ERC_721 = - "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - - public const string ADD_TOTAL_ABI = - "[ { \"inputs\": [ { \"internalType\": \"uint8\", \"name\": \"_myArg\", \"type\": \"uint8\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - } -} \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs.meta b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs.meta deleted file mode 100644 index 66e16305e..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/ABI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 249f219a8a2002b46939c72b58456401 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs index c28b9c6c2..cb993322b 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs @@ -6,14 +6,12 @@ using Scripts.EVM.Remote; using UnityEngine; using UnityEngine.Networking; -using EthMethod = ChainSafe.Gaming.UnityPackage.EthMethod; +using Web3Unity.Scripts.Prefabs; namespace Scripts.EVM.Token { public static class Erc1155 { - private static readonly string Abi = ABI.Erc1155; - /// /// Fetches all 1155 Nfts from an account /// @@ -65,8 +63,8 @@ public static async Task BalanceOf(Web3 web3, string contractAddress } private static async Task BalanceOf(Web3 web3, string contractAddress, string account, object[] parameters) { - var contract = web3.ContractBuilder.Build(Abi, contractAddress); - var contractData = await contract.Call(CommonMethod.BalanceOf, parameters); + var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); + var contractData = await contract.Call(EthMethod.BalanceOf, parameters); return BigInteger.Parse(contractData[0].ToString()); } @@ -80,8 +78,8 @@ private static async Task BalanceOf(Web3 web3, string contractAddres /// public static async Task> BalanceOfBatch(Web3 web3, string contractAddress, string[] accounts, string[] tokenIds) { - var contract = web3.ContractBuilder.Build(Abi, contractAddress); - var contractData = await contract.Call(CommonMethod.BalanceOfBatch, new object[] + var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); + var contractData = await contract.Call(EthMethod.BalanceOfBatch, new object[] { accounts, tokenIds @@ -99,13 +97,13 @@ public static async Task> BalanceOfBatch(Web3 web3, string cont public static async Task Uri(Web3 web3, string contractAddress, string tokenId) { const string ipfsPath = "https://ipfs.io/ipfs/"; - var contract = web3.ContractBuilder.Build(Abi, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); if (tokenId.StartsWith("0x")) { string convertUri = tokenId.Replace("0x", "f"); return ipfsPath + convertUri; } - var contractData = await contract.Call(CommonMethod.Uri, new object[] + var contractData = await contract.Call(EthMethod.Uri, new object[] { tokenId }); @@ -124,7 +122,7 @@ public static async Task Uri(Web3 web3, string contractAddress, string t public static async Task MintErc1155(Web3 web3, string abi, string contractAddress, BigInteger id, BigInteger amount) { byte[] dataObject = { }; - const string method = "mint"; + const string method = EthMethod.Mint; var destination = await web3.Signer.GetAddress(); var contract = web3.ContractBuilder.Build(abi, contractAddress); return await contract.Send(method, new object[] { destination, id, amount, dataObject }); diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs index f5735ab96..df6d70ff8 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs @@ -1,15 +1,12 @@ using System.Numerics; using System.Threading.Tasks; using ChainSafe.Gaming.Evm.Providers; -using ChainSafe.Gaming.UnityPackage; using ChainSafe.Gaming.Web3; namespace Scripts.EVM.Token { public static class Erc20 { - private static readonly string Abi = ABI.Erc20; - /// /// Balance Of ERC20 Address /// @@ -19,8 +16,8 @@ public static class Erc20 /// public static async Task BalanceOf(Web3 web3, string contractAddress, string account) { - var contract = web3.ContractBuilder.Build(Abi, contractAddress); - var contractData = await contract.Call(CommonMethod.BalanceOf, new object[] + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contractData = await contract.Call(EthMethod.BalanceOf, new object[] { account }); @@ -38,7 +35,7 @@ public static async Task CustomTokenBalance(Web3 web3, string contra { var contract = web3.ContractBuilder.Build(contractAbi, contractAddress); string address = await web3.Signer.GetAddress(); - var contractData = await contract.Call(CommonMethod.BalanceOf, new object[] { address }); + var contractData = await contract.Call(EthMethod.BalanceOf, new object[] { address }); return BigInteger.Parse(contractData[0].ToString()); } @@ -61,8 +58,8 @@ public static async Task NativeBalanceOf(Web3 web3, string account) /// public static async Task Name(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(Abi, contractAddress); - var name = await contract.Call(CommonMethod.Name); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var name = await contract.Call(EthMethod.Name); return name[0].ToString(); } @@ -74,8 +71,8 @@ public static async Task Name(Web3 web3, string contractAddress) /// public static async Task Symbol(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(Abi, contractAddress); - var symbol = await contract.Call(CommonMethod.Symbol); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var symbol = await contract.Call(EthMethod.Symbol); return symbol[0].ToString(); } @@ -87,8 +84,8 @@ public static async Task Symbol(Web3 web3, string contractAddress) /// public static async Task Decimals(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(Abi, contractAddress); - var decimals = await contract.Call(CommonMethod.Decimals); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var decimals = await contract.Call(EthMethod.Decimals); return BigInteger.Parse(decimals[0].ToString()); } @@ -100,8 +97,8 @@ public static async Task Decimals(Web3 web3, string contractAddress) /// public static async Task TotalSupply(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(Abi, contractAddress); - var totalSupply = await contract.Call(CommonMethod.TotalSupply); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var totalSupply = await contract.Call(EthMethod.TotalSupply); return BigInteger.Parse(totalSupply[0].ToString()); } @@ -114,9 +111,9 @@ public static async Task TotalSupply(Web3 web3, string contractAddre /// public static async Task MintErc20(Web3 web3, string contractAddress, string toAccount, BigInteger amount) { - const string method = "mint"; + const string method = EthMethod.Mint; var destination = await web3.Signer.GetAddress(); - var contract = web3.ContractBuilder.Build(Abi, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); return await contract.Send(method, new object[] { toAccount, amount }); } @@ -130,9 +127,8 @@ public static async Task MintErc20(Web3 web3, string contractAddress, /// public static async Task TransferErc20(Web3 web3, string contractAddress, string toAccount, BigInteger amount) { - var abi = ABI.Erc20; var method = EthMethod.Transfer; - var contract = web3.ContractBuilder.Build(abi, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); var response = await contract.Send(method, new object[] { toAccount, diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs index 267b33b1b..046a51197 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs @@ -1,7 +1,6 @@ using System.Collections.Generic; using System.Numerics; using System.Threading.Tasks; -using ChainSafe.Gaming.UnityPackage; using ChainSafe.Gaming.Web3; using Newtonsoft.Json; using Scripts.EVM.Remote; @@ -39,7 +38,7 @@ public static async Task AllErc721(Web3 web3, string chain, str public static async Task BalanceOf(Web3 web3, string contractAddress, string account) { var contract = web3.ContractBuilder.Build(_abi, contractAddress); - var contractData = await contract.Call(CommonMethod.BalanceOf, new object[] + var contractData = await contract.Call(EthMethod.BalanceOf, new object[] { account }); @@ -71,7 +70,7 @@ public static async Task OwnerOf(Web3 web3, string contractAddress, BigI } private static async Task OwnerOf(Web3 web3, string contractAddress, object[] parameters) { - var method = CommonMethod.OwnerOf; + var method = EthMethod.OwnerOf; var contract = web3.ContractBuilder.Build(_abi, contractAddress); var contractData = await contract.Call(method, parameters); return contractData[0].ToString(); @@ -91,7 +90,7 @@ public static async Task> OwnerOfBatch( string[] tokenIds, string multicall = "") { - var method = CommonMethod.OwnerOf; + var method = EthMethod.OwnerOf; // build array of args var obj = new string[tokenIds.Length][]; for (var i = 0; i < tokenIds.Length; i++) @@ -142,7 +141,7 @@ public static async Task Uri(Web3 web3, string contractAddress, string t return ipfsPath + convertUri; } - var contractData = await contract.Call(CommonMethod.TokenUri, new object[] + var contractData = await contract.Call(EthMethod.TokenUri, new object[] { tokenId }); @@ -159,7 +158,7 @@ public static async Task Uri(Web3 web3, string contractAddress, string t /// public static async Task MintErc721(Web3 web3, string abi, string contractAddress, string uri) { - const string method = "safeMint"; + const string method = EthMethod.SafeMint; var destination = await web3.Signer.GetAddress(); var contract = web3.ContractBuilder.Build(abi, contractAddress); return await contract.Send(method, new object[] { destination, uri }); diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Methods.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Methods.cs index 50d3e8611..b203c64a1 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Methods.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Methods.cs @@ -1,6 +1,6 @@ namespace Scripts.EVM.Token { - public static class CommonMethod + public static class EthMethod { public const string BalanceOf = "balanceOf"; public const string Name = "name"; @@ -13,5 +13,7 @@ public static class CommonMethod public const string BalanceOfBatch = "balanceOfBatch"; public const string Transfer = "transfer"; public const string SafeTransferFrom = "safeTransferFrom"; + public const string Mint = "mint"; + public const string SafeMint = "safeMint"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs deleted file mode 100644 index 58e321df1..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace ChainSafe.Gaming.UnityPackage -{ - public static class EthMethod - { - public const string BalanceOf = "balanceOf"; - public const string Name = "name"; - public const string Symbol = "symbol"; - public const string Decimals = "decimals"; - public const string TotalSupply = "totalSupply"; - public const string OwnerOf = "ownerOf"; - public const string TokenUri = "tokenURI"; - public const string Uri = "uri"; - public const string BalanceOfBatch = "balanceOfBatch"; - public const string Transfer = "transfer"; - public const string SafeTransferFrom = "safeTransferFrom"; - } -} \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs.meta b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs.meta deleted file mode 100644 index 74bdb6c39..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EthMethod.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: bb760047f12743142843ed9f14ff2205 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs deleted file mode 100644 index 898cbc615..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Web3Unity.Scripts.Prefabs -{ - public class ABI - { - public const string ERC_20 = - "[ { \"inputs\": [ { \"internalType\": \"string\", \"name\": \"name_\", \"type\": \"string\" }, { \"internalType\": \"string\", \"name\": \"symbol_\", \"type\": \"string\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"subtractedValue\", \"type\": \"uint256\" } ], \"name\": \"decreaseAllowance\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"addedValue\", \"type\": \"uint256\" } ], \"name\": \"increaseAllowance\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"recipient\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"recipient\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; - - public const string ERC_1155 = - "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mintBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - - public const string ERC_721 = - "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - - public const string ADD_TOTAL_ABI = - "[ { \"inputs\": [ { \"internalType\": \"uint8\", \"name\": \"_myArg\", \"type\": \"uint8\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - } -} \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs.meta b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs.meta deleted file mode 100644 index a775d134c..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/ABI.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 018b9c26aeb87fd41ba97e9ba212bc79 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs deleted file mode 100644 index 007c83f62..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs +++ /dev/null @@ -1,17 +0,0 @@ -namespace Web3Unity.Scripts.Prefabs -{ - public static class EthMethod - { - public const string BalanceOf = "balanceOf"; - public const string Name = "name"; - public const string Symbol = "symbol"; - public const string Decimals = "decimals"; - public const string TotalSupply = "totalSupply"; - public const string OwnerOf = "ownerOf"; - public const string TokenUri = "tokenURI"; - public const string Uri = "uri"; - public const string BalanceOfBatch = "balanceOfBatch"; - public const string Transfer = "transfer"; - public const string SafeTransferFrom = "safeTransferFrom"; - } -} \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs.meta b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs.meta deleted file mode 100644 index 3b0c65aba..000000000 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/EthMethod.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 35af672b660def1488b2f4c01ab49ad2 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs index 75d99d89e..a936a91c5 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs @@ -7,6 +7,7 @@ using Nethereum.ABI.FunctionEncoding; using Nethereum.Contracts.QueryHandlers.MultiCall; using Nethereum.Hex.HexConvertors.Extensions; +using Scripts.EVM.Token; using UnityEngine; public class MultiCallSample @@ -23,7 +24,7 @@ public MultiCallSample(Web3 web3) public async Task ErcSamples() { - var erc20Contract = web3.ContractBuilder.Build(ABI.ERC_20, Erc20ContractAddress); + var erc20Contract = web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); var erc20BalanceOfCalldata = erc20Contract.Calldata(CommonMethod.BalanceOf, new object[] { Erc20Account diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs index 237080841..03fe534f8 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs @@ -3,7 +3,7 @@ using LootBoxes.Chainlink.Scene.StageItems; using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; -using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; using UnityEngine.Networking; @@ -35,7 +35,7 @@ public async Task Create(Erc1155NftReward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs index 1d3a84ca2..a6bc70886 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs @@ -3,7 +3,7 @@ using LootBoxes.Chainlink.Scene.StageItems; using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; -using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; namespace LootBoxes.Chainlink.Scene @@ -34,7 +34,7 @@ public async Task Create(Erc1155Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; try diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs index a56efd439..fccc533fa 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs @@ -5,7 +5,7 @@ using LootBoxes.Chainlink.Scene.StageItems; using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; -using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; namespace LootBoxes.Chainlink.Scene @@ -35,7 +35,7 @@ public async Task Create(Erc20Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_20, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc20, data.ContractAddress); var symbol = (await contract.Call("symbol"))[0].ToString(); var decimals = BigInteger.Parse((await contract.Call("decimals"))[0].ToString()); var humanizedAmount = HumanizeAmount(data.AmountRaw, decimals); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs index dac346508..39387aa77 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs @@ -4,6 +4,7 @@ using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; namespace LootBoxes.Chainlink.Scene @@ -32,7 +33,7 @@ public async Task Create(Erc721Reward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_721, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc721, data.ContractAddress); var uri = (await contract.Call("tokenURI", new object[] { data.TokenId.ToString() }))[0].ToString(); Debug.Log(uri); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 04fd54ab0..07ca29568 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -8,7 +8,6 @@ using Scripts.EVM.Token; using UnityEngine; using Web3Unity.Scripts.Prefabs; -using ABI = Scripts.EVM.Token.ABI; public class EvmCalls : MonoBehaviour { @@ -223,12 +222,12 @@ public async void IPFSUpload() public async void MultiCall() { var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); - var erc20BalanceOfCalldata = erc20Contract.Calldata(CommonMethod.BalanceOf, new object[] + var erc20BalanceOfCalldata = erc20Contract.Calldata(EthMethod.BalanceOf, new object[] { Erc20Account }); - var erc20TotalSupplyCalldata = erc20Contract.Calldata(CommonMethod.TotalSupply, new object[] + var erc20TotalSupplyCalldata = erc20Contract.Calldata(EthMethod.TotalSupply, new object[] { }); @@ -254,13 +253,13 @@ public async void MultiCall() if (multicallResultResponse[0] != null && multicallResultResponse[0].Success) { - var decodedBalanceOf = erc20Contract.Decode(CommonMethod.BalanceOf, multicallResultResponse[0].ReturnData.ToHex()); + var decodedBalanceOf = erc20Contract.Decode(EthMethod.BalanceOf, multicallResultResponse[0].ReturnData.ToHex()); Debug.Log($"decodedBalanceOf {((BigInteger)decodedBalanceOf[0]).ToString()}"); } if (multicallResultResponse[1] != null && multicallResultResponse[1].Success) { - var decodedTotalSupply = erc20Contract.Decode(CommonMethod.TotalSupply, multicallResultResponse[1].ReturnData.ToHex()); + var decodedTotalSupply = erc20Contract.Decode(EthMethod.TotalSupply, multicallResultResponse[1].ReturnData.ToHex()); Debug.Log($"decodedTotalSupply {((BigInteger)decodedTotalSupply[0]).ToString()}"); } } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index cfe580acd..98dd3b817 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -4,7 +4,6 @@ using Scripts.EVM.Token; using UnityEngine; using UnityEngine.UI; -using ABI = Scripts.EVM.Token.ABI; /// /// ERC1155 calls used in the sample scene @@ -120,7 +119,7 @@ public async void Uri() /// public async void MintErc1155() { - var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Mint1155, contractMint, idMint, amountMint); + var response = await Erc1155.MintErc1155(Web3Accessor.Web3, Scripts.EVM.Token.ABI.Mint1155, contractMint, idMint, amountMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 841d7ec6e..561fb7cb5 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -2,7 +2,6 @@ using ChainSafe.Gaming.UnityPackage; using Scripts.EVM.Token; using UnityEngine; -using ABI = Scripts.EVM.Token.ABI; /// /// ERC20 calls used in the sample scene diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 570226147..d9ab4bc87 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -3,7 +3,6 @@ using ChainSafe.Gaming.UnityPackage; using Scripts.EVM.Token; using UnityEngine; -using ABI = Scripts.EVM.Token.ABI; /// /// ERC721 calls used in the sample scene From af423b223cb85dd50fb18f9b615bafda614c84a8 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 16:17:19 +0800 Subject: [PATCH 04/44] organizing --- .../Runtime/Scripts/EVM/Token/ABI.cs | 13 ++++------ .../Runtime/Scripts/EVM/Token/Contracts.cs | 10 ++++++++ .../Scripts/EVM/Token/Contracts.cs.meta | 3 +++ .../Runtime/Scripts/EVM/Token/Erc1155.cs | 8 +++--- .../Runtime/Scripts/EVM/Token/Erc20.cs | 14 +++++------ .../Runtime/Scripts/EVM/Token/Erc721.cs | 4 +-- .../Scripts/Samples/MultiCallSample.cs | 2 +- .../Tests/Runtime/Erc20Tests.cs | 25 ++++++++++--------- .../Tests/Runtime/EvmTests.cs | 12 +++++++++ .../Scene/Rewards/Erc1155NftRewardFactory.cs | 2 +- .../Scene/Rewards/Erc1155RewardFactory.cs | 2 +- .../Scene/Rewards/Erc20RewardFactory.cs | 2 +- .../Scene/Rewards/Erc721NftRewardFactory.cs | 2 +- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 12 ++++----- .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 2 +- .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 +- .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 +- 17 files changed, 70 insertions(+), 47 deletions(-) create mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs create mode 100644 Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs.meta diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs index af77d41d5..cf3ebb361 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs @@ -2,13 +2,10 @@ namespace Scripts.EVM.Token { public static class ABI { - public const string Erc20 = "[ { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string Erc1155 = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"mintBatch\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"internalType\":\"uint256[]\",\"name\":\"amounts\",\"type\":\"uint256[]\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeBatchTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"},{\"indexed\":false,\"internalType\":\"uint256[]\",\"name\":\"values\",\"type\":\"uint256[]\"}],\"name\":\"TransferBatch\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"TransferSingle\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"string\",\"name\":\"value\",\"type\":\"string\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"URI\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"id\",\"type\":\"uint256\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"uint256[]\",\"name\":\"ids\",\"type\":\"uint256[]\"}],\"name\":\"balanceOfBatch\",\"outputs\":[{\"internalType\":\"uint256[]\",\"name\":\"\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"uri\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - public const string Erc721 = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - public const string AddTotal = "[ { \"inputs\": [ { \"internalType\": \"uint8\", \"name\": \"_myArg\", \"type\": \"uint8\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string Array = "[{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"_addresses\",\"type\":\"address[]\"}],\"name\":\"setStore\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"name\":\"bought\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getStore\",\"outputs\":[{\"internalType\":\"address[]\",\"name\":\"\",\"type\":\"address[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - public const string CustomBalanceOf = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; - public const string Mint721 = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - public const string Mint1155 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string ERC20 = "[ { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string ERC721 = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; + public const string ERC1155 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string ARRAYTOTAL = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string CUSTOMBALANCEOF = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs new file mode 100644 index 000000000..904ce747c --- /dev/null +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs @@ -0,0 +1,10 @@ +namespace Scripts.EVM.Token +{ + public class Contracts + { + public const string ERC20 = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; + public const string ERC721 = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + public const string ERC1155 = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; + public const string ARRAYTOTAL = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + } +} \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs.meta b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs.meta new file mode 100644 index 000000000..7d8b28f4f --- /dev/null +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs.meta @@ -0,0 +1,3 @@ +fileFormatVersion: 2 +guid: 8bcba01b7d3d4593917935a2159b782c +timeCreated: 1699775716 \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs index cb993322b..74996295a 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs @@ -63,7 +63,7 @@ public static async Task BalanceOf(Web3 web3, string contractAddress } private static async Task BalanceOf(Web3 web3, string contractAddress, string account, object[] parameters) { - var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC1155, contractAddress); var contractData = await contract.Call(EthMethod.BalanceOf, parameters); return BigInteger.Parse(contractData[0].ToString()); } @@ -78,7 +78,7 @@ private static async Task BalanceOf(Web3 web3, string contractAddres /// public static async Task> BalanceOfBatch(Web3 web3, string contractAddress, string[] accounts, string[] tokenIds) { - var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC1155, contractAddress); var contractData = await contract.Call(EthMethod.BalanceOfBatch, new object[] { accounts, @@ -97,7 +97,7 @@ public static async Task> BalanceOfBatch(Web3 web3, string cont public static async Task Uri(Web3 web3, string contractAddress, string tokenId) { const string ipfsPath = "https://ipfs.io/ipfs/"; - var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC1155, contractAddress); if (tokenId.StartsWith("0x")) { string convertUri = tokenId.Replace("0x", "f"); @@ -140,7 +140,7 @@ public static async Task MintErc1155(Web3 web3, string abi, string con public static async Task TransferErc1155(Web3 web3, string contractAddress, BigInteger tokenId, BigInteger amount, string toAccount) { var account = await web3.Signer.GetAddress(); - var abi = ABI.Erc1155; + var abi = ABI.ERC1155; var method = EthMethod.SafeTransferFrom; byte[] dataObject = { }; var contract = web3.ContractBuilder.Build(abi, contractAddress); diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs index df6d70ff8..9585e5dc2 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs @@ -16,7 +16,7 @@ public static class Erc20 /// public static async Task BalanceOf(Web3 web3, string contractAddress, string account) { - var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); var contractData = await contract.Call(EthMethod.BalanceOf, new object[] { account @@ -58,7 +58,7 @@ public static async Task NativeBalanceOf(Web3 web3, string account) /// public static async Task Name(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); var name = await contract.Call(EthMethod.Name); return name[0].ToString(); } @@ -71,7 +71,7 @@ public static async Task Name(Web3 web3, string contractAddress) /// public static async Task Symbol(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); var symbol = await contract.Call(EthMethod.Symbol); return symbol[0].ToString(); } @@ -84,7 +84,7 @@ public static async Task Symbol(Web3 web3, string contractAddress) /// public static async Task Decimals(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); var decimals = await contract.Call(EthMethod.Decimals); return BigInteger.Parse(decimals[0].ToString()); } @@ -97,7 +97,7 @@ public static async Task Decimals(Web3 web3, string contractAddress) /// public static async Task TotalSupply(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); var totalSupply = await contract.Call(EthMethod.TotalSupply); return BigInteger.Parse(totalSupply[0].ToString()); } @@ -113,7 +113,7 @@ public static async Task MintErc20(Web3 web3, string contractAddress, { const string method = EthMethod.Mint; var destination = await web3.Signer.GetAddress(); - var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); return await contract.Send(method, new object[] { toAccount, amount }); } @@ -128,7 +128,7 @@ public static async Task MintErc20(Web3 web3, string contractAddress, public static async Task TransferErc20(Web3 web3, string contractAddress, string toAccount, BigInteger amount) { var method = EthMethod.Transfer; - var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); var response = await contract.Send(method, new object[] { toAccount, diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs index 046a51197..8c9ac6d75 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs @@ -10,7 +10,7 @@ namespace Scripts.EVM.Token { public static class Erc721 { - private static string _abi = ABI.Erc721; + private static string _abi = ABI.ERC721; /// /// Fetches all 721 Nfts from an account @@ -174,7 +174,7 @@ public static async Task MintErc721(Web3 web3, string abi, string cont /// public static async Task TransferErc721(Web3 web3, string contractAddress, string toAccount, BigInteger tokenId) { - var abi = ABI.Erc721; + var abi = ABI.ERC721; var method = EthMethod.SafeTransferFrom; var account = await web3.Signer.GetAddress(); var contract = web3.ContractBuilder.Build(abi, contractAddress); diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs index a936a91c5..4dc923f99 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs @@ -24,7 +24,7 @@ public MultiCallSample(Web3 web3) public async Task ErcSamples() { - var erc20Contract = web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); + var erc20Contract = web3.ContractBuilder.Build(ABI.ERC20, Erc20ContractAddress); var erc20BalanceOfCalldata = erc20Contract.Calldata(CommonMethod.BalanceOf, new object[] { Erc20Account diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs index 76c9fc019..7083738e2 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs @@ -1,5 +1,6 @@ using System.Collections; using System.Numerics; +using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Evm.JsonRpc; using ChainSafe.Gaming.UnityPackage; using ChainSafe.Gaming.WalletConnect; @@ -65,6 +66,18 @@ public IEnumerator TestBalanceOf() // 0, 0, 0, 64, 234, 237, 116, 70, 208, 156, 44, 159, 12 //}), getBalanceOf.Result); } + + [UnityTest] + public IEnumerator TestNativeBalanceOf() + { + var getNativeBalanceOf = Erc20.NativeBalanceOf(web3, Account); + yield return new WaitUntil(() => getNativeBalanceOf.IsCompleted); + Assert.AreEqual(new BigInteger(500000000000000000), getNativeBalanceOf.Result); + //Assert.AreEqual(new BigInteger(new byte[] + //{ + // 0, 144, 99, 20, 5, 161, 13, 3 + //}), getNativeBalanceOf.Result); + } [UnityTest] public IEnumerator TestDecimals() @@ -82,18 +95,6 @@ public IEnumerator TestName() Assert.AreEqual("CsTestErc20", getName.Result); } - [UnityTest] - public IEnumerator TestNativeBalanceOf() - { - var getNativeBalanceOf = Erc20.NativeBalanceOf(web3, Account); - yield return new WaitUntil(() => getNativeBalanceOf.IsCompleted); - Assert.AreEqual(new BigInteger(500000000000000000), getNativeBalanceOf.Result); - //Assert.AreEqual(new BigInteger(new byte[] - //{ - // 0, 144, 99, 20, 5, 161, 13, 3 - //}), getNativeBalanceOf.Result); - } - [UnityTest] public IEnumerator TestSymbol() { diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index a0fb93922..e14f13691 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -299,6 +299,18 @@ public IEnumerator TestSignVerify() Assert.AreEqual(true, signVerify.Result); } + [UnityTest] + public IEnumerator TestCustomBalanceOfErc20() + { + var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.CUSTOMBALANCEOF, Contracts.ERC20); + yield return new WaitUntil(() => getCustomBalanceOf.IsCompleted); + Assert.AreEqual(new BigInteger(999999), getCustomBalanceOf.Result); + //Assert.AreEqual(new BigInteger(new byte[] + //{ + // 0, 144, 99, 20, 5, 161, 13, 3 + //}), getNativeBalanceOf.Result); + } + [UnityTest] public IEnumerator TestMintErc20() { diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs index 03fe534f8..e836b6ada 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs @@ -35,7 +35,7 @@ public async Task Create(Erc1155NftReward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.ERC1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs index a6bc70886..ad8b56f21 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs @@ -34,7 +34,7 @@ public async Task Create(Erc1155Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.ERC1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; try diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs index fccc533fa..79b92175c 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs @@ -35,7 +35,7 @@ public async Task Create(Erc20Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.Erc20, data.ContractAddress); + var contract = contractBuilder.Build(ABI.ERC20, data.ContractAddress); var symbol = (await contract.Call("symbol"))[0].ToString(); var decimals = BigInteger.Parse((await contract.Call("decimals"))[0].ToString()); var humanizedAmount = HumanizeAmount(data.AmountRaw, decimals); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs index 39387aa77..f322666e5 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs @@ -33,7 +33,7 @@ public async Task Create(Erc721Reward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.Erc721, data.ContractAddress); + var contract = contractBuilder.Build(ABI.ERC721, data.ContractAddress); var uri = (await contract.Call("tokenURI", new object[] { data.TokenId.ToString() }))[0].ToString(); Debug.Log(uri); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 07ca29568..f21ae936d 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -93,7 +93,7 @@ public class EvmCalls : MonoBehaviour public async void ContractCall() { object[] args = {}; - var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.AddTotal, contractAddressCall, args); + var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ARRAYTOTAL, contractAddressCall, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); } @@ -104,21 +104,21 @@ public async void ContractSend() { increaseAmountSend }; - var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.AddTotal, contractAddressSend, args); + var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ARRAYTOTAL, contractAddressSend, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } public async void GetArray() { - var response = await Evm.GetArray(Web3Accessor.Web3, contractAddressArray, ABI.AddTotal, methodArrayGet); + var response = await Evm.GetArray(Web3Accessor.Web3, contractAddressArray, ABI.ARRAYTOTAL, methodArrayGet); var responseString = string.Join(",\n", response.Select((list, i) => $"#{i} {string.Join((string)", ", (IEnumerable)list)}")); SampleOutputUtil.PrintResult(responseString, nameof(Evm), nameof(Evm.GetArray)); } public async void SendArray() { - var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.AddTotal, contractAddressArray, stringArraySend); + var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.ARRAYTOTAL, contractAddressArray, stringArraySend); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SendArray)); } @@ -131,7 +131,7 @@ public async void GetBlockNumber() public async void GetGasLimit() { - var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.AddTotal, contractAddressSend, methodSend); + var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ARRAYTOTAL, contractAddressSend, methodSend); SampleOutputUtil.PrintResult(gasLimit.ToString(), nameof(Evm), nameof(Evm.GetGasLimit)); } @@ -221,7 +221,7 @@ public async void IPFSUpload() public async void MultiCall() { - var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); + var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.ERC20, Erc20ContractAddress); var erc20BalanceOfCalldata = erc20Contract.Calldata(EthMethod.BalanceOf, new object[] { Erc20Account diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 98dd3b817..072d75762 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -119,7 +119,7 @@ public async void Uri() /// public async void MintErc1155() { - var response = await Erc1155.MintErc1155(Web3Accessor.Web3, Scripts.EVM.Token.ABI.Mint1155, contractMint, idMint, amountMint); + var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.ERC1155, contractMint, idMint, amountMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 561fb7cb5..4c696aeb3 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -60,7 +60,7 @@ public async void BalanceOf() /// public async void CustomTokenBalanceOf() { - var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, contractToken); + var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CUSTOMBALANCEOF, contractToken); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.CustomTokenBalance)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index d9ab4bc87..1ec0f1fbc 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -123,7 +123,7 @@ public async void Uri() /// public async void MintErc721() { - var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Mint721, contractMint, uriMint); + var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.ERC721, contractMint, uriMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } From 89db85bfcb07cc423c0adc1ddfc18dccefccad79 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 17:11:17 +0800 Subject: [PATCH 05/44] Cleanup --- .../Runtime/Scripts/EVM/Token/ABI.cs | 10 ++--- .../Runtime/Scripts/EVM/Token/Contracts.cs | 8 ++-- .../Runtime/Scripts/EVM/Token/Erc1155.cs | 8 ++-- .../Runtime/Scripts/EVM/Token/Erc20.cs | 15 +++---- .../Runtime/Scripts/EVM/Token/Erc721.cs | 4 +- .../Scripts/Samples/MultiCallSample.cs | 2 +- .../Tests/Runtime/Erc1155Tests.cs | 15 ++----- .../Tests/Runtime/Erc20Tests.cs | 11 +++-- .../Tests/Runtime/Erc721Tests.cs | 23 +++-------- .../Tests/Runtime/EvmTests.cs | 40 ++++++------------- .../Scene/Rewards/Erc1155NftRewardFactory.cs | 2 +- .../Scene/Rewards/Erc1155RewardFactory.cs | 2 +- .../Scene/Rewards/Erc20RewardFactory.cs | 2 +- .../Scene/Rewards/Erc721NftRewardFactory.cs | 2 +- .../Scripts/Scenes/Login.cs | 6 +-- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 14 +++---- .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 2 +- .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 +- .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 +- 19 files changed, 68 insertions(+), 102 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs index cf3ebb361..bae98cb6a 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs @@ -2,10 +2,10 @@ namespace Scripts.EVM.Token { public static class ABI { - public const string ERC20 = "[ { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string ERC721 = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - public const string ERC1155 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string ARRAYTOTAL = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string CUSTOMBALANCEOF = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; + public const string Erc20 = "[ { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string Erc721 = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; + public const string Erc1155 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string ArrayTotal = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string CustomBalanceOf = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs index 904ce747c..a821ddd03 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs @@ -2,9 +2,9 @@ { public class Contracts { - public const string ERC20 = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; - public const string ERC721 = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; - public const string ERC1155 = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; - public const string ARRAYTOTAL = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + public const string Erc20 = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; + public const string Erc721 = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; + public const string Erc1155 = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; + public const string ArrayTotal = "0xCb0FdD2837a61d7c39ce0fbF56403Db601CAeFd4"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs index 74996295a..cb993322b 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs @@ -63,7 +63,7 @@ public static async Task BalanceOf(Web3 web3, string contractAddress } private static async Task BalanceOf(Web3 web3, string contractAddress, string account, object[] parameters) { - var contract = web3.ContractBuilder.Build(ABI.ERC1155, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); var contractData = await contract.Call(EthMethod.BalanceOf, parameters); return BigInteger.Parse(contractData[0].ToString()); } @@ -78,7 +78,7 @@ private static async Task BalanceOf(Web3 web3, string contractAddres /// public static async Task> BalanceOfBatch(Web3 web3, string contractAddress, string[] accounts, string[] tokenIds) { - var contract = web3.ContractBuilder.Build(ABI.ERC1155, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); var contractData = await contract.Call(EthMethod.BalanceOfBatch, new object[] { accounts, @@ -97,7 +97,7 @@ public static async Task> BalanceOfBatch(Web3 web3, string cont public static async Task Uri(Web3 web3, string contractAddress, string tokenId) { const string ipfsPath = "https://ipfs.io/ipfs/"; - var contract = web3.ContractBuilder.Build(ABI.ERC1155, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc1155, contractAddress); if (tokenId.StartsWith("0x")) { string convertUri = tokenId.Replace("0x", "f"); @@ -140,7 +140,7 @@ public static async Task MintErc1155(Web3 web3, string abi, string con public static async Task TransferErc1155(Web3 web3, string contractAddress, BigInteger tokenId, BigInteger amount, string toAccount) { var account = await web3.Signer.GetAddress(); - var abi = ABI.ERC1155; + var abi = ABI.Erc1155; var method = EthMethod.SafeTransferFrom; byte[] dataObject = { }; var contract = web3.ContractBuilder.Build(abi, contractAddress); diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs index 9585e5dc2..91bf106f6 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc20.cs @@ -16,7 +16,7 @@ public static class Erc20 /// public static async Task BalanceOf(Web3 web3, string contractAddress, string account) { - var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); var contractData = await contract.Call(EthMethod.BalanceOf, new object[] { account @@ -58,7 +58,7 @@ public static async Task NativeBalanceOf(Web3 web3, string account) /// public static async Task Name(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); var name = await contract.Call(EthMethod.Name); return name[0].ToString(); } @@ -71,7 +71,7 @@ public static async Task Name(Web3 web3, string contractAddress) /// public static async Task Symbol(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); var symbol = await contract.Call(EthMethod.Symbol); return symbol[0].ToString(); } @@ -84,7 +84,7 @@ public static async Task Symbol(Web3 web3, string contractAddress) /// public static async Task Decimals(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); var decimals = await contract.Call(EthMethod.Decimals); return BigInteger.Parse(decimals[0].ToString()); } @@ -97,7 +97,7 @@ public static async Task Decimals(Web3 web3, string contractAddress) /// public static async Task TotalSupply(Web3 web3, string contractAddress) { - var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); var totalSupply = await contract.Call(EthMethod.TotalSupply); return BigInteger.Parse(totalSupply[0].ToString()); } @@ -113,7 +113,7 @@ public static async Task MintErc20(Web3 web3, string contractAddress, { const string method = EthMethod.Mint; var destination = await web3.Signer.GetAddress(); - var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); return await contract.Send(method, new object[] { toAccount, amount }); } @@ -125,10 +125,11 @@ public static async Task MintErc20(Web3 web3, string contractAddress, /// /// /// + /// public static async Task TransferErc20(Web3 web3, string contractAddress, string toAccount, BigInteger amount) { var method = EthMethod.Transfer; - var contract = web3.ContractBuilder.Build(ABI.ERC20, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc20, contractAddress); var response = await contract.Send(method, new object[] { toAccount, diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs index 8c9ac6d75..046a51197 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs @@ -10,7 +10,7 @@ namespace Scripts.EVM.Token { public static class Erc721 { - private static string _abi = ABI.ERC721; + private static string _abi = ABI.Erc721; /// /// Fetches all 721 Nfts from an account @@ -174,7 +174,7 @@ public static async Task MintErc721(Web3 web3, string abi, string cont /// public static async Task TransferErc721(Web3 web3, string contractAddress, string toAccount, BigInteger tokenId) { - var abi = ABI.ERC721; + var abi = ABI.Erc721; var method = EthMethod.SafeTransferFrom; var account = await web3.Signer.GetAddress(); var contract = web3.ContractBuilder.Build(abi, contractAddress); diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs index 4dc923f99..a936a91c5 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/Samples/MultiCallSample.cs @@ -24,7 +24,7 @@ public MultiCallSample(Web3 web3) public async Task ErcSamples() { - var erc20Contract = web3.ContractBuilder.Build(ABI.ERC20, Erc20ContractAddress); + var erc20Contract = web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); var erc20BalanceOfCalldata = erc20Contract.Calldata(CommonMethod.BalanceOf, new object[] { Erc20Account diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs index 7844ad11a..bc6a06bc8 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs @@ -18,15 +18,8 @@ public class Erc1155Tests #region Balances private readonly string[] _accounts = new[] { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xE51995Cdb3b1c109E0e6E67ab5aB31CDdBB83E4a" }; - private const string ContractAddress = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; private readonly string[] _tokenIds = { "1", "2" }; - #endregion - - #region Texture - - private const string NftTextureContractAddress = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; - #endregion private Web3 web3; @@ -74,7 +67,7 @@ public IEnumerator Setup() [UnityTest] public IEnumerator TestBalanceOf() { - var getBalanceOf = Erc1155.BalanceOf(web3, ContractAddress, _accounts[0], _tokenIds[0]); + var getBalanceOf = Erc1155.BalanceOf(web3, Contracts.Erc1155, _accounts[0], _tokenIds[0]); yield return new WaitUntil(() => getBalanceOf.IsCompleted); Assert.AreEqual(new BigInteger(2), getBalanceOf.Result); @@ -83,7 +76,7 @@ public IEnumerator TestBalanceOf() [UnityTest] public IEnumerator TestBalanceOfBatch() { - var getBalanceOf = Erc1155.BalanceOfBatch(web3, ContractAddress, _accounts, _tokenIds); + var getBalanceOf = Erc1155.BalanceOfBatch(web3, Contracts.Erc1155, _accounts, _tokenIds); yield return new WaitUntil(() => getBalanceOf.IsCompleted); CollectionAssert.AreEqual(new List { 2, 0 }, getBalanceOf.Result); } @@ -94,7 +87,7 @@ public IEnumerator TestBalanceOfBatch() [UnityTest] public IEnumerator TestUri() { - var uri = Erc1155.Uri(web3, ContractAddress, _tokenIds[0]); + var uri = Erc1155.Uri(web3, Contracts.Erc1155, _tokenIds[0]); yield return new WaitUntil(() => uri.IsCompleted); Assert.AreEqual(ExpectedUriResult, uri.Result); } @@ -174,7 +167,7 @@ public IEnumerator TestImportNFTTexture() }; #endregion - var texture = Erc1155.ImportNftTexture1155(web3, NftTextureContractAddress, "1"); + var texture = Erc1155.ImportNftTexture1155(web3, Contracts.Erc1155, "1"); yield return new WaitUntil(() => texture.IsCompleted); CollectionAssert.AreEqual(bytesOfTheTexture, texture.Result.EncodeToJPG(1)); } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs index 7083738e2..8f6e64115 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs @@ -18,8 +18,7 @@ public class Erc20Tests #region Contract Calls private const string Account = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private const string ContractAddress = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; - // Mint ERC20 function adjusts the total supply so we have a duplicate here that doesn't change for the test to pass + // Mint ERC20 function adjusts the total supply so we have a duplicate contract that doesn't change for the test to pass private const string TotalSupplyAddress = "0xd1A103234d1D65E0E817A523d679B114cf86521A"; #endregion @@ -58,7 +57,7 @@ public IEnumerator Setup() [UnityTest] public IEnumerator TestBalanceOf() { - var getBalanceOf = Erc20.BalanceOf(web3, ContractAddress, Account); + var getBalanceOf = Erc20.BalanceOf(web3, Contracts.Erc20, Account); yield return new WaitUntil(() => getBalanceOf.IsCompleted); Assert.AreEqual(new BigInteger(1000000000000000000), getBalanceOf.Result); //Assert.AreEqual(new BigInteger(new byte[] @@ -82,7 +81,7 @@ public IEnumerator TestNativeBalanceOf() [UnityTest] public IEnumerator TestDecimals() { - var getDecimals = Erc20.Decimals(web3, ContractAddress); + var getDecimals = Erc20.Decimals(web3, Contracts.Erc20); yield return new WaitUntil(() => getDecimals.IsCompleted); Assert.AreEqual(new BigInteger(18), getDecimals.Result); } @@ -90,7 +89,7 @@ public IEnumerator TestDecimals() [UnityTest] public IEnumerator TestName() { - var getName = Erc20.Name(web3, ContractAddress); + var getName = Erc20.Name(web3, Contracts.Erc20); yield return new WaitUntil(() => getName.IsCompleted); Assert.AreEqual("CsTestErc20", getName.Result); } @@ -98,7 +97,7 @@ public IEnumerator TestName() [UnityTest] public IEnumerator TestSymbol() { - var getSymbol = Erc20.Symbol(web3, ContractAddress); + var getSymbol = Erc20.Symbol(web3, Contracts.Erc20); yield return new WaitUntil(() => getSymbol.IsCompleted); Assert.AreEqual("CST", getSymbol.Result); } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index 6baed955b..450880e70 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -17,36 +17,25 @@ public class Erc721Tests { // Fields - //public const string Erc721 = "0xF7B58448FEFdC634ccFE1624Dc9356C55b8d126c"; #region Balances - private const string balanceOfContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; private const string balanceOfAccount = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion #region OwnerOf - private const string ownerOfContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; private const string ownerOfTokenId = "2"; private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private const string ownerOfBatchContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; private string[] ownerOfBatchTokenIds = { "1", "2" }; - public string multicall = ""; - //public string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; + private string multicall = ""; + //private string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; private string[] ownerOfBatchExpected = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; - #endregion - - #region AllNfts - - private const string allContractAddress = "0x2c1867BC3026178A47a677513746DCc6822A137A"; - #endregion #region Uri - private const string uriContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; private const string uriTokenId = "1"; #endregion @@ -99,7 +88,7 @@ public IEnumerator Setup() [UnityTest] public IEnumerator TestBalanceOf() { - var getBalanceOf = Erc721.BalanceOf(web3, balanceOfContractAddress, balanceOfAccount); + var getBalanceOf = Erc721.BalanceOf(web3, Contracts.Erc721, balanceOfAccount); yield return new WaitUntil(() => getBalanceOf.IsCompleted); Assert.AreEqual(3, getBalanceOf.Result); @@ -108,7 +97,7 @@ public IEnumerator TestBalanceOf() [UnityTest] public IEnumerator TestOwnerOf() { - var getOwnerOf = Erc721.OwnerOf(web3, ownerOfContractAddress, ownerOfTokenId); + var getOwnerOf = Erc721.OwnerOf(web3, Contracts.Erc721, ownerOfTokenId); yield return new WaitUntil(() => getOwnerOf.IsCompleted); Assert.AreEqual(ownerOfExpected, getOwnerOf.Result); @@ -117,7 +106,7 @@ public IEnumerator TestOwnerOf() [UnityTest] public IEnumerator TestOwnerOfBatch() { - var getOwnerOfBatch = Erc721.OwnerOfBatch(web3, ownerOfBatchContractAddress, ownerOfBatchTokenIds, multicall); + var getOwnerOfBatch = Erc721.OwnerOfBatch(web3, Contracts.Erc721, ownerOfBatchTokenIds, multicall); yield return new WaitUntil(() => getOwnerOfBatch.IsCompleted); CollectionAssert.AreEqual(ownerOfBatchExpected, getOwnerOfBatch.Result); @@ -129,7 +118,7 @@ public IEnumerator TestOwnerOfBatch() [UnityTest] public IEnumerator TestUri() { - var uri = Erc721.Uri(web3, uriContractAddress, uriTokenId); + var uri = Erc721.Uri(web3, Contracts.Erc721, uriTokenId); yield return new WaitUntil(() => uri.IsCompleted); Assert.AreEqual(ExpectedUriResult, uri.Result); } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index e14f13691..05addae36 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -15,15 +15,11 @@ public class EvmTests : SampleTestsBase private const int IncreaseAmount = 1; private const string ContractCallMethod = "myTotal"; private const string CallAmount = "1"; - private const string Abi = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - private const string ContractAddress = "0xCb0FdD2837a61d7c39ce0fbF56403Db601CAeFd4"; #endregion #region Array - private const string ArrayAbi = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - private const string ArrayAddress = "0xCb0FdD2837a61d7c39ce0fbF56403Db601CAeFd4"; private const string GetArrayMethod = "getStore"; private const string SendArrayMethod = "setStore"; @@ -37,24 +33,18 @@ public class EvmTests : SampleTestsBase #region MintErc20 - private const string Mint20Contract = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; - private const string Mint20ToAccount = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; private const int Mint20Amount = 1; #endregion #region Mint721 - private const string Mint721Abi = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; - private const string Mint721Contract = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; private const string Mint721Uri = "QmfUHuFj3YL2JMZkyXNtGRV8e9aLJgQ6gcSrqbfjWFvbqQ"; #endregion #region Mint1155 - private string Mint1155Abi = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - private string Mint1155Contract = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; private const int Mint1155Id = 1; private const int Mint1155Amount = 1; @@ -62,13 +52,9 @@ public class EvmTests : SampleTestsBase #region Transfer - private const string TransferErc20ContractAddress = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; private BigInteger TransferErc20Amount = 1; - private const string TransferErc721ContractAddress = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; private const int Transfer721Id = 5; - - private const string TransferErc1155ContractAddress = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; private const int Transfer1155Id = 1; private const int Transfer1155Amount = 1; @@ -91,7 +77,7 @@ public IEnumerator TestContractCall() { object[] args = { config.TestWalletAddress }; - var callContract = Evm.ContractCall(web3, ContractCallMethod, Abi, ContractAddress, args); + var callContract = Evm.ContractCall(web3, ContractCallMethod, ABI.ArrayTotal, Contracts.ArrayTotal, args); yield return new WaitUntil(() => callContract.IsCompleted); @@ -112,7 +98,7 @@ public IEnumerator TestContractSend() IncreaseAmount }; - var sendContract = Evm.ContractSend(web3, ContractSendMethod, Abi, ContractAddress, args); + var sendContract = Evm.ContractSend(web3, ContractSendMethod, ABI.ArrayTotal, Contracts.ArrayTotal, args); yield return new WaitUntil(() => sendContract.IsCompleted); @@ -126,7 +112,7 @@ public IEnumerator TestContractSend() [UnityTest] public IEnumerator TestGetArray() { - var getArray = Evm.GetArray(web3, ArrayAddress, ArrayAbi, GetArrayMethod); + var getArray = Evm.GetArray(web3, Contracts.ArrayTotal, ABI.ArrayTotal, GetArrayMethod); yield return new WaitUntil(() => getArray.IsCompleted); @@ -144,7 +130,7 @@ public IEnumerator TestSendArray() { config.TestResponse = "0x3446b949c3d214fba7e61c9cf127eac6cd0b2983564cf76be618099879b6f1e1"; - var sendArray = Evm.SendArray(web3, SendArrayMethod, ArrayAbi, ArrayAddress, ArrayToSend.ToArray()); + var sendArray = Evm.SendArray(web3, SendArrayMethod, ABI.ArrayTotal, Contracts.ArrayTotal, ArrayToSend.ToArray()); yield return new WaitUntil(() => sendArray.IsCompleted); @@ -171,7 +157,7 @@ public IEnumerator TestGetBlockNumber() [UnityTest] public IEnumerator TestGetGasLimit() { - var getGasLimit = Evm.GetGasLimit(web3, Abi, ContractAddress, "addTotal"); + var getGasLimit = Evm.GetGasLimit(web3, ABI.ArrayTotal, Contracts.ArrayTotal, ContractSendMethod); yield return new WaitUntil(() => getGasLimit.IsCompleted); @@ -228,7 +214,7 @@ public IEnumerator TestTransactionStatus() [UnityTest] public IEnumerator TestUseRegisteredContract() { - var useRegisteredContract = Evm.UseRegisteredContract(web3, "shiba", "balanceOf"); + var useRegisteredContract = Evm.UseRegisteredContract(web3, Contracts.Erc20, EthMethod.BalanceOf); yield return new WaitUntil(() => useRegisteredContract.IsCompleted); @@ -302,7 +288,7 @@ public IEnumerator TestSignVerify() [UnityTest] public IEnumerator TestCustomBalanceOfErc20() { - var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.CUSTOMBALANCEOF, Contracts.ERC20); + var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.CustomBalanceOf, Contracts.Erc20); yield return new WaitUntil(() => getCustomBalanceOf.IsCompleted); Assert.AreEqual(new BigInteger(999999), getCustomBalanceOf.Result); //Assert.AreEqual(new BigInteger(new byte[] @@ -316,7 +302,7 @@ public IEnumerator TestMintErc20() { config.TestResponse = "0xbcff4755f1736b8ddfedb6d88fa6fbea5630fcc7e2f4b6e88da6ad19eb1fcaa6"; - var mint20 = Erc20.MintErc20(web3, Mint20Contract, Mint20ToAccount, Mint20Amount); + var mint20 = Erc20.MintErc20(web3, Contracts.Erc20, SendToAddress, Mint20Amount); yield return new WaitUntil(() => mint20.IsCompleted); @@ -334,7 +320,7 @@ public IEnumerator TestMintErc721() { config.TestResponse = "0xe4ff82c87784590c747ee8528506168f8a3165c8e6980f77e388f9a521f9d6bc"; - var mint721 = Erc721.MintErc721(web3, Mint721Abi, Mint721Contract, Mint721Uri); + var mint721 = Erc721.MintErc721(web3, ABI.Erc721, Contracts.Erc721, Mint721Uri); yield return new WaitUntil(() => mint721.IsCompleted); @@ -352,7 +338,7 @@ public IEnumerator TestMintErc1155() { config.TestResponse = "0xae4160283393f81033e5ff17b2f2732b27e7db21fd3a0eba064dffc01688861c"; - var mint1155 = Erc1155.MintErc1155(web3, Mint1155Abi, Mint1155Contract, Mint1155Id, Mint1155Amount); + var mint1155 = Erc1155.MintErc1155(web3, ABI.Erc1155, Contracts.Erc1155, Mint1155Id, Mint1155Amount); yield return new WaitUntil(() => mint1155.IsCompleted); @@ -370,7 +356,7 @@ public IEnumerator TestTransferErc20() { config.TestResponse = "0x5d00d99c01cd8cc42e1ecc0f7597ab4a9875a3a28ceea3b61fc29607b6c49293"; - var transferErc20 = Erc20.TransferErc20(web3, TransferErc20ContractAddress, SendToAddress, TransferErc20Amount); + var transferErc20 = Erc20.TransferErc20(web3, Contracts.Erc20, SendToAddress, TransferErc20Amount); yield return new WaitUntil(() => transferErc20.IsCompleted); @@ -388,7 +374,7 @@ public IEnumerator TestTransferErc721() { config.TestResponse = "0xee15948660ad815b376131f5cccae4ce0578fb6bd96d4c4f5c3fa7bae172a5bb"; - var transferErc721 = Erc721.TransferErc721(web3, TransferErc721ContractAddress, SendToAddress, Transfer721Id); + var transferErc721 = Erc721.TransferErc721(web3, Contracts.Erc721, SendToAddress, Transfer721Id); yield return new WaitUntil(() => transferErc721.IsCompleted); @@ -406,7 +392,7 @@ public IEnumerator TestTransferErc1155() { config.TestResponse = "0x95ad5385b189a7f3059412db5e720a7beeef4a20b48a87f4974b8d9ff9bfb56d"; - var transferErc1155 = Erc1155.TransferErc1155(web3, TransferErc1155ContractAddress, Transfer1155Id, Transfer1155Amount, SendToAddress); + var transferErc1155 = Erc1155.TransferErc1155(web3, Contracts.Erc1155, Transfer1155Id, Transfer1155Amount, SendToAddress); yield return new WaitUntil(() => transferErc1155.IsCompleted); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs index e836b6ada..03fe534f8 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs @@ -35,7 +35,7 @@ public async Task Create(Erc1155NftReward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs index ad8b56f21..a6bc70886 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc1155RewardFactory.cs @@ -34,7 +34,7 @@ public async Task Create(Erc1155Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; try diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs index 79b92175c..fccc533fa 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc20RewardFactory.cs @@ -35,7 +35,7 @@ public async Task Create(Erc20Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC20, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc20, data.ContractAddress); var symbol = (await contract.Call("symbol"))[0].ToString(); var decimals = BigInteger.Parse((await contract.Call("decimals"))[0].ToString()); var humanizedAmount = HumanizeAmount(data.AmountRaw, decimals); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs index f322666e5..39387aa77 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Lootboxes/1.0.0/Chainlink Lootbox Sample/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs @@ -33,7 +33,7 @@ public async Task Create(Erc721Reward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC721, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc721, data.ContractAddress); var uri = (await contract.Call("tokenURI", new object[] { data.TokenId.ToString() }))[0].ToString(); Debug.Log(uri); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/Login.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/Login.cs index 0a8f958e6..3030d63a4 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/Login.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/Login.cs @@ -9,6 +9,7 @@ using ChainSafe.Gaming.Web3.Build; using ChainSafe.Gaming.Web3.Unity; using ChainSafe.GamingSdk.Gelato; +using Scripts.EVM.Token; using UnityEngine; using UnityEngine.SceneManagement; @@ -77,10 +78,7 @@ private void ConfigureCommonServices(IWeb3ServiceCollection services) * to see how it's used later on. */ services.ConfigureRegisteredContracts(contracts => - contracts.RegisterContract( - "shiba", - "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isExcluded\",\"type\":\"bool\"}],\"name\":\"ExcludeFromFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isExcluded\",\"type\":\"bool\"}],\"name\":\"ExcludeMultipleAccountsFromFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newValue\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldValue\",\"type\":\"uint256\"}],\"name\":\"GasForProcessingUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newLiquidityWallet\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldLiquidityWallet\",\"type\":\"address\"}],\"name\":\"LiquidityWalletUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"iterations\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"claims\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastProcessedIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"automatic\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"processor\",\"type\":\"address\"}],\"name\":\"ProcessedDividendTracker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensSwapped\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SendDividends\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"SetAutomatedMarketMakerPair\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensSwapped\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethReceived\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensIntoLiqudity\",\"type\":\"uint256\"}],\"name\":\"SwapAndLiquify\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"UpdateDividendTracker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"UpdateUniswapV2Router\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SHIB\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNIRewardsFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_marketingWalletAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxTxAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"automatedMarketMakerPairs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"blacklist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blacklistblock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockcount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deadWallet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"dividendTokenBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dividendTracker\",\"outputs\":[{\"internalType\":\"contract PSDividendTracker\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"excludeFromDividends\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"excluded\",\"type\":\"bool\"}],\"name\":\"excludeFromFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"excluded\",\"type\":\"bool\"}],\"name\":\"excludeMultipleAccountsFromFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasForProcessing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountDividendsInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getAccountDividendsInfoAtIndex\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getClaimWait\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastProcessedIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNumberOfDividendTokenHolders\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalDividendsDistributed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isExcludedFromFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liquidityFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketingFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"processDividendTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isBlack\",\"type\":\"bool\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"setAutomatedMarketMakerPair\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setLiquiditFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setMarketingFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"setMarketingWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setMaxTxAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setSHIBRewardsFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"salestatus\",\"type\":\"bool\"}],\"name\":\"setSaleStart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapTokensAtAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapV2Pair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapV2Router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimWait\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"updateClaimWait\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateDividendTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newValue\",\"type\":\"uint256\"}],\"name\":\"updateGasForProcessing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateUniswapV2Router\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"withdrawableDividendOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - "0x1d6f31b71e12a1a584ca20853495161c48ba491f")); + contracts.RegisterContract("CsTestErc20", ABI.Erc20, Contracts.Erc20)); } } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index f21ae936d..19cec2a1b 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -67,7 +67,7 @@ public class EvmCalls : MonoBehaviour #region Registered Contract - private string registeredContractName = "shiba"; + private string registeredContractName = "CsTestErc20"; private string registeredContractmethod = "balanceOf"; #endregion @@ -93,7 +93,7 @@ public class EvmCalls : MonoBehaviour public async void ContractCall() { object[] args = {}; - var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ARRAYTOTAL, contractAddressCall, args); + var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, contractAddressCall, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); } @@ -104,21 +104,21 @@ public async void ContractSend() { increaseAmountSend }; - var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ARRAYTOTAL, contractAddressSend, args); + var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, contractAddressSend, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } public async void GetArray() { - var response = await Evm.GetArray(Web3Accessor.Web3, contractAddressArray, ABI.ARRAYTOTAL, methodArrayGet); + var response = await Evm.GetArray(Web3Accessor.Web3, contractAddressArray, ABI.ArrayTotal, methodArrayGet); var responseString = string.Join(",\n", response.Select((list, i) => $"#{i} {string.Join((string)", ", (IEnumerable)list)}")); SampleOutputUtil.PrintResult(responseString, nameof(Evm), nameof(Evm.GetArray)); } public async void SendArray() { - var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.ARRAYTOTAL, contractAddressArray, stringArraySend); + var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.ArrayTotal, contractAddressArray, stringArraySend); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SendArray)); } @@ -131,7 +131,7 @@ public async void GetBlockNumber() public async void GetGasLimit() { - var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ARRAYTOTAL, contractAddressSend, methodSend); + var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, contractAddressSend, methodSend); SampleOutputUtil.PrintResult(gasLimit.ToString(), nameof(Evm), nameof(Evm.GetGasLimit)); } @@ -221,7 +221,7 @@ public async void IPFSUpload() public async void MultiCall() { - var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.ERC20, Erc20ContractAddress); + var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); var erc20BalanceOfCalldata = erc20Contract.Calldata(EthMethod.BalanceOf, new object[] { Erc20Account diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 072d75762..fae44e066 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -119,7 +119,7 @@ public async void Uri() /// public async void MintErc1155() { - var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.ERC1155, contractMint, idMint, amountMint); + var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, contractMint, idMint, amountMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 4c696aeb3..561fb7cb5 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -60,7 +60,7 @@ public async void BalanceOf() /// public async void CustomTokenBalanceOf() { - var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CUSTOMBALANCEOF, contractToken); + var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, contractToken); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.CustomTokenBalance)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 1ec0f1fbc..a124c34b5 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -123,7 +123,7 @@ public async void Uri() /// public async void MintErc721() { - var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.ERC721, contractMint, uriMint); + var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, contractMint, uriMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } From 6000cf0d433de1497acc1664f3a1418d1522e943 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 17:33:49 +0800 Subject: [PATCH 06/44] cleanup --- .../Tests/Runtime/Erc1155Tests.cs | 4 ++-- .../Tests/Runtime/Erc721Tests.cs | 18 ++++++++---------- .../Tests/Runtime/EvmTests.cs | 2 +- .../Tests/Runtime/SampleTestsBase.cs | 6 ++---- .../Scenes/SampleMain/SampleBehaviour.cs | 2 +- 5 files changed, 14 insertions(+), 18 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs index bc6a06bc8..23a6a8cae 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs @@ -17,8 +17,8 @@ public class Erc1155Tests // Fields #region Balances - private readonly string[] _accounts = new[] { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xE51995Cdb3b1c109E0e6E67ab5aB31CDdBB83E4a" }; - private readonly string[] _tokenIds = { "1", "2" }; + private static string[] _accounts = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xE51995Cdb3b1c109E0e6E67ab5aB31CDdBB83E4a" }; + private static string[] _tokenIds = { "1", "2" }; #endregion diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index 450880e70..b24d75c97 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -27,24 +27,25 @@ public class Erc721Tests private const string ownerOfTokenId = "2"; private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private string[] ownerOfBatchTokenIds = { "1", "2" }; - private string multicall = ""; - //private string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; - private string[] ownerOfBatchExpected = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; + private static string[] ownerOfBatchTokenIds = { "1", "2" }; + private const string multicall = ""; + //private const string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; + private static string[] ownerOfBatchExpected = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; #endregion #region Uri - + private const string uriTokenId = "1"; + private const string ExpectedUriResult = + "https://ipfs.chainsafe.io/ipfs/QmfUHuFj3YL2JMZkyXNtGRV8e9aLJgQ6gcSrqbfjWFvbqQ"; + private const string NftTextureContractAddress = "0x0288B4F1389ED7b3d3f9C7B73d4408235c0CBbc6"; #endregion private WalletConnectConfig config; private Web3 web3; - private const string NftTextureContractAddress = "0x0288B4F1389ED7b3d3f9C7B73d4408235c0CBbc6"; - #region Indexer Test Parameters private const string IndexerChain = "ethereum"; @@ -112,9 +113,6 @@ public IEnumerator TestOwnerOfBatch() CollectionAssert.AreEqual(ownerOfBatchExpected, getOwnerOfBatch.Result); } - private const string ExpectedUriResult = - "https://ipfs.chainsafe.io/ipfs/QmfUHuFj3YL2JMZkyXNtGRV8e9aLJgQ6gcSrqbfjWFvbqQ"; - [UnityTest] public IEnumerator TestUri() { diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 05addae36..5df9d5f70 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -23,7 +23,7 @@ public class EvmTests : SampleTestsBase private const string GetArrayMethod = "getStore"; private const string SendArrayMethod = "setStore"; - private static readonly List ArrayToSend = new List() + private static List ArrayToSend = new List() { "0xFb3aECf08940785D4fB3Ad87cDC6e1Ceb20e9aac", "0x92d4040e4f3591e60644aaa483821d1bd87001e3" diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs index f07ac6c0c..0b8736da5 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs @@ -7,6 +7,7 @@ using ChainSafe.Gaming.Web3.Build; using ChainSafe.Gaming.Web3.Unity; using ChainSafe.GamingSdk.Gelato; +using Scripts.EVM.Token; using UnityEngine; using UnityEngine.TestTools; @@ -49,10 +50,7 @@ public virtual IEnumerator Setup() //add any contracts we would want to use services.ConfigureRegisteredContracts(contracts => - contracts.RegisterContract( - "shiba", - "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isExcluded\",\"type\":\"bool\"}],\"name\":\"ExcludeFromFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isExcluded\",\"type\":\"bool\"}],\"name\":\"ExcludeMultipleAccountsFromFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newValue\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldValue\",\"type\":\"uint256\"}],\"name\":\"GasForProcessingUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newLiquidityWallet\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldLiquidityWallet\",\"type\":\"address\"}],\"name\":\"LiquidityWalletUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"iterations\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"claims\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastProcessedIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"automatic\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"processor\",\"type\":\"address\"}],\"name\":\"ProcessedDividendTracker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensSwapped\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SendDividends\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"SetAutomatedMarketMakerPair\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensSwapped\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethReceived\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensIntoLiqudity\",\"type\":\"uint256\"}],\"name\":\"SwapAndLiquify\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"UpdateDividendTracker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"UpdateUniswapV2Router\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SHIB\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNIRewardsFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_marketingWalletAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxTxAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"automatedMarketMakerPairs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"blacklist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blacklistblock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockcount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deadWallet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"dividendTokenBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dividendTracker\",\"outputs\":[{\"internalType\":\"contract PSDividendTracker\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"excludeFromDividends\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"excluded\",\"type\":\"bool\"}],\"name\":\"excludeFromFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"excluded\",\"type\":\"bool\"}],\"name\":\"excludeMultipleAccountsFromFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasForProcessing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountDividendsInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getAccountDividendsInfoAtIndex\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getClaimWait\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastProcessedIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNumberOfDividendTokenHolders\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalDividendsDistributed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isExcludedFromFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liquidityFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketingFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"processDividendTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isBlack\",\"type\":\"bool\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"setAutomatedMarketMakerPair\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setLiquiditFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setMarketingFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"setMarketingWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setMaxTxAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setSHIBRewardsFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"salestatus\",\"type\":\"bool\"}],\"name\":\"setSaleStart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapTokensAtAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapV2Pair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapV2Router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimWait\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"updateClaimWait\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateDividendTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newValue\",\"type\":\"uint256\"}],\"name\":\"updateGasForProcessing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateUniswapV2Router\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"withdrawableDividendOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - "0x1d6f31b71e12a1a584ca20853495161c48ba491f")); + contracts.RegisterContract("CsTestErc20", ABI.Erc20, Contracts.Erc20)); }); var buildWeb3 = web3Builder.LaunchAsync(); diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs index 5b2f461b7..87550d1cf 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs @@ -7,7 +7,7 @@ namespace Samples.Behaviours [RequireComponent(typeof(Button))] public class SampleBehaviour : MonoBehaviour { - private const string DefaultChainId = "5"; + private const string DefaultChainId = "11155111"; public async void Execute() { From 2002fccc5b5cd23de278571ea775e95fddc2c957 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 17:48:24 +0800 Subject: [PATCH 07/44] Cleanup Cleanup --- .../Tests/Runtime/Erc721Tests.cs | 3 +- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 33 ++++++++---------- .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 34 ++++++++----------- .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 33 ++++++------------ .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 31 +++++++---------- 5 files changed, 52 insertions(+), 82 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index b24d75c97..4c93990ed 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -28,8 +28,7 @@ public class Erc721Tests private const string ownerOfTokenId = "2"; private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; private static string[] ownerOfBatchTokenIds = { "1", "2" }; - private const string multicall = ""; - //private const string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; + private const string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; private static string[] ownerOfBatchExpected = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; #endregion diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 19cec2a1b..044ac6759 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -26,7 +26,6 @@ public class EvmCalls : MonoBehaviour # region Contract Send private string methodSend = "addTotal"; - private string contractAddressSend = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; private int increaseAmountSend = 1; #endregion @@ -34,13 +33,11 @@ public class EvmCalls : MonoBehaviour #region Contract Call private string methodCall = "myTotal"; - private string contractAddressCall = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; #endregion #region Get Send Array - - private string contractAddressArray = "0x5244d0453A727EDa96299384370359f4A2B5b20a"; + private string methodArrayGet = "getStore"; private string methodArraySend = "setStore"; private string[] stringArraySend = @@ -61,14 +58,13 @@ public class EvmCalls : MonoBehaviour #region Send Transaction - private string to = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; + private string toAddress = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; #endregion #region Registered Contract private string registeredContractName = "CsTestErc20"; - private string registeredContractmethod = "balanceOf"; #endregion @@ -77,13 +73,12 @@ public class EvmCalls : MonoBehaviour private string privateKey = "0x78dae1a22c7507a4ed30c06172e7614eb168d3546c13856340771e63ad3c0081"; private string messagePrivateKey = "This is a test message"; private string transactionHash = "0x123456789"; - private string chainId ="5"; + private string chainId ="11155111"; #endregion #region Multi Call - - private string Erc20ContractAddress = "0x3E0C0447e47d49195fbE329265E330643eB42e6f"; + private string Erc20Account = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion @@ -93,7 +88,7 @@ public class EvmCalls : MonoBehaviour public async void ContractCall() { object[] args = {}; - var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, contractAddressCall, args); + var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, Contracts.ArrayTotal, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); } @@ -104,21 +99,21 @@ public async void ContractSend() { increaseAmountSend }; - var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, contractAddressSend, args); + var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, Contracts.ArrayTotal, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } public async void GetArray() { - var response = await Evm.GetArray(Web3Accessor.Web3, contractAddressArray, ABI.ArrayTotal, methodArrayGet); + var response = await Evm.GetArray(Web3Accessor.Web3, Contracts.ArrayTotal, ABI.ArrayTotal, methodArrayGet); var responseString = string.Join(",\n", response.Select((list, i) => $"#{i} {string.Join((string)", ", (IEnumerable)list)}")); SampleOutputUtil.PrintResult(responseString, nameof(Evm), nameof(Evm.GetArray)); } public async void SendArray() { - var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.ArrayTotal, contractAddressArray, stringArraySend); + var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.ArrayTotal, Contracts.ArrayTotal, stringArraySend); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SendArray)); } @@ -131,7 +126,7 @@ public async void GetBlockNumber() public async void GetGasLimit() { - var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, contractAddressSend, methodSend); + var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, Contracts.ArrayTotal, methodSend); SampleOutputUtil.PrintResult(gasLimit.ToString(), nameof(Evm), nameof(Evm.GetGasLimit)); } @@ -159,13 +154,13 @@ public async void GetTransactionStatus() public async void RegisterContract() { - var balance = await Evm.UseRegisteredContract(Web3Accessor.Web3, registeredContractName, registeredContractmethod); + var balance = await Evm.UseRegisteredContract(Web3Accessor.Web3, registeredContractName, EthMethod.BalanceOf); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Evm), nameof(Evm.UseRegisteredContract)); } public async void SendTransaction() { - var transactionHash = await Evm.SendTransaction(Web3Accessor.Web3, to); + var transactionHash = await Evm.SendTransaction(Web3Accessor.Web3, toAddress); SampleOutputUtil.PrintResult(transactionHash, nameof(Evm), nameof(Evm.SendTransaction)); } @@ -221,7 +216,7 @@ public async void IPFSUpload() public async void MultiCall() { - var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); + var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Contracts.Erc20); var erc20BalanceOfCalldata = erc20Contract.Calldata(EthMethod.BalanceOf, new object[] { Erc20Account @@ -235,13 +230,13 @@ public async void MultiCall() { new Call3Value() { - Target = Erc20ContractAddress, + Target = Contracts.Erc20, AllowFailure = true, CallData = erc20BalanceOfCalldata.HexToByteArray(), }, new Call3Value() { - Target = Erc20ContractAddress, + Target = Contracts.Erc20, AllowFailure = true, CallData = erc20TotalSupplyCalldata.HexToByteArray(), } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index fae44e066..3a1467bab 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -24,31 +24,27 @@ public class Erc1155Calls : MonoBehaviour #endregion #region Balance Of - - private string contractBalanceOf = "0x2c1867bc3026178a47a677513746dcc6822a137a"; + private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private string tokenIdBalanceOf = "0x01559ae4021aee70424836ca173b6a4e647287d15cee8ac42d8c2d8d128927e5"; + private string tokenIdBalanceOf = "1"; #endregion #region Balance Of Batch - - private string contractBalanceOfBatch = "0xdc4aff511e1b94677142a43df90f948f9ae181dd"; + private string[] accountsBalanceOfBatch = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xE51995Cdb3b1c109E0e6E67ab5aB31CDdBB83E4a" }; private string[] tokenIdsBalanceOfBatch = { "1", "2" }; #endregion #region Uri - - private string contractUri = "0x2c1867BC3026178A47a677513746DCc6822A137A"; - private string tokenIdUri = "0x01559ae4021aee70424836ca173b6a4e647287d15cee8ac42d8c2d8d128927e5"; + + private string tokenIdUri = "1"; #endregion #region Mint - - private string contractMint = "0xA0a53f1Cabf7D723Ab2087400681039917D1B6D4"; + private int idMint = 1; private int amountMint = 1; @@ -57,15 +53,13 @@ public class Erc1155Calls : MonoBehaviour #region Transfer private string toAccountTransfer = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; - private string contractTransfer = "0xA0a53f1Cabf7D723Ab2087400681039917D1B6D4"; private int tokenIdTransfer = 1; private int amountTransfer = 1; #endregion #region Texture - - private string contractTexture = "0x0288B4F1389ED7b3d3f9C7B73d4408235c0CBbc6"; + private string tokenIdTexture = "0"; #endregion @@ -90,8 +84,8 @@ public async void AllErc1155() public async void BalanceOf() { var balance = tokenIdBalanceOf.StartsWith("0x") ? - await Erc1155.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf, tokenIdBalanceOf) - : await Erc1155.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf, BigInteger.Parse(tokenIdBalanceOf)); + await Erc1155.BalanceOf(Web3Accessor.Web3, Contracts.Erc1155, accountBalanceOf, tokenIdBalanceOf) + : await Erc1155.BalanceOf(Web3Accessor.Web3, Contracts.Erc1155, accountBalanceOf, BigInteger.Parse(tokenIdBalanceOf)); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Erc1155), nameof(Erc1155.BalanceOf)); } @@ -100,7 +94,7 @@ await Erc1155.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf, /// public async void BalanceOfBatch() { - var balances = await Erc1155.BalanceOfBatch(Web3Accessor.Web3, contractBalanceOfBatch, accountsBalanceOfBatch, tokenIdsBalanceOfBatch); + var balances = await Erc1155.BalanceOfBatch(Web3Accessor.Web3, Contracts.Erc1155, accountsBalanceOfBatch, tokenIdsBalanceOfBatch); var balancesString = string.Join(", ", balances); SampleOutputUtil.PrintResult(balancesString, nameof(Erc1155), nameof(Erc1155.BalanceOfBatch)); } @@ -110,7 +104,7 @@ public async void BalanceOfBatch() /// public async void Uri() { - var uri = await Erc1155.Uri(Web3Accessor.Web3, contractUri, tokenIdUri); + var uri = await Erc1155.Uri(Web3Accessor.Web3, Contracts.Erc1155, tokenIdUri); SampleOutputUtil.PrintResult(uri, nameof(Erc1155), nameof(Erc1155.Uri)); } @@ -119,7 +113,7 @@ public async void Uri() /// public async void MintErc1155() { - var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, contractMint, idMint, amountMint); + var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, Contracts.Erc1155, idMint, amountMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } @@ -129,7 +123,7 @@ public async void MintErc1155() /// public async void TransferErc1155() { - var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, contractTransfer, tokenIdTransfer, amountTransfer, toAccountTransfer); + var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTransfer, amountTransfer, toAccountTransfer); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.TransferErc1155)); } @@ -139,7 +133,7 @@ public async void TransferErc1155() /// public async void ImportNftTexture1155() { - var textureRequest = await Erc1155.ImportNftTexture1155(Web3Accessor.Web3, contractTexture, tokenIdTexture); + var textureRequest = await Erc1155.ImportNftTexture1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTexture); rawImage.texture = textureRequest; } } \ No newline at end of file diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 561fb7cb5..0f0b2d92c 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -11,20 +11,8 @@ public class Erc20Calls : MonoBehaviour #region Fields #region Balance Of - - private string contractBalanceOf = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; - private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - - #endregion - #region Custom Balance Of - - private string contractToken = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; - #endregion - - #region Native Balance Of - - private string accountNativeBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; + private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion @@ -37,7 +25,6 @@ public class Erc20Calls : MonoBehaviour #region Transfer private const string toAccount = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; - private string contractTransfer = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; private BigInteger amountTransfer = 1000000000000000; #endregion @@ -50,7 +37,7 @@ public class Erc20Calls : MonoBehaviour public async void BalanceOf() { SampleFeedback.Instance?.Activate(); - var balance = await Erc20.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf); + var balance = await Erc20.BalanceOf(Web3Accessor.Web3, Contracts.Erc20, accountBalanceOf); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Erc20), nameof(Erc20.BalanceOf)); SampleFeedback.Instance?.Deactivate(); } @@ -60,7 +47,7 @@ public async void BalanceOf() /// public async void CustomTokenBalanceOf() { - var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, contractToken); + var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, Contracts.Erc20); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.CustomTokenBalance)); } @@ -69,7 +56,7 @@ public async void CustomTokenBalanceOf() /// public async void NativeBalanceOf() { - var result = await Erc20.NativeBalanceOf(Web3Accessor.Web3, accountNativeBalanceOf); + var result = await Erc20.NativeBalanceOf(Web3Accessor.Web3, accountBalanceOf); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.NativeBalanceOf)); } @@ -78,7 +65,7 @@ public async void NativeBalanceOf() /// public async void Name() { - var result = await Erc20.Name(Web3Accessor.Web3, contractToken); + var result = await Erc20.Name(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(result, nameof(Erc20), nameof(Erc20.Name)); } @@ -87,7 +74,7 @@ public async void Name() /// public async void Symbol() { - var result = await Erc20.Symbol(Web3Accessor.Web3, contractToken); + var result = await Erc20.Symbol(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(result, nameof(Erc20), nameof(Erc20.Symbol)); } @@ -96,7 +83,7 @@ public async void Symbol() /// public async void Decimals() { - var decimals = await Erc20.Decimals(Web3Accessor.Web3, contractToken); + var decimals = await Erc20.Decimals(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(decimals.ToString(), nameof(Erc20), nameof(Erc20.Decimals)); } @@ -105,7 +92,7 @@ public async void Decimals() /// public async void TotalSupply() { - var result = await Erc20.TotalSupply(Web3Accessor.Web3, contractToken); + var result = await Erc20.TotalSupply(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.TotalSupply)); } @@ -115,7 +102,7 @@ public async void TotalSupply() public async void MintErc20() { string toAccount = await Web3Accessor.Web3.Signer.GetAddress(); - var response = await Erc20.MintErc20(Web3Accessor.Web3, contractToken, toAccount, amountMint); + var response = await Erc20.MintErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.MintErc20)); } @@ -125,7 +112,7 @@ public async void MintErc20() /// public async void TransferErc20() { - var response = await Erc20.TransferErc20(Web3Accessor.Web3, contractTransfer, toAccount, amountTransfer); + var response = await Erc20.TransferErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountTransfer); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.TransferErc20)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index a124c34b5..ea5b80c03 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -23,39 +23,34 @@ public class Erc721Calls : MonoBehaviour #endregion #region Balance Of - - private string contractBalanceOf = "0x9123541E259125657F03D7AD2A7D1a8Ec79375BA"; + private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion #region Owner Of - - private string contractOwnerOf = "0x06dc21f89f01409e7ed0e4c80eae1430962ae52c"; - private string tokenIdOwnerOf = "0x01559ae4021a565d5cc4740f1cefa95de8c1fb193949ecd32c337b03047da501"; + + private string tokenIdOwnerOf = "1"; #endregion #region Owner Of Batch - private string[] tokenIdsOwnerOfBatch = { "33", "29" }; - private string contractOwnerOfBatch = "0x47381c5c948254e6e0E324F1AA54b7B24104D92D"; + private string[] tokenIdsOwnerOfBatch = { "1", "2" }; // optional: multicall contract https://github.com/makerdao/multicall private string multicallOwnerOfBatch = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; #endregion #region Uri - - private string contractUri = "0x06dc21f89f01409e7ed0e4c80eae1430962ae52c"; + private string tokenIdUri = "0x01559ae4021a565d5cc4740f1cefa95de8c1fb193949ecd32c337b03047da501"; #endregion #region Mint - - private string contractMint = "0x0B102638532be8A1b3d0ed1fcE6eC603Bec37848"; - private string uriMint = "ipfs://QmNn5EaGR26kU7aAMH7LhkNsAGcmcyJgun3Wia4MftVicW/1.json"; + + private string uriMint = "1"; #endregion @@ -84,7 +79,7 @@ public async void AllErc721() /// public async void BalanceOf() { - var balance = await Erc721.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf); + var balance = await Erc721.BalanceOf(Web3Accessor.Web3, Contracts.Erc721, accountBalanceOf); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Erc721), nameof(Erc721.BalanceOf)); } @@ -94,8 +89,8 @@ public async void BalanceOf() public async void OwnerOf() { var owner = tokenIdOwnerOf.StartsWith("0x") ? - await Erc721.OwnerOf(Web3Accessor.Web3, contractOwnerOf, tokenIdOwnerOf) - : await Erc721.OwnerOf(Web3Accessor.Web3, contractOwnerOf, BigInteger.Parse(tokenIdOwnerOf)); + await Erc721.OwnerOf(Web3Accessor.Web3, Contracts.Erc721, tokenIdOwnerOf) + : await Erc721.OwnerOf(Web3Accessor.Web3, Contracts.Erc721, BigInteger.Parse(tokenIdOwnerOf)); SampleOutputUtil.PrintResult(owner, nameof(Erc721), nameof(Erc721.OwnerOf)); } @@ -104,7 +99,7 @@ await Erc721.OwnerOf(Web3Accessor.Web3, contractOwnerOf, tokenIdOwnerOf) /// public async void OwnerOfBatch() { - var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, contractOwnerOfBatch, tokenIdsOwnerOfBatch, multicallOwnerOfBatch); + var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, Contracts.Erc721, tokenIdsOwnerOfBatch, multicallOwnerOfBatch); var ownersString = $"{owners.Count} owner(s):\n" + string.Join(",\n", owners); SampleOutputUtil.PrintResult(ownersString, nameof(Erc721), nameof(Erc721.OwnerOfBatch)); } @@ -114,7 +109,7 @@ public async void OwnerOfBatch() /// public async void Uri() { - var uri = await Erc721.Uri(Web3Accessor.Web3, contractUri, tokenIdUri); + var uri = await Erc721.Uri(Web3Accessor.Web3, Contracts.Erc721, tokenIdUri); SampleOutputUtil.PrintResult(uri, nameof(Erc721), nameof(Erc721.Uri)); } @@ -123,7 +118,7 @@ public async void Uri() /// public async void MintErc721() { - var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, contractMint, uriMint); + var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, Contracts.Erc721, uriMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } From a3e80e24c78f8a2d80cd07e4fc7101557d0d38f1 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 18:18:53 +0800 Subject: [PATCH 08/44] ecdsa ecdsa --- .../Runtime/Scripts/EVM/Token/Evm.cs | 6 +- .../Tests/Runtime/EvmTests.cs | 57 ++++++++++++++----- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 24 ++++---- 3 files changed, 59 insertions(+), 28 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs index ce8a2d40f..1225b9348 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs @@ -132,7 +132,7 @@ public static async Task SignVerify(Web3 web3, string message) return key.GetPublicAddress() == playerAccount; } - public static string PrivateKeySignTransaction(string _privateKey, string _transaction, string _chainId) + public static string EcdsaSignTransaction(string _privateKey, string _transaction, string _chainId) { int MATIC_MAIN = 137; int MATIC_MUMBAI = 80001; @@ -163,13 +163,13 @@ public static string PrivateKeySignTransaction(string _privateKey, string _trans return signature; } - public static string PrivateKeyGetAddress(string _privateKey) + public static string EcdsaGetAddress(string _privateKey) { EthECKey key = new EthECKey(_privateKey); return key.GetPublicAddress(); } - public static string PrivateKeySignMessage(string _privateKey, string _message) + public static string EcdsaSignMessage(string _privateKey, string _message) { var signer = new EthereumMessageSigner(); string signature = signer.HashAndSign(_message, _privateKey); diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 5df9d5f70..5d18f8756 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -60,6 +60,15 @@ public class EvmTests : SampleTestsBase private const string SendToAddress = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; + #endregion + + #region ECDSA + + private string ecdsaKey = "0x78dae1a22c7507a4ed30c06172e7614eb168d3546c13856340771e63ad3c0081"; + private string ecdsaMessage = "This is a test message"; + private string transactionHash = "0x123456789"; + private string chainId ="11155111"; + #endregion private Web3 web3; @@ -116,7 +125,7 @@ public IEnumerator TestGetArray() yield return new WaitUntil(() => getArray.IsCompleted); - //convert toLower to make comparing easier + // convert toLower to make comparing easier var result = getArray.Result.ConvertAll(a => a.ConvertAll(b => b.ToLower())); Assert.AreEqual(result, new List> @@ -150,7 +159,7 @@ public IEnumerator TestGetBlockNumber() if (getBlockNumber.Exception != null) throw getBlockNumber.Exception; - //just assert successful completion because result is always changing + // just assert successful completion because result is always changing Assert.IsTrue(getBlockNumber.IsCompletedSuccessfully); } @@ -163,7 +172,7 @@ public IEnumerator TestGetGasLimit() if (getGasLimit.Exception != null) throw getGasLimit.Exception; - //just assert successful completion because result is always changing + // just assert successful completion because result is always changing Assert.IsTrue(getGasLimit.IsCompletedSuccessfully); } @@ -176,7 +185,7 @@ public IEnumerator TestGetGasPrice() if (getGasPrice.Exception != null) throw getGasPrice.Exception; - //just assert successful completion because result is always changing + // just assert successful completion because result is always changing Assert.IsTrue(getGasPrice.IsCompletedSuccessfully); } @@ -192,7 +201,7 @@ public IEnumerator TestGetGasNonce() if (getGasNonce.Exception != null) throw getGasNonce.Exception; Debug.Log(getGasNonce.Result); - //just assert successful completion because result is always changing + // just assert successful completion because result is always changing Assert.IsTrue(getGasNonce.IsCompletedSuccessfully); } @@ -207,14 +216,14 @@ public IEnumerator TestTransactionStatus() if (getTransactionStatus.Exception != null) throw getTransactionStatus.Exception; Debug.Log(getTransactionStatus.Result); - //just assert successful completion because result is always changing + // just assert successful completion because result is always changing Assert.IsTrue(getTransactionStatus.IsCompletedSuccessfully); } [UnityTest] public IEnumerator TestUseRegisteredContract() { - var useRegisteredContract = Evm.UseRegisteredContract(web3, Contracts.Erc20, EthMethod.BalanceOf); + var useRegisteredContract = Evm.UseRegisteredContract(web3, "CsTestErc20", EthMethod.BalanceOf); yield return new WaitUntil(() => useRegisteredContract.IsCompleted); @@ -222,7 +231,7 @@ public IEnumerator TestUseRegisteredContract() Assert.IsTrue(useRegisteredContract.IsCompletedSuccessfully); - Assert.AreEqual(new BigInteger(0), useRegisteredContract.Result); + Assert.AreEqual(new BigInteger(1000000000000999999), useRegisteredContract.Result); } [UnityTest] @@ -285,16 +294,38 @@ public IEnumerator TestSignVerify() Assert.AreEqual(true, signVerify.Result); } + [UnityTest] + public IEnumerator TestECDSASignTx() + { + var signTxECDSA = Evm.EcdsaSignTransaction(ecdsaKey, transactionHash, chainId); + Assert.AreEqual("0xf8cd1c5dfa0706767c7ec81b91bed9a05b65b9c5b47769206a594377c5969a9a47fe21f7328b5865815f97b7ddd09bd7b899879aac6ed7c01eda5380975a54dc01546d72", signTxECDSA); + return null; + } + + [UnityTest] + public IEnumerator TestECDSASign() + { + var signECDSA = Evm.EcdsaSignMessage(ecdsaKey, ecdsaMessage); + Assert.AreEqual("0x90bd386a185bdc5cbb13b9bba442e35036ac8e92792e74e385abbf7d9546be8720879c2075bf59124d9114b4d432173a4d6c4b118d278c3ffb51a140a625c66c1b", signECDSA); + return null; + } + + [UnityTest] + public IEnumerator TestECDSAAddress() + { + var address = Evm.EcdsaGetAddress(ecdsaKey); + Assert.AreEqual("0x428066dd8A212104Bc9240dCe3cdeA3D3A0f7979", address); + return null; + } + [UnityTest] public IEnumerator TestCustomBalanceOfErc20() { var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.CustomBalanceOf, Contracts.Erc20); + yield return new WaitUntil(() => getCustomBalanceOf.IsCompleted); - Assert.AreEqual(new BigInteger(999999), getCustomBalanceOf.Result); - //Assert.AreEqual(new BigInteger(new byte[] - //{ - // 0, 144, 99, 20, 5, 161, 13, 3 - //}), getNativeBalanceOf.Result); + + Assert.AreEqual(new BigInteger(1000000000000999999), getCustomBalanceOf.Result); } [UnityTest] diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 044ac6759..692f41d7f 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -68,10 +68,10 @@ public class EvmCalls : MonoBehaviour #endregion - #region Private Key + #region ECDSA - private string privateKey = "0x78dae1a22c7507a4ed30c06172e7614eb168d3546c13856340771e63ad3c0081"; - private string messagePrivateKey = "This is a test message"; + private string ecdsaKey = "0x78dae1a22c7507a4ed30c06172e7614eb168d3546c13856340771e63ad3c0081"; + private string ecdsaMessage = "This is a test message"; private string transactionHash = "0x123456789"; private string chainId ="11155111"; @@ -183,22 +183,22 @@ public async void SignVerify() SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SignVerify)); } - public void PrivateKeySignTransaction() + public void EcdsaSignTransaction() { - var result = Evm.PrivateKeySignTransaction(privateKey, transactionHash, chainId); - SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.PrivateKeySignTransaction)); + var result = Evm.EcdsaSignTransaction(ecdsaKey, transactionHash, chainId); + SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaSignTransaction)); } - public void PrivateKeySignMessage() + public void EcdsaSignMessage() { - var result = Evm.PrivateKeySignMessage(privateKey, messagePrivateKey); - SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.PrivateKeySignMessage)); + var result = Evm.EcdsaSignMessage(ecdsaKey, ecdsaMessage); + SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaSignMessage)); } - public void PrivateKeyGetAddress() + public void EcdsaGetAddress() { - var result = Evm.PrivateKeyGetAddress(privateKey); - SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.PrivateKeyGetAddress)); + var result = Evm.EcdsaGetAddress(ecdsaKey); + SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaGetAddress)); } public async void IPFSUpload() From 1deed80238628dcd0c23a555eae33e79b440483d Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 18:22:29 +0800 Subject: [PATCH 09/44] Update SampleBehaviour.cs --- .../Scripts/Scenes/SampleMain/SampleBehaviour.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs index 87550d1cf..5e79e2c6b 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/SampleBehaviour.cs @@ -7,6 +7,7 @@ namespace Samples.Behaviours [RequireComponent(typeof(Button))] public class SampleBehaviour : MonoBehaviour { + // This is what is used to check for gelato compatibility, if the chain doesn't match it will hide gelato functions in the test scene private const string DefaultChainId = "11155111"; public async void Execute() @@ -14,10 +15,10 @@ public async void Execute() // Activates the loading pop up to stop duplicate calls SampleFeedback.Instance?.Activate(); - // check if we're on default sample chain + // Check if we're on default sample chain if (Web3Accessor.Web3.ChainConfig.ChainId != DefaultChainId) { - // log error not exception to not break flow + // Log error not exception to not break flow Debug.LogError($"Samples are configured for Chain Id {DefaultChainId}, Please Change Chain Id in Window > ChainSafe SDK > Server Settings to {DefaultChainId}"); } From 75285e39c14c14da468f65a57853633a0834a3f5 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 18:30:03 +0800 Subject: [PATCH 10/44] Cleanup Cleanup --- .../Scenes/SampleMain.unity | 22 +++---- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 63 ++++++++++++++++++- 2 files changed, 71 insertions(+), 14 deletions(-) diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity index 059bc2c4c..4c89fc151 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity @@ -2329,7 +2329,7 @@ MonoBehaviour: m_HandleRect: {fileID: 37375165} m_Direction: 0 m_Value: 0 - m_Size: 0.20894393 + m_Size: 0.25564784 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -2505,7 +2505,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: RegisterContract + value: RegisteredContract objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -6919,7 +6919,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: PrivateKeySignTransaction + value: EcdsaSignTransaction objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -6943,11 +6943,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_Name - value: Button - SignTxPrivateKey + value: Button - SignTxECDSA objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text - value: PKSignTX + value: ECDSASignTX objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_fontSize @@ -8415,7 +8415,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: PrivateKeyGetAddress + value: EcdsaGetAddress objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -8439,11 +8439,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_Name - value: Button - GetAddressPrivateKey + value: Button - GetAddressECDSA objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text - value: PKGetAddress + value: ECDSAGetAddress objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_fontSize @@ -9391,7 +9391,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: PrivateKeySignMessage + value: EcdsaSignMessage objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -9415,11 +9415,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_Name - value: Button - SignMessagePrivateKey + value: Button - SignMessageECDSA objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text - value: PKSignMessage + value: ECDSASignMessage objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_fontSize diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 692f41d7f..06b61867e 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -85,6 +85,9 @@ public class EvmCalls : MonoBehaviour #endregion + /// + /// Calls values from a contract + /// public async void ContractCall() { object[] args = {}; @@ -92,7 +95,10 @@ public async void ContractCall() var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); } - + + /// + /// Sends values to a contract + /// public async void ContractSend() { object[] args = @@ -103,7 +109,10 @@ public async void ContractSend() var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } - + + /// + /// Gets array values from a contract + /// public async void GetArray() { var response = await Evm.GetArray(Web3Accessor.Web3, Contracts.ArrayTotal, ABI.ArrayTotal, methodArrayGet); @@ -111,6 +120,9 @@ public async void GetArray() SampleOutputUtil.PrintResult(responseString, nameof(Evm), nameof(Evm.GetArray)); } + /// + /// Sends array values to a contract + /// public async void SendArray() { var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.ArrayTotal, Contracts.ArrayTotal, stringArraySend); @@ -118,30 +130,45 @@ public async void SendArray() SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SendArray)); } + /// + /// Gets the current block number + /// public async void GetBlockNumber() { var blockNumber = await Evm.GetBlockNumber(Web3Accessor.Web3); SampleOutputUtil.PrintResult(blockNumber.ToString(), nameof(Evm), nameof(Evm.GetBlockNumber)); } + /// + /// Gets the gas limit for a specific function + /// public async void GetGasLimit() { var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, Contracts.ArrayTotal, methodSend); SampleOutputUtil.PrintResult(gasLimit.ToString(), nameof(Evm), nameof(Evm.GetGasLimit)); } + /// + /// Gets the current gas price + /// public async void GetGasPrice() { var gasPrice = await Evm.GetGasPrice(Web3Accessor.Web3); SampleOutputUtil.PrintResult(gasPrice.ToString(), nameof(Evm), nameof(Evm.GetGasPrice)); } + /// + /// Gets an accounts nonce + /// public async void GetNonce() { var nonce = await Evm.GetNonce(Web3Accessor.Web3); SampleOutputUtil.PrintResult(nonce.ToString(), nameof(Evm), nameof(Evm.GetNonce)); } + /// + /// Gets a specific transaction's status + /// public async void GetTransactionStatus() { var receipt = await Evm.GetTransactionStatus(Web3Accessor.Web3); @@ -152,30 +179,45 @@ public async void GetTransactionStatus() SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.GetTransactionStatus)); } - public async void RegisterContract() + /// + /// Uses a registered contract + /// + public async void RegisteredContract() { var balance = await Evm.UseRegisteredContract(Web3Accessor.Web3, registeredContractName, EthMethod.BalanceOf); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Evm), nameof(Evm.UseRegisteredContract)); } + /// + /// Sends a transaction + /// public async void SendTransaction() { var transactionHash = await Evm.SendTransaction(Web3Accessor.Web3, toAddress); SampleOutputUtil.PrintResult(transactionHash, nameof(Evm), nameof(Evm.SendTransaction)); } + /// + /// Encrypts a message with SHA3 + /// public void Sha3() { var hash = Evm.Sha3(messageSha); SampleOutputUtil.PrintResult(hash, nameof(Evm), nameof(Evm.Sha3)); } + /// + /// Signs a message, the result is specific to each user + /// public async void SignMessage() { var signedMessage = await Evm.SignMessage(Web3Accessor.Web3, messageSign); SampleOutputUtil.PrintResult(signedMessage, nameof(Evm), nameof(Evm.SignMessage)); } + /// + /// Signs a message and verifs account ownership + /// public async void SignVerify() { var signatureVerified = await Evm.SignVerify(Web3Accessor.Web3, messageSignVerify); @@ -183,24 +225,36 @@ public async void SignVerify() SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SignVerify)); } + /// + /// Signs a transaction via ECDSA + /// public void EcdsaSignTransaction() { var result = Evm.EcdsaSignTransaction(ecdsaKey, transactionHash, chainId); SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaSignTransaction)); } + /// + /// Signs a message via ECDSA + /// public void EcdsaSignMessage() { var result = Evm.EcdsaSignMessage(ecdsaKey, ecdsaMessage); SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaSignMessage)); } + /// + /// Gets an addres via ECDSA key + /// public void EcdsaGetAddress() { var result = Evm.EcdsaGetAddress(ecdsaKey); SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaGetAddress)); } + /// + /// Uploads to IPFS + /// public async void IPFSUpload() { var cid = await Evm.Upload(new IpfsUploadRequest @@ -214,6 +268,9 @@ public async void IPFSUpload() SampleOutputUtil.PrintResult(cid, nameof(IpfsSample), nameof(IpfsSample.Upload)); } + /// + /// Makes multiple calls + /// public async void MultiCall() { var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Contracts.Erc20); From 168e2ec6e06cbd6b00d2a6b4657943057e85fbc1 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 18:38:35 +0800 Subject: [PATCH 11/44] cleanup cleanup --- .../Tests/Runtime/Erc1155Tests.cs | 17 +++++++++++------ .../Tests/Runtime/Erc20Tests.cs | 17 +++++++++++------ .../Tests/Runtime/Erc721Tests.cs | 17 +++++++++++------ .../Tests/Runtime/EvmTests.cs | 4 ++++ .../Tests/Runtime/SampleTestsBase.cs | 14 ++++++++------ 5 files changed, 45 insertions(+), 24 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs index 23a6a8cae..28244a577 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs @@ -14,7 +14,8 @@ public class Erc1155Tests { - // Fields + #region Fields + #region Balances private static string[] _accounts = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xE51995Cdb3b1c109E0e6E67ab5aB31CDdBB83E4a" }; @@ -22,6 +23,8 @@ public class Erc1155Tests #endregion + #endregion + private Web3 web3; #region Indexer Test Parameters @@ -38,17 +41,18 @@ public class Erc1155Tests [UnitySetUp] public IEnumerator Setup() { - //wait for some time to initialize + // Wait for some time to initialize yield return new WaitForSeconds(5f); - //For whatever reason, in github this won't load + // Set project config, fallback is for github as it doesn't load var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } - + + // Create web3builder & assign services var web3Builder = new Web3Builder(projectConfigScriptableObject) .Configure(services => { @@ -58,9 +62,10 @@ public IEnumerator Setup() var buildWeb3 = web3Builder.LaunchAsync(); - //wait until for async task to finish + // Wait until for async task to finish yield return new WaitUntil(() => buildWeb3.IsCompleted); - + + // Assign result to web3 web3 = buildWeb3.Result; } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs index 8f6e64115..31fccf062 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs @@ -14,13 +14,16 @@ public class Erc20Tests { - // Fields + #region Fields + #region Contract Calls private const string Account = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; // Mint ERC20 function adjusts the total supply so we have a duplicate contract that doesn't change for the test to pass private const string TotalSupplyAddress = "0xd1A103234d1D65E0E817A523d679B114cf86521A"; + #endregion + #endregion private Web3 web3; @@ -29,17 +32,18 @@ public class Erc20Tests [UnitySetUp] public IEnumerator Setup() { - //wait for some time to initialize + // Wait for some time to initialize yield return new WaitForSeconds(5f); - //For whatever reason, in github this won't load + // Set project config, fallback is for github as it doesn't load var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } - + + // Create web3builder & assign services var web3Builder = new Web3Builder(projectConfigScriptableObject).Configure(services => { services.UseUnityEnvironment(); @@ -48,9 +52,10 @@ public IEnumerator Setup() var buildWeb3 = web3Builder.LaunchAsync(); - //wait until for async task to finish + // Wait until for async task to finish yield return new WaitUntil(() => buildWeb3.IsCompleted); - + + // Assign result to web3 web3 = buildWeb3.Result; } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index 4c93990ed..19a93c49c 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -16,7 +16,8 @@ public class Erc721Tests { - // Fields + #region Fields + #region Balances private const string balanceOfAccount = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; @@ -42,6 +43,8 @@ public class Erc721Tests #endregion + #endregion + private WalletConnectConfig config; private Web3 web3; @@ -59,17 +62,18 @@ public class Erc721Tests [UnitySetUp] public IEnumerator Setup() { - //wait for some time to initialize + // Wait for some time to initialize yield return new WaitForSeconds(5f); - //For whatever reason, in github this won't load + // Set project config, fallback is for github as it doesn't load var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } - + + // Create web3builder & assign services var web3Builder = new Web3Builder(projectConfigScriptableObject) .Configure(services => { @@ -79,9 +83,10 @@ public IEnumerator Setup() var buildWeb3 = web3Builder.LaunchAsync(); - //wait until for async task to finish + // Wait until for async task to finish yield return new WaitUntil(() => buildWeb3.IsCompleted); - + + // Assign result to web3 web3 = buildWeb3.Result; } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 5d18f8756..84651e665 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -9,6 +9,8 @@ public class EvmTests : SampleTestsBase { + #region Fields + #region ContractCalls private const string ContractSendMethod = "addTotal"; @@ -71,6 +73,8 @@ public class EvmTests : SampleTestsBase #endregion + #endregion + private Web3 web3; [UnitySetUp] diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs index 0b8736da5..c6870b65f 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs @@ -20,17 +20,18 @@ public class SampleTestsBase [UnitySetUp] public virtual IEnumerator Setup() { - // wait for some time to initialize + // Wait for some time to initialize yield return new WaitForSeconds(5f); - // For whatever reason, in github this won't load + // Set project config, fallback is for github as it doesn't load var projectConfigScriptableObject = ProjectConfigUtilities.Load(); if (projectConfigScriptableObject == null) { projectConfigScriptableObject = ProjectConfigUtilities.Load("3dc3e125-71c4-4511-a367-e981a6a94371", "11155111", "Ethereum", "Sepolia", "Seth", "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"); } - + + // Create web3builder & assign services var web3Builder = new Web3Builder(projectConfigScriptableObject).Configure(services => { services.UseUnityEnvironment(); @@ -39,7 +40,7 @@ public virtual IEnumerator Setup() config = new WalletConnectConfig { - // set wallet to testing + // Set wallet to testing Testing = true, TestWalletAddress = "0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44", }; @@ -48,16 +49,17 @@ public virtual IEnumerator Setup() services.UseWalletConnectSigner(); services.UseWalletConnectTransactionExecutor(); - //add any contracts we would want to use + // Add any contracts we would want to use services.ConfigureRegisteredContracts(contracts => contracts.RegisterContract("CsTestErc20", ABI.Erc20, Contracts.Erc20)); }); var buildWeb3 = web3Builder.LaunchAsync(); - //wait until for async task to finish + // Wait until for async task to finish yield return new WaitUntil(() => buildWeb3.IsCompleted); + // Assign result to web3 web3Result = buildWeb3.Result; } From 9e25d78da3e85503106bc4d55215564f8283f555 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 18:57:55 +0800 Subject: [PATCH 12/44] cleanup cleanup --- .../Tests/Runtime/Erc1155Tests.cs | 1 - .../Tests/Runtime/Erc20Tests.cs | 16 +-- .../Tests/Runtime/Erc721Tests.cs | 5 +- .../Tests/Runtime/EvmTests.cs | 117 ++---------------- .../Tests/Runtime/SampleTestsBase.cs | 2 - .../Scenes/SampleMain.unity | 16 ++- 6 files changed, 20 insertions(+), 137 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs index 28244a577..ee4c616c9 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs @@ -74,7 +74,6 @@ public IEnumerator TestBalanceOf() { var getBalanceOf = Erc1155.BalanceOf(web3, Contracts.Erc1155, _accounts[0], _tokenIds[0]); yield return new WaitUntil(() => getBalanceOf.IsCompleted); - Assert.AreEqual(new BigInteger(2), getBalanceOf.Result); } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs index 31fccf062..87c899f0e 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs @@ -63,12 +63,8 @@ public IEnumerator Setup() public IEnumerator TestBalanceOf() { var getBalanceOf = Erc20.BalanceOf(web3, Contracts.Erc20, Account); - yield return new WaitUntil(() => getBalanceOf.IsCompleted); - Assert.AreEqual(new BigInteger(1000000000000000000), getBalanceOf.Result); - //Assert.AreEqual(new BigInteger(new byte[] - //{ - // 0, 0, 0, 64, 234, 237, 116, 70, 208, 156, 44, 159, 12 - //}), getBalanceOf.Result); + yield return new WaitUntil(() => getBalanceOf.IsCompleted); + Assert.AreEqual(new BigInteger(1000000000000000000), getBalanceOf.Result); } [UnityTest] @@ -77,10 +73,6 @@ public IEnumerator TestNativeBalanceOf() var getNativeBalanceOf = Erc20.NativeBalanceOf(web3, Account); yield return new WaitUntil(() => getNativeBalanceOf.IsCompleted); Assert.AreEqual(new BigInteger(500000000000000000), getNativeBalanceOf.Result); - //Assert.AreEqual(new BigInteger(new byte[] - //{ - // 0, 144, 99, 20, 5, 161, 13, 3 - //}), getNativeBalanceOf.Result); } [UnityTest] @@ -113,9 +105,5 @@ public IEnumerator TestTotalSupply() var getTotalSupply = Erc20.TotalSupply(web3, TotalSupplyAddress); yield return new WaitUntil(() => getTotalSupply.IsCompleted); Assert.AreEqual(new BigInteger(1000000000000000000), getTotalSupply.Result); - //Assert.AreEqual(new BigInteger(new byte[] - //{ - // 0, 0, 0, 64, 234, 237, 116, 70, 208, 156, 44, 159, 12 - //}), getTotalSupply.Result); } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index 19a93c49c..c1180cd16 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -95,7 +95,6 @@ public IEnumerator TestBalanceOf() { var getBalanceOf = Erc721.BalanceOf(web3, Contracts.Erc721, balanceOfAccount); yield return new WaitUntil(() => getBalanceOf.IsCompleted); - Assert.AreEqual(3, getBalanceOf.Result); } @@ -104,16 +103,14 @@ public IEnumerator TestOwnerOf() { var getOwnerOf = Erc721.OwnerOf(web3, Contracts.Erc721, ownerOfTokenId); yield return new WaitUntil(() => getOwnerOf.IsCompleted); - Assert.AreEqual(ownerOfExpected, getOwnerOf.Result); } - + [UnityTest] public IEnumerator TestOwnerOfBatch() { var getOwnerOfBatch = Erc721.OwnerOfBatch(web3, Contracts.Erc721, ownerOfBatchTokenIds, multicall); yield return new WaitUntil(() => getOwnerOfBatch.IsCompleted); - CollectionAssert.AreEqual(ownerOfBatchExpected, getOwnerOfBatch.Result); } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 84651e665..8e56aea7f 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -81,7 +81,6 @@ public class EvmTests : SampleTestsBase public override IEnumerator Setup() { yield return base.Setup(); - web3 = web3Result; } @@ -89,15 +88,10 @@ public override IEnumerator Setup() public IEnumerator TestContractCall() { object[] args = { config.TestWalletAddress }; - var callContract = Evm.ContractCall(web3, ContractCallMethod, ABI.ArrayTotal, Contracts.ArrayTotal, args); - yield return new WaitUntil(() => callContract.IsCompleted); - if (callContract.Exception != null) throw callContract.Exception; - Assert.IsTrue(callContract.IsCompletedSuccessfully); - Assert.AreEqual(CallAmount, callContract.Result[0].ToString()); } @@ -105,20 +99,14 @@ public IEnumerator TestContractCall() public IEnumerator TestContractSend() { config.TestResponse = "0x3f32788de980b1570256a805c7ef193e48da263954d4c106bd7b9514d460753e"; - object[] args = { IncreaseAmount }; - var sendContract = Evm.ContractSend(web3, ContractSendMethod, ABI.ArrayTotal, Contracts.ArrayTotal, args); - yield return new WaitUntil(() => sendContract.IsCompleted); - if (sendContract.Exception != null) throw sendContract.Exception; - Assert.IsTrue(sendContract.IsCompletedSuccessfully); - Assert.AreEqual(string.Empty, sendContract.Result); } @@ -126,12 +114,9 @@ public IEnumerator TestContractSend() public IEnumerator TestGetArray() { var getArray = Evm.GetArray(web3, Contracts.ArrayTotal, ABI.ArrayTotal, GetArrayMethod); - yield return new WaitUntil(() => getArray.IsCompleted); - - // convert toLower to make comparing easier + // Convert toLower to make comparing easier var result = getArray.Result.ConvertAll(a => a.ConvertAll(b => b.ToLower())); - Assert.AreEqual(result, new List> { ArrayToSend.ConvertAll(a => a.ToLower()) @@ -142,15 +127,10 @@ public IEnumerator TestGetArray() public IEnumerator TestSendArray() { config.TestResponse = "0x3446b949c3d214fba7e61c9cf127eac6cd0b2983564cf76be618099879b6f1e1"; - var sendArray = Evm.SendArray(web3, SendArrayMethod, ABI.ArrayTotal, Contracts.ArrayTotal, ArrayToSend.ToArray()); - yield return new WaitUntil(() => sendArray.IsCompleted); - if (sendArray.Exception != null) throw sendArray.Exception; - Assert.IsTrue(sendArray.IsCompletedSuccessfully); - Assert.AreEqual(string.Empty, sendArray.Result); } @@ -158,25 +138,19 @@ public IEnumerator TestSendArray() public IEnumerator TestGetBlockNumber() { var getBlockNumber = Evm.GetBlockNumber(web3); - yield return new WaitUntil(() => getBlockNumber.IsCompleted); - if (getBlockNumber.Exception != null) throw getBlockNumber.Exception; - - // just assert successful completion because result is always changing + // Just assert successful completion because result is always changing Assert.IsTrue(getBlockNumber.IsCompletedSuccessfully); } [UnityTest] public IEnumerator TestGetGasLimit() { - var getGasLimit = Evm.GetGasLimit(web3, ABI.ArrayTotal, Contracts.ArrayTotal, ContractSendMethod); - + var getGasLimit = Evm.GetGasLimit(web3, ABI.Erc20, Contracts.Erc20, EthMethod.Transfer); yield return new WaitUntil(() => getGasLimit.IsCompleted); - if (getGasLimit.Exception != null) throw getGasLimit.Exception; - - // just assert successful completion because result is always changing + // Just assert successful completion because result is always changing Assert.IsTrue(getGasLimit.IsCompletedSuccessfully); } @@ -184,12 +158,9 @@ public IEnumerator TestGetGasLimit() public IEnumerator TestGetGasPrice() { var getGasPrice = Evm.GetGasPrice(web3); - yield return new WaitUntil(() => getGasPrice.IsCompleted); - if (getGasPrice.Exception != null) throw getGasPrice.Exception; - - // just assert successful completion because result is always changing + // Just assert successful completion because result is always changing Assert.IsTrue(getGasPrice.IsCompletedSuccessfully); } @@ -197,15 +168,10 @@ public IEnumerator TestGetGasPrice() public IEnumerator TestGetGasNonce() { config.TestResponse = "0xaba88d9a1977c8d78ddfb3d973798eb061bd495189d7cbfa832f895896417cd1"; - var getGasNonce = Evm.GetNonce(web3); - yield return new WaitUntil(() => getGasNonce.IsCompleted); - if (getGasNonce.Exception != null) throw getGasNonce.Exception; - - Debug.Log(getGasNonce.Result); - // just assert successful completion because result is always changing + // Just assert successful completion because result is always changing Assert.IsTrue(getGasNonce.IsCompletedSuccessfully); } @@ -213,14 +179,10 @@ public IEnumerator TestGetGasNonce() public IEnumerator TestTransactionStatus() { config.TestResponse = "0xaba88d9a1977c8d78ddfb3d973798eb061bd495189d7cbfa832f895896417cd1"; - var getTransactionStatus = Evm.GetTransactionStatus(web3); - yield return new WaitUntil(() => getTransactionStatus.IsCompleted); - if (getTransactionStatus.Exception != null) throw getTransactionStatus.Exception; - Debug.Log(getTransactionStatus.Result); - // just assert successful completion because result is always changing + // Just assert successful completion because result is always changing Assert.IsTrue(getTransactionStatus.IsCompletedSuccessfully); } @@ -228,13 +190,9 @@ public IEnumerator TestTransactionStatus() public IEnumerator TestUseRegisteredContract() { var useRegisteredContract = Evm.UseRegisteredContract(web3, "CsTestErc20", EthMethod.BalanceOf); - yield return new WaitUntil(() => useRegisteredContract.IsCompleted); - if (useRegisteredContract.Exception != null) throw useRegisteredContract.Exception; - Assert.IsTrue(useRegisteredContract.IsCompletedSuccessfully); - Assert.AreEqual(new BigInteger(1000000000000999999), useRegisteredContract.Result); } @@ -242,15 +200,10 @@ public IEnumerator TestUseRegisteredContract() public IEnumerator TestSendTransaction() { config.TestResponse = "0x3446b949c3d214fba7e61c9cf127eac6cd0b2983564cf76be618099879b6f1e1"; - var sendTransaction = Evm.SendTransaction(web3, SendToAddress); - yield return new WaitUntil(() => sendTransaction.IsCompleted); - if (sendTransaction.Exception != null) throw sendTransaction.Exception; - Assert.IsTrue(sendTransaction.IsCompletedSuccessfully); - Assert.AreEqual(config.TestResponse, sendTransaction.Result); } @@ -258,9 +211,7 @@ public IEnumerator TestSendTransaction() public IEnumerator TestSha3() { var sha3 = Evm.Sha3("It’s dangerous to go alone, take this!"); - Assert.AreEqual("45760485edafabcbb28570e7da5ddda4639abb4794de9af6de1d6669cbf220fc", sha3); - yield return null; } @@ -269,15 +220,10 @@ public IEnumerator TestSignMessage() { config.TestResponse = "0xda2880dde86b7d870ac9ddfa690010bed8a679350415f8e9cce02d87bac91651081c40455538bce7a18792e3f2ea56457183e8dba8568f3a92785ab0d743ce0b1b"; - var signMessage = Evm.SignMessage(web3,"The right man in the wrong place can make all the difference in the world."); - yield return new WaitUntil(() => signMessage.IsCompleted); - if (signMessage.Exception != null) throw signMessage.Exception; - Assert.IsTrue(signMessage.IsCompletedSuccessfully); - Assert.AreEqual(config.TestResponse, signMessage.Result); } @@ -286,15 +232,10 @@ public IEnumerator TestSignVerify() { config.TestResponse = "0xda2880dde86b7d870ac9ddfa690010bed8a679350415f8e9cce02d87bac91651081c40455538bce7a18792e3f2ea56457183e8dba8568f3a92785ab0d743ce0b1b"; - var signVerify = Evm.SignVerify(web3, "A man chooses, a slave obeys."); - yield return new WaitUntil(() => signVerify.IsCompleted); - if (signVerify.Exception != null) throw signVerify.Exception; - Assert.IsTrue(signVerify.IsCompletedSuccessfully); - Assert.AreEqual(true, signVerify.Result); } @@ -326,9 +267,7 @@ public IEnumerator TestECDSAAddress() public IEnumerator TestCustomBalanceOfErc20() { var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.CustomBalanceOf, Contracts.Erc20); - yield return new WaitUntil(() => getCustomBalanceOf.IsCompleted); - Assert.AreEqual(new BigInteger(1000000000000999999), getCustomBalanceOf.Result); } @@ -336,17 +275,10 @@ public IEnumerator TestCustomBalanceOfErc20() public IEnumerator TestMintErc20() { config.TestResponse = "0xbcff4755f1736b8ddfedb6d88fa6fbea5630fcc7e2f4b6e88da6ad19eb1fcaa6"; - var mint20 = Erc20.MintErc20(web3, Contracts.Erc20, SendToAddress, Mint20Amount); - yield return new WaitUntil(() => mint20.IsCompleted); - if (mint20.Exception != null) throw mint20.Exception; - Assert.IsTrue(mint20.IsCompletedSuccessfully); - - Debug.Log(mint20.Result); - Assert.AreEqual(string.Empty, mint20.Result); } @@ -354,17 +286,10 @@ public IEnumerator TestMintErc20() public IEnumerator TestMintErc721() { config.TestResponse = "0xe4ff82c87784590c747ee8528506168f8a3165c8e6980f77e388f9a521f9d6bc"; - var mint721 = Erc721.MintErc721(web3, ABI.Erc721, Contracts.Erc721, Mint721Uri); - yield return new WaitUntil(() => mint721.IsCompleted); - if (mint721.Exception != null) throw mint721.Exception; - Assert.IsTrue(mint721.IsCompletedSuccessfully); - - Debug.Log(mint721.Result); - Assert.AreEqual(string.Empty, mint721.Result); } @@ -372,17 +297,10 @@ public IEnumerator TestMintErc721() public IEnumerator TestMintErc1155() { config.TestResponse = "0xae4160283393f81033e5ff17b2f2732b27e7db21fd3a0eba064dffc01688861c"; - var mint1155 = Erc1155.MintErc1155(web3, ABI.Erc1155, Contracts.Erc1155, Mint1155Id, Mint1155Amount); - yield return new WaitUntil(() => mint1155.IsCompleted); - if (mint1155.Exception != null) throw mint1155.Exception; - Assert.IsTrue(mint1155.IsCompletedSuccessfully); - - Debug.Log(mint1155.Result); - Assert.AreEqual(string.Empty, mint1155.Result); } @@ -390,17 +308,10 @@ public IEnumerator TestMintErc1155() public IEnumerator TestTransferErc20() { config.TestResponse = "0x5d00d99c01cd8cc42e1ecc0f7597ab4a9875a3a28ceea3b61fc29607b6c49293"; - var transferErc20 = Erc20.TransferErc20(web3, Contracts.Erc20, SendToAddress, TransferErc20Amount); - yield return new WaitUntil(() => transferErc20.IsCompleted); - if (transferErc20.Exception != null) throw transferErc20.Exception; - Assert.IsTrue(transferErc20.IsCompletedSuccessfully); - - Debug.Log(transferErc20.Result); - Assert.AreEqual(new object[] { false }, transferErc20.Result); } @@ -408,17 +319,10 @@ public IEnumerator TestTransferErc20() public IEnumerator TestTransferErc721() { config.TestResponse = "0xee15948660ad815b376131f5cccae4ce0578fb6bd96d4c4f5c3fa7bae172a5bb"; - var transferErc721 = Erc721.TransferErc721(web3, Contracts.Erc721, SendToAddress, Transfer721Id); - yield return new WaitUntil(() => transferErc721.IsCompleted); - if (transferErc721.Exception != null) throw transferErc721.Exception; - Assert.IsTrue(transferErc721.IsCompletedSuccessfully); - - Debug.Log(transferErc721.Result); - Assert.AreEqual(string.Empty, transferErc721.Result); } @@ -426,17 +330,10 @@ public IEnumerator TestTransferErc721() public IEnumerator TestTransferErc1155() { config.TestResponse = "0x95ad5385b189a7f3059412db5e720a7beeef4a20b48a87f4974b8d9ff9bfb56d"; - var transferErc1155 = Erc1155.TransferErc1155(web3, Contracts.Erc1155, Transfer1155Id, Transfer1155Amount, SendToAddress); - yield return new WaitUntil(() => transferErc1155.IsCompleted); - if (transferErc1155.Exception != null) throw transferErc1155.Exception; - yield return new WaitUntil(() => transferErc1155.IsCompletedSuccessfully); - - Debug.Log(transferErc1155.Result); - Assert.AreEqual(string.Empty, transferErc1155.Result); } } diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs index c6870b65f..1197cf432 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/SampleTestsBase.cs @@ -67,9 +67,7 @@ public virtual IEnumerator Setup() public virtual IEnumerator TearDown() { config.Testing = false; - web3Result.TerminateAsync(); - yield return null; } } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity index 4c89fc151..114a3b67c 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity @@ -506,7 +506,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -514,15 +514,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 245 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalScale.x @@ -566,11 +566,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 122.5 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -187 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -640,6 +640,10 @@ PrefabInstance: propertyPath: m_Name value: Button - OwnerOfBatch objectReference: {fileID: 0} + - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_IsActive + value: 0 + objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text value: OwnerOfBatch From da919be27cc567b740a931a71cfa9b922f43cde3 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 18:59:10 +0800 Subject: [PATCH 13/44] Update SampleMain.unity --- .../Web3.Unity Samples/Scenes/SampleMain.unity | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity index 114a3b67c..7ff6fd35b 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity @@ -506,7 +506,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -514,15 +514,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 245 + value: 0 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 50 + value: 0 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalScale.x @@ -566,11 +566,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 122.5 + value: 0 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: -187 + value: 0 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -642,7 +642,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text From ddef9648a9f2ed956fd66b868263e36e461be95f Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 11:00:56 +0000 Subject: [PATCH 14/44] Auto-duplicate Packages Samples --- .../Scene/Rewards/Erc1155NftRewardFactory.cs | 4 +- .../Scene/Rewards/Erc1155RewardFactory.cs | 4 +- .../Scene/Rewards/Erc20RewardFactory.cs | 4 +- .../Scene/Rewards/Erc721NftRewardFactory.cs | 3 +- .../Web3.Unity/Scenes/SampleMain.unity | 26 ++-- .../Web3.Unity/Scripts/Scenes/Login.cs | 6 +- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 131 ++++++++++++------ .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 35 ++--- .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 34 ++--- .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 32 ++--- .../Scenes/SampleMain/SampleBehaviour.cs | 7 +- 11 files changed, 157 insertions(+), 129 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs index 237080841..03fe534f8 100644 --- a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs +++ b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155NftRewardFactory.cs @@ -3,7 +3,7 @@ using LootBoxes.Chainlink.Scene.StageItems; using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; -using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; using UnityEngine.Networking; @@ -35,7 +35,7 @@ public async Task Create(Erc1155NftReward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155RewardFactory.cs b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155RewardFactory.cs index 1d3a84ca2..a6bc70886 100644 --- a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155RewardFactory.cs +++ b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc1155RewardFactory.cs @@ -3,7 +3,7 @@ using LootBoxes.Chainlink.Scene.StageItems; using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; -using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; namespace LootBoxes.Chainlink.Scene @@ -34,7 +34,7 @@ public async Task Create(Erc1155Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_1155, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc1155, data.ContractAddress); var uri = (await contract.Call("uri", new object[] { data.TokenId }))[0].ToString(); Erc1155MetaData metadata; try diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc20RewardFactory.cs b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc20RewardFactory.cs index a56efd439..fccc533fa 100644 --- a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc20RewardFactory.cs +++ b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc20RewardFactory.cs @@ -5,7 +5,7 @@ using LootBoxes.Chainlink.Scene.StageItems; using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; -using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; namespace LootBoxes.Chainlink.Scene @@ -35,7 +35,7 @@ public async Task Create(Erc20Reward data) { var item = Instantiate(CoinRewardItemPrefab); var reward = (CoinReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_20, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc20, data.ContractAddress); var symbol = (await contract.Call("symbol"))[0].ToString(); var decimals = BigInteger.Parse((await contract.Call("decimals"))[0].ToString()); var humanizedAmount = HumanizeAmount(data.AmountRaw, decimals); diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs index dac346508..39387aa77 100644 --- a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs +++ b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/Scene/Rewards/Erc721NftRewardFactory.cs @@ -4,6 +4,7 @@ using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Lootboxes.Chainlink; using ChainSafe.Gaming.UnityPackage; +using Scripts.EVM.Token; using UnityEngine; namespace LootBoxes.Chainlink.Scene @@ -32,7 +33,7 @@ public async Task Create(Erc721Reward data) { var item = Instantiate(NftRewardItemPrefab); var reward = (NftReward)item.Reward; - var contract = contractBuilder.Build(ABI.ERC_721, data.ContractAddress); + var contract = contractBuilder.Build(ABI.Erc721, data.ContractAddress); var uri = (await contract.Call("tokenURI", new object[] { data.TokenId.ToString() }))[0].ToString(); Debug.Log(uri); diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity index 059bc2c4c..7ff6fd35b 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity @@ -640,6 +640,10 @@ PrefabInstance: propertyPath: m_Name value: Button - OwnerOfBatch objectReference: {fileID: 0} + - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_IsActive + value: 1 + objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text value: OwnerOfBatch @@ -2329,7 +2333,7 @@ MonoBehaviour: m_HandleRect: {fileID: 37375165} m_Direction: 0 m_Value: 0 - m_Size: 0.20894393 + m_Size: 0.25564784 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -2505,7 +2509,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: RegisterContract + value: RegisteredContract objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -6919,7 +6923,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: PrivateKeySignTransaction + value: EcdsaSignTransaction objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -6943,11 +6947,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_Name - value: Button - SignTxPrivateKey + value: Button - SignTxECDSA objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text - value: PKSignTX + value: ECDSASignTX objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_fontSize @@ -8415,7 +8419,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: PrivateKeyGetAddress + value: EcdsaGetAddress objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -8439,11 +8443,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_Name - value: Button - GetAddressPrivateKey + value: Button - GetAddressECDSA objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text - value: PKGetAddress + value: ECDSAGetAddress objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_fontSize @@ -9391,7 +9395,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: PrivateKeySignMessage + value: EcdsaSignMessage objectReference: {fileID: 0} - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName @@ -9415,11 +9419,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_Name - value: Button - SignMessagePrivateKey + value: Button - SignMessageECDSA objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_text - value: PKSignMessage + value: ECDSASignMessage objectReference: {fileID: 0} - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_fontSize diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/Login.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/Login.cs index 0a8f958e6..3030d63a4 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/Login.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/Login.cs @@ -9,6 +9,7 @@ using ChainSafe.Gaming.Web3.Build; using ChainSafe.Gaming.Web3.Unity; using ChainSafe.GamingSdk.Gelato; +using Scripts.EVM.Token; using UnityEngine; using UnityEngine.SceneManagement; @@ -77,10 +78,7 @@ private void ConfigureCommonServices(IWeb3ServiceCollection services) * to see how it's used later on. */ services.ConfigureRegisteredContracts(contracts => - contracts.RegisterContract( - "shiba", - "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isExcluded\",\"type\":\"bool\"}],\"name\":\"ExcludeFromFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"isExcluded\",\"type\":\"bool\"}],\"name\":\"ExcludeMultipleAccountsFromFees\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"newValue\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"oldValue\",\"type\":\"uint256\"}],\"name\":\"GasForProcessingUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newLiquidityWallet\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldLiquidityWallet\",\"type\":\"address\"}],\"name\":\"LiquidityWalletUpdated\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"iterations\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"claims\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"lastProcessedIndex\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"automatic\",\"type\":\"bool\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"processor\",\"type\":\"address\"}],\"name\":\"ProcessedDividendTracker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensSwapped\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"SendDividends\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"SetAutomatedMarketMakerPair\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensSwapped\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"ethReceived\",\"type\":\"uint256\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"tokensIntoLiqudity\",\"type\":\"uint256\"}],\"name\":\"SwapAndLiquify\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"UpdateDividendTracker\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"oldAddress\",\"type\":\"address\"}],\"name\":\"UpdateUniswapV2Router\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"SHIB\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UNIRewardsFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_marketingWalletAddress\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"_maxTxAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"automatedMarketMakerPairs\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"name\":\"blacklist\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blacklistblock\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"blockcount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"claim\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"deadWallet\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"subtractedValue\",\"type\":\"uint256\"}],\"name\":\"decreaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"dividendTokenBalanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"dividendTracker\",\"outputs\":[{\"internalType\":\"contract PSDividendTracker\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"excludeFromDividends\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"excluded\",\"type\":\"bool\"}],\"name\":\"excludeFromFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address[]\",\"name\":\"accounts\",\"type\":\"address[]\"},{\"internalType\":\"bool\",\"name\":\"excluded\",\"type\":\"bool\"}],\"name\":\"excludeMultipleAccountsFromFees\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"gasForProcessing\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"getAccountDividendsInfo\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"index\",\"type\":\"uint256\"}],\"name\":\"getAccountDividendsInfoAtIndex\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"int256\",\"name\":\"\",\"type\":\"int256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getClaimWait\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getLastProcessedIndex\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getNumberOfDividendTokenHolders\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"getTotalDividendsDistributed\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"addedValue\",\"type\":\"uint256\"}],\"name\":\"increaseAllowance\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"isExcludedFromFees\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"liquidityFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"marketingFee\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"gas\",\"type\":\"uint256\"}],\"name\":\"processDividendTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"addr\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"isBlack\",\"type\":\"bool\"}],\"name\":\"setAddress\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"pair\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"value\",\"type\":\"bool\"}],\"name\":\"setAutomatedMarketMakerPair\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setLiquiditFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setMarketingFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address payable\",\"name\":\"wallet\",\"type\":\"address\"}],\"name\":\"setMarketingWallet\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"setMaxTxAmount\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"setSHIBRewardsFee\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bool\",\"name\":\"salestatus\",\"type\":\"bool\"}],\"name\":\"setSaleStart\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"swapTokensAtAmount\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalFees\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"recipient\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapV2Pair\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"uniswapV2Router\",\"outputs\":[{\"internalType\":\"contract IUniswapV2Router02\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"claimWait\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"a\",\"type\":\"address\"}],\"name\":\"updateClaimWait\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateDividendTracker\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"newValue\",\"type\":\"uint256\"}],\"name\":\"updateGasForProcessing\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newAddress\",\"type\":\"address\"}],\"name\":\"updateUniswapV2Router\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"withdrawableDividendOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"stateMutability\":\"payable\",\"type\":\"receive\"}]", - "0x1d6f31b71e12a1a584ca20853495161c48ba491f")); + contracts.RegisterContract("CsTestErc20", ABI.Erc20, Contracts.Erc20)); } } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 23f9fa380..06b61867e 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -8,7 +8,6 @@ using Scripts.EVM.Token; using UnityEngine; using Web3Unity.Scripts.Prefabs; -using ABI = Scripts.EVM.Token.ABI; public class EvmCalls : MonoBehaviour { @@ -27,7 +26,6 @@ public class EvmCalls : MonoBehaviour # region Contract Send private string methodSend = "addTotal"; - private string contractAddressSend = "0x7286Cf0F6E80014ea75Dbc25F545A3be90F4904F"; private int increaseAmountSend = 1; #endregion @@ -35,13 +33,11 @@ public class EvmCalls : MonoBehaviour #region Contract Call private string methodCall = "myTotal"; - private string contractAddressCall = "0xC71d13c40B4fE7e2c557eBAa12A0400dd4Df76C9"; #endregion #region Get Send Array - - private string contractAddressArray = "0x5244d0453A727EDa96299384370359f4A2B5b20a"; + private string methodArrayGet = "getStore"; private string methodArraySend = "setStore"; private string[] stringArraySend = @@ -62,92 +58,117 @@ public class EvmCalls : MonoBehaviour #region Send Transaction - private string to = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; + private string toAddress = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; #endregion #region Registered Contract - private string registeredContractName = "shiba"; - private string registeredContractmethod = "balanceOf"; + private string registeredContractName = "CsTestErc20"; #endregion - #region Private Key + #region ECDSA - private string privateKey = "0x78dae1a22c7507a4ed30c06172e7614eb168d3546c13856340771e63ad3c0081"; - private string messagePrivateKey = "This is a test message"; + private string ecdsaKey = "0x78dae1a22c7507a4ed30c06172e7614eb168d3546c13856340771e63ad3c0081"; + private string ecdsaMessage = "This is a test message"; private string transactionHash = "0x123456789"; - private string chainId ="5"; + private string chainId ="11155111"; #endregion #region Multi Call - - private string Erc20ContractAddress = "0x3E0C0447e47d49195fbE329265E330643eB42e6f"; + private string Erc20Account = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion #endregion + /// + /// Calls values from a contract + /// public async void ContractCall() { object[] args = {}; - var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.AddTotal, contractAddressCall, args); + var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, Contracts.ArrayTotal, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); } - + + /// + /// Sends values to a contract + /// public async void ContractSend() { object[] args = { increaseAmountSend }; - var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.AddTotal, contractAddressSend, args); + var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, Contracts.ArrayTotal, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } - + + /// + /// Gets array values from a contract + /// public async void GetArray() { - var response = await Evm.GetArray(Web3Accessor.Web3, contractAddressArray, ABI.AddTotal, methodArrayGet); + var response = await Evm.GetArray(Web3Accessor.Web3, Contracts.ArrayTotal, ABI.ArrayTotal, methodArrayGet); var responseString = string.Join(",\n", response.Select((list, i) => $"#{i} {string.Join((string)", ", (IEnumerable)list)}")); SampleOutputUtil.PrintResult(responseString, nameof(Evm), nameof(Evm.GetArray)); } + /// + /// Sends array values to a contract + /// public async void SendArray() { - var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.AddTotal, contractAddressArray, stringArraySend); + var response = await Evm.SendArray(Web3Accessor.Web3, methodArraySend, ABI.ArrayTotal, Contracts.ArrayTotal, stringArraySend); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SendArray)); } + /// + /// Gets the current block number + /// public async void GetBlockNumber() { var blockNumber = await Evm.GetBlockNumber(Web3Accessor.Web3); SampleOutputUtil.PrintResult(blockNumber.ToString(), nameof(Evm), nameof(Evm.GetBlockNumber)); } + /// + /// Gets the gas limit for a specific function + /// public async void GetGasLimit() { - var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.AddTotal, contractAddressSend, methodSend); + var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, Contracts.ArrayTotal, methodSend); SampleOutputUtil.PrintResult(gasLimit.ToString(), nameof(Evm), nameof(Evm.GetGasLimit)); } + /// + /// Gets the current gas price + /// public async void GetGasPrice() { var gasPrice = await Evm.GetGasPrice(Web3Accessor.Web3); SampleOutputUtil.PrintResult(gasPrice.ToString(), nameof(Evm), nameof(Evm.GetGasPrice)); } + /// + /// Gets an accounts nonce + /// public async void GetNonce() { var nonce = await Evm.GetNonce(Web3Accessor.Web3); SampleOutputUtil.PrintResult(nonce.ToString(), nameof(Evm), nameof(Evm.GetNonce)); } + /// + /// Gets a specific transaction's status + /// public async void GetTransactionStatus() { var receipt = await Evm.GetTransactionStatus(Web3Accessor.Web3); @@ -158,30 +179,45 @@ public async void GetTransactionStatus() SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.GetTransactionStatus)); } - public async void RegisterContract() + /// + /// Uses a registered contract + /// + public async void RegisteredContract() { - var balance = await Evm.UseRegisteredContract(Web3Accessor.Web3, registeredContractName, registeredContractmethod); + var balance = await Evm.UseRegisteredContract(Web3Accessor.Web3, registeredContractName, EthMethod.BalanceOf); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Evm), nameof(Evm.UseRegisteredContract)); } + /// + /// Sends a transaction + /// public async void SendTransaction() { - var transactionHash = await Evm.SendTransaction(Web3Accessor.Web3, to); + var transactionHash = await Evm.SendTransaction(Web3Accessor.Web3, toAddress); SampleOutputUtil.PrintResult(transactionHash, nameof(Evm), nameof(Evm.SendTransaction)); } + /// + /// Encrypts a message with SHA3 + /// public void Sha3() { var hash = Evm.Sha3(messageSha); SampleOutputUtil.PrintResult(hash, nameof(Evm), nameof(Evm.Sha3)); } + /// + /// Signs a message, the result is specific to each user + /// public async void SignMessage() { var signedMessage = await Evm.SignMessage(Web3Accessor.Web3, messageSign); SampleOutputUtil.PrintResult(signedMessage, nameof(Evm), nameof(Evm.SignMessage)); } + /// + /// Signs a message and verifs account ownership + /// public async void SignVerify() { var signatureVerified = await Evm.SignVerify(Web3Accessor.Web3, messageSignVerify); @@ -189,24 +225,36 @@ public async void SignVerify() SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.SignVerify)); } - public void PrivateKeySignTransaction() + /// + /// Signs a transaction via ECDSA + /// + public void EcdsaSignTransaction() { - var result = Evm.PrivateKeySignTransaction(privateKey, transactionHash, chainId); - SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.PrivateKeySignTransaction)); + var result = Evm.EcdsaSignTransaction(ecdsaKey, transactionHash, chainId); + SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaSignTransaction)); } - public void PrivateKeySignMessage() + /// + /// Signs a message via ECDSA + /// + public void EcdsaSignMessage() { - var result = Evm.PrivateKeySignMessage(privateKey, messagePrivateKey); - SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.PrivateKeySignMessage)); + var result = Evm.EcdsaSignMessage(ecdsaKey, ecdsaMessage); + SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaSignMessage)); } - public void PrivateKeyGetAddress() + /// + /// Gets an addres via ECDSA key + /// + public void EcdsaGetAddress() { - var result = Evm.PrivateKeyGetAddress(privateKey); - SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.PrivateKeyGetAddress)); + var result = Evm.EcdsaGetAddress(ecdsaKey); + SampleOutputUtil.PrintResult(result, nameof(Evm), nameof(Evm.EcdsaGetAddress)); } + /// + /// Uploads to IPFS + /// public async void IPFSUpload() { var cid = await Evm.Upload(new IpfsUploadRequest @@ -220,15 +268,18 @@ public async void IPFSUpload() SampleOutputUtil.PrintResult(cid, nameof(IpfsSample), nameof(IpfsSample.Upload)); } + /// + /// Makes multiple calls + /// public async void MultiCall() { - var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Erc20ContractAddress); - var erc20BalanceOfCalldata = erc20Contract.Calldata(CommonMethod.BalanceOf, new object[] + var erc20Contract = Web3Accessor.Web3.ContractBuilder.Build(ABI.Erc20, Contracts.Erc20); + var erc20BalanceOfCalldata = erc20Contract.Calldata(EthMethod.BalanceOf, new object[] { Erc20Account }); - var erc20TotalSupplyCalldata = erc20Contract.Calldata(CommonMethod.TotalSupply, new object[] + var erc20TotalSupplyCalldata = erc20Contract.Calldata(EthMethod.TotalSupply, new object[] { }); @@ -236,13 +287,13 @@ public async void MultiCall() { new Call3Value() { - Target = Erc20ContractAddress, + Target = Contracts.Erc20, AllowFailure = true, CallData = erc20BalanceOfCalldata.HexToByteArray(), }, new Call3Value() { - Target = Erc20ContractAddress, + Target = Contracts.Erc20, AllowFailure = true, CallData = erc20TotalSupplyCalldata.HexToByteArray(), } @@ -254,13 +305,13 @@ public async void MultiCall() if (multicallResultResponse[0] != null && multicallResultResponse[0].Success) { - var decodedBalanceOf = erc20Contract.Decode(CommonMethod.BalanceOf, multicallResultResponse[0].ReturnData.ToHex()); + var decodedBalanceOf = erc20Contract.Decode(EthMethod.BalanceOf, multicallResultResponse[0].ReturnData.ToHex()); Debug.Log($"decodedBalanceOf {((BigInteger)decodedBalanceOf[0]).ToString()}"); } if (multicallResultResponse[1] != null && multicallResultResponse[1].Success) { - var decodedTotalSupply = erc20Contract.Decode(CommonMethod.TotalSupply, multicallResultResponse[1].ReturnData.ToHex()); + var decodedTotalSupply = erc20Contract.Decode(EthMethod.TotalSupply, multicallResultResponse[1].ReturnData.ToHex()); Debug.Log($"decodedTotalSupply {((BigInteger)decodedTotalSupply[0]).ToString()}"); } } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index cfe580acd..3a1467bab 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -4,7 +4,6 @@ using Scripts.EVM.Token; using UnityEngine; using UnityEngine.UI; -using ABI = Scripts.EVM.Token.ABI; /// /// ERC1155 calls used in the sample scene @@ -25,31 +24,27 @@ public class Erc1155Calls : MonoBehaviour #endregion #region Balance Of - - private string contractBalanceOf = "0x2c1867bc3026178a47a677513746dcc6822a137a"; + private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private string tokenIdBalanceOf = "0x01559ae4021aee70424836ca173b6a4e647287d15cee8ac42d8c2d8d128927e5"; + private string tokenIdBalanceOf = "1"; #endregion #region Balance Of Batch - - private string contractBalanceOfBatch = "0xdc4aff511e1b94677142a43df90f948f9ae181dd"; + private string[] accountsBalanceOfBatch = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xE51995Cdb3b1c109E0e6E67ab5aB31CDdBB83E4a" }; private string[] tokenIdsBalanceOfBatch = { "1", "2" }; #endregion #region Uri - - private string contractUri = "0x2c1867BC3026178A47a677513746DCc6822A137A"; - private string tokenIdUri = "0x01559ae4021aee70424836ca173b6a4e647287d15cee8ac42d8c2d8d128927e5"; + + private string tokenIdUri = "1"; #endregion #region Mint - - private string contractMint = "0xA0a53f1Cabf7D723Ab2087400681039917D1B6D4"; + private int idMint = 1; private int amountMint = 1; @@ -58,15 +53,13 @@ public class Erc1155Calls : MonoBehaviour #region Transfer private string toAccountTransfer = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; - private string contractTransfer = "0xA0a53f1Cabf7D723Ab2087400681039917D1B6D4"; private int tokenIdTransfer = 1; private int amountTransfer = 1; #endregion #region Texture - - private string contractTexture = "0x0288B4F1389ED7b3d3f9C7B73d4408235c0CBbc6"; + private string tokenIdTexture = "0"; #endregion @@ -91,8 +84,8 @@ public async void AllErc1155() public async void BalanceOf() { var balance = tokenIdBalanceOf.StartsWith("0x") ? - await Erc1155.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf, tokenIdBalanceOf) - : await Erc1155.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf, BigInteger.Parse(tokenIdBalanceOf)); + await Erc1155.BalanceOf(Web3Accessor.Web3, Contracts.Erc1155, accountBalanceOf, tokenIdBalanceOf) + : await Erc1155.BalanceOf(Web3Accessor.Web3, Contracts.Erc1155, accountBalanceOf, BigInteger.Parse(tokenIdBalanceOf)); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Erc1155), nameof(Erc1155.BalanceOf)); } @@ -101,7 +94,7 @@ await Erc1155.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf, /// public async void BalanceOfBatch() { - var balances = await Erc1155.BalanceOfBatch(Web3Accessor.Web3, contractBalanceOfBatch, accountsBalanceOfBatch, tokenIdsBalanceOfBatch); + var balances = await Erc1155.BalanceOfBatch(Web3Accessor.Web3, Contracts.Erc1155, accountsBalanceOfBatch, tokenIdsBalanceOfBatch); var balancesString = string.Join(", ", balances); SampleOutputUtil.PrintResult(balancesString, nameof(Erc1155), nameof(Erc1155.BalanceOfBatch)); } @@ -111,7 +104,7 @@ public async void BalanceOfBatch() /// public async void Uri() { - var uri = await Erc1155.Uri(Web3Accessor.Web3, contractUri, tokenIdUri); + var uri = await Erc1155.Uri(Web3Accessor.Web3, Contracts.Erc1155, tokenIdUri); SampleOutputUtil.PrintResult(uri, nameof(Erc1155), nameof(Erc1155.Uri)); } @@ -120,7 +113,7 @@ public async void Uri() /// public async void MintErc1155() { - var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Mint1155, contractMint, idMint, amountMint); + var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, Contracts.Erc1155, idMint, amountMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } @@ -130,7 +123,7 @@ public async void MintErc1155() /// public async void TransferErc1155() { - var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, contractTransfer, tokenIdTransfer, amountTransfer, toAccountTransfer); + var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTransfer, amountTransfer, toAccountTransfer); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.TransferErc1155)); } @@ -140,7 +133,7 @@ public async void TransferErc1155() /// public async void ImportNftTexture1155() { - var textureRequest = await Erc1155.ImportNftTexture1155(Web3Accessor.Web3, contractTexture, tokenIdTexture); + var textureRequest = await Erc1155.ImportNftTexture1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTexture); rawImage.texture = textureRequest; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index c1c8b2f04..0f0b2d92c 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -2,7 +2,6 @@ using ChainSafe.Gaming.UnityPackage; using Scripts.EVM.Token; using UnityEngine; -using ABI = Scripts.EVM.Token.ABI; /// /// ERC20 calls used in the sample scene @@ -12,20 +11,8 @@ public class Erc20Calls : MonoBehaviour #region Fields #region Balance Of - - private string contractBalanceOf = "0x3E0C0447e47d49195fbE329265E330643eB42e6f"; - private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - - #endregion - #region Custom Balance Of - - private string contractToken = "0x714d32fA722461A2c8F0b4EB98ff5cFF8F908Df2"; - #endregion - - #region Native Balance Of - - private string accountNativeBalanceOf = "0xaBed4239E4855E120fDA34aDBEABDd2911626BA1"; + private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion @@ -38,7 +25,6 @@ public class Erc20Calls : MonoBehaviour #region Transfer private const string toAccount = "0xdD4c825203f97984e7867F11eeCc813A036089D1"; - private string contractTransfer = "0xc778417e063141139fce010982780140aa0cd5ab"; private BigInteger amountTransfer = 1000000000000000; #endregion @@ -51,7 +37,7 @@ public class Erc20Calls : MonoBehaviour public async void BalanceOf() { SampleFeedback.Instance?.Activate(); - var balance = await Erc20.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf); + var balance = await Erc20.BalanceOf(Web3Accessor.Web3, Contracts.Erc20, accountBalanceOf); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Erc20), nameof(Erc20.BalanceOf)); SampleFeedback.Instance?.Deactivate(); } @@ -61,7 +47,7 @@ public async void BalanceOf() /// public async void CustomTokenBalanceOf() { - var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, contractToken); + var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, Contracts.Erc20); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.CustomTokenBalance)); } @@ -70,7 +56,7 @@ public async void CustomTokenBalanceOf() /// public async void NativeBalanceOf() { - var result = await Erc20.NativeBalanceOf(Web3Accessor.Web3, accountNativeBalanceOf); + var result = await Erc20.NativeBalanceOf(Web3Accessor.Web3, accountBalanceOf); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.NativeBalanceOf)); } @@ -79,7 +65,7 @@ public async void NativeBalanceOf() /// public async void Name() { - var result = await Erc20.Name(Web3Accessor.Web3, contractToken); + var result = await Erc20.Name(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(result, nameof(Erc20), nameof(Erc20.Name)); } @@ -88,7 +74,7 @@ public async void Name() /// public async void Symbol() { - var result = await Erc20.Symbol(Web3Accessor.Web3, contractToken); + var result = await Erc20.Symbol(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(result, nameof(Erc20), nameof(Erc20.Symbol)); } @@ -97,7 +83,7 @@ public async void Symbol() /// public async void Decimals() { - var decimals = await Erc20.Decimals(Web3Accessor.Web3, contractToken); + var decimals = await Erc20.Decimals(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(decimals.ToString(), nameof(Erc20), nameof(Erc20.Decimals)); } @@ -106,7 +92,7 @@ public async void Decimals() /// public async void TotalSupply() { - var result = await Erc20.TotalSupply(Web3Accessor.Web3, contractToken); + var result = await Erc20.TotalSupply(Web3Accessor.Web3, Contracts.Erc20); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.TotalSupply)); } @@ -116,7 +102,7 @@ public async void TotalSupply() public async void MintErc20() { string toAccount = await Web3Accessor.Web3.Signer.GetAddress(); - var response = await Erc20.MintErc20(Web3Accessor.Web3, contractToken, toAccount, amountMint); + var response = await Erc20.MintErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.MintErc20)); } @@ -126,7 +112,7 @@ public async void MintErc20() /// public async void TransferErc20() { - var response = await Erc20.TransferErc20(Web3Accessor.Web3, contractTransfer, toAccount, amountTransfer); + var response = await Erc20.TransferErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountTransfer); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.TransferErc20)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 570226147..ea5b80c03 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -3,7 +3,6 @@ using ChainSafe.Gaming.UnityPackage; using Scripts.EVM.Token; using UnityEngine; -using ABI = Scripts.EVM.Token.ABI; /// /// ERC721 calls used in the sample scene @@ -24,39 +23,34 @@ public class Erc721Calls : MonoBehaviour #endregion #region Balance Of - - private string contractBalanceOf = "0x9123541E259125657F03D7AD2A7D1a8Ec79375BA"; + private string accountBalanceOf = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; #endregion #region Owner Of - - private string contractOwnerOf = "0x06dc21f89f01409e7ed0e4c80eae1430962ae52c"; - private string tokenIdOwnerOf = "0x01559ae4021a565d5cc4740f1cefa95de8c1fb193949ecd32c337b03047da501"; + + private string tokenIdOwnerOf = "1"; #endregion #region Owner Of Batch - private string[] tokenIdsOwnerOfBatch = { "33", "29" }; - private string contractOwnerOfBatch = "0x47381c5c948254e6e0E324F1AA54b7B24104D92D"; + private string[] tokenIdsOwnerOfBatch = { "1", "2" }; // optional: multicall contract https://github.com/makerdao/multicall private string multicallOwnerOfBatch = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; #endregion #region Uri - - private string contractUri = "0x06dc21f89f01409e7ed0e4c80eae1430962ae52c"; + private string tokenIdUri = "0x01559ae4021a565d5cc4740f1cefa95de8c1fb193949ecd32c337b03047da501"; #endregion #region Mint - - private string contractMint = "0x0B102638532be8A1b3d0ed1fcE6eC603Bec37848"; - private string uriMint = "ipfs://QmNn5EaGR26kU7aAMH7LhkNsAGcmcyJgun3Wia4MftVicW/1.json"; + + private string uriMint = "1"; #endregion @@ -85,7 +79,7 @@ public async void AllErc721() /// public async void BalanceOf() { - var balance = await Erc721.BalanceOf(Web3Accessor.Web3, contractBalanceOf, accountBalanceOf); + var balance = await Erc721.BalanceOf(Web3Accessor.Web3, Contracts.Erc721, accountBalanceOf); SampleOutputUtil.PrintResult(balance.ToString(), nameof(Erc721), nameof(Erc721.BalanceOf)); } @@ -95,8 +89,8 @@ public async void BalanceOf() public async void OwnerOf() { var owner = tokenIdOwnerOf.StartsWith("0x") ? - await Erc721.OwnerOf(Web3Accessor.Web3, contractOwnerOf, tokenIdOwnerOf) - : await Erc721.OwnerOf(Web3Accessor.Web3, contractOwnerOf, BigInteger.Parse(tokenIdOwnerOf)); + await Erc721.OwnerOf(Web3Accessor.Web3, Contracts.Erc721, tokenIdOwnerOf) + : await Erc721.OwnerOf(Web3Accessor.Web3, Contracts.Erc721, BigInteger.Parse(tokenIdOwnerOf)); SampleOutputUtil.PrintResult(owner, nameof(Erc721), nameof(Erc721.OwnerOf)); } @@ -105,7 +99,7 @@ await Erc721.OwnerOf(Web3Accessor.Web3, contractOwnerOf, tokenIdOwnerOf) /// public async void OwnerOfBatch() { - var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, contractOwnerOfBatch, tokenIdsOwnerOfBatch, multicallOwnerOfBatch); + var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, Contracts.Erc721, tokenIdsOwnerOfBatch, multicallOwnerOfBatch); var ownersString = $"{owners.Count} owner(s):\n" + string.Join(",\n", owners); SampleOutputUtil.PrintResult(ownersString, nameof(Erc721), nameof(Erc721.OwnerOfBatch)); } @@ -115,7 +109,7 @@ public async void OwnerOfBatch() /// public async void Uri() { - var uri = await Erc721.Uri(Web3Accessor.Web3, contractUri, tokenIdUri); + var uri = await Erc721.Uri(Web3Accessor.Web3, Contracts.Erc721, tokenIdUri); SampleOutputUtil.PrintResult(uri, nameof(Erc721), nameof(Erc721.Uri)); } @@ -124,7 +118,7 @@ public async void Uri() /// public async void MintErc721() { - var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Mint721, contractMint, uriMint); + var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, Contracts.Erc721, uriMint); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/SampleBehaviour.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/SampleBehaviour.cs index 5b2f461b7..5e79e2c6b 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/SampleBehaviour.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/SampleBehaviour.cs @@ -7,17 +7,18 @@ namespace Samples.Behaviours [RequireComponent(typeof(Button))] public class SampleBehaviour : MonoBehaviour { - private const string DefaultChainId = "5"; + // This is what is used to check for gelato compatibility, if the chain doesn't match it will hide gelato functions in the test scene + private const string DefaultChainId = "11155111"; public async void Execute() { // Activates the loading pop up to stop duplicate calls SampleFeedback.Instance?.Activate(); - // check if we're on default sample chain + // Check if we're on default sample chain if (Web3Accessor.Web3.ChainConfig.ChainId != DefaultChainId) { - // log error not exception to not break flow + // Log error not exception to not break flow Debug.LogError($"Samples are configured for Chain Id {DefaultChainId}, Please Change Chain Id in Window > ChainSafe SDK > Server Settings to {DefaultChainId}"); } From 796dd433b808fadb15571f68b7393bc6e19b4913 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 19:04:14 +0800 Subject: [PATCH 15/44] Update ChainlinkLootboxSampleLauncher.cs --- .../Scripts/ChainlinkLootboxSampleLauncher.cs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs index a1fe7ff64..9d9ba6bcc 100644 --- a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs +++ b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs @@ -26,13 +26,22 @@ public class ChainlinkLootboxSampleLauncher : MonoBehaviour private class Web3Config : ICompleteProjectConfig { public string ProjectId => string.Empty; - public string ChainId => "31337"; - public string Chain => "Anvil"; - public string Network => "GoChain Testnet"; - public string Rpc => $"http://127.0.0.1:8545"; + public string ChainId => "11155111"; + public string Chain => "Ethereum"; + public string Network => "Sepolia"; + public string Rpc => "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"; public string Ipc { get; } public string Ws { get; } } + + // Alternate chain contract addresses + // 0xF899Bc1f149030c3912f1Cb473A7b2db0ed9cE5f - Sepolia Testnet LootboxFactory + // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Mumbai Testnet LootboxFactory + // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Binance Testnet LootboxFactory + // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Fuji Testnet LootboxFactory + // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Fantom Testnet LootboxFactory + // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Arbitrum Goerli Testnet LootboxFactory + // 0x1993e2dD323B5dcBd8b52dB7d370bC36D280424B - Anvil private async void Awake() { @@ -44,7 +53,7 @@ private async void Awake() services.Debug().UseJsonRpcWallet(new JsonRpcWalletConfig { AccountIndex = 2 }); services.UseChainlinkLootboxService(new LootboxServiceConfig { - ContractAddress = "0x1993e2dD323B5dcBd8b52dB7d370bC36D280424B", + ContractAddress = "0xF899Bc1f149030c3912f1Cb473A7b2db0ed9cE5f", ContractAbi = ContractAbi }); services.AddSingleton(); From 5430810c0adee9c1be4d63b178fc453373c81712 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 11:04:50 +0000 Subject: [PATCH 16/44] Auto-duplicate Packages Samples --- .../Scripts/ChainlinkLootboxSampleLauncher.cs | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs index 9d9ba6bcc..a1fe7ff64 100644 --- a/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs +++ b/Packages/io.chainsafe.web3-unity.lootboxes/Samples~/Chainlink Lootbox Samples/Scripts/ChainlinkLootboxSampleLauncher.cs @@ -26,22 +26,13 @@ public class ChainlinkLootboxSampleLauncher : MonoBehaviour private class Web3Config : ICompleteProjectConfig { public string ProjectId => string.Empty; - public string ChainId => "11155111"; - public string Chain => "Ethereum"; - public string Network => "Sepolia"; - public string Rpc => "https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f"; + public string ChainId => "31337"; + public string Chain => "Anvil"; + public string Network => "GoChain Testnet"; + public string Rpc => $"http://127.0.0.1:8545"; public string Ipc { get; } public string Ws { get; } } - - // Alternate chain contract addresses - // 0xF899Bc1f149030c3912f1Cb473A7b2db0ed9cE5f - Sepolia Testnet LootboxFactory - // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Mumbai Testnet LootboxFactory - // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Binance Testnet LootboxFactory - // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Fuji Testnet LootboxFactory - // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Fantom Testnet LootboxFactory - // 0xfa97aCce8E4929e6d13a7c418BfbA0311e9D3Bfd - Arbitrum Goerli Testnet LootboxFactory - // 0x1993e2dD323B5dcBd8b52dB7d370bC36D280424B - Anvil private async void Awake() { @@ -53,7 +44,7 @@ private async void Awake() services.Debug().UseJsonRpcWallet(new JsonRpcWalletConfig { AccountIndex = 2 }); services.UseChainlinkLootboxService(new LootboxServiceConfig { - ContractAddress = "0xF899Bc1f149030c3912f1Cb473A7b2db0ed9cE5f", + ContractAddress = "0x1993e2dD323B5dcBd8b52dB7d370bC36D280424B", ContractAbi = ContractAbi }); services.AddSingleton(); From 22e4aa0c62685f4fad206ba406a777c6a99c4f40 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 19:07:37 +0800 Subject: [PATCH 17/44] Update Erc721Tests.cs --- Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index c1180cd16..57d513af9 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -21,6 +21,7 @@ public class Erc721Tests #region Balances private const string balanceOfAccount = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; + private static BigInteger balanceOfExpected = 1; #endregion @@ -95,7 +96,7 @@ public IEnumerator TestBalanceOf() { var getBalanceOf = Erc721.BalanceOf(web3, Contracts.Erc721, balanceOfAccount); yield return new WaitUntil(() => getBalanceOf.IsCompleted); - Assert.AreEqual(3, getBalanceOf.Result); + Assert.AreEqual(balanceOfExpected, getBalanceOf.Result); } [UnityTest] From 442350b506b632ca4a9ee4ab98fd9c68a59ff6a6 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 19:14:24 +0800 Subject: [PATCH 18/44] Update Chains.cs --- .../Web3/Core/Evm/Dto/Chains.cs | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/src/ChainSafe.Gaming/Web3/Core/Evm/Dto/Chains.cs b/src/ChainSafe.Gaming/Web3/Core/Evm/Dto/Chains.cs index 47def408e..ccf619352 100644 --- a/src/ChainSafe.Gaming/Web3/Core/Evm/Dto/Chains.cs +++ b/src/ChainSafe.Gaming/Web3/Core/Evm/Dto/Chains.cs @@ -9,50 +9,6 @@ namespace ChainSafe.Gaming.Evm.Network { public class Chains { - private static Dictionary cached = new Dictionary(); - - // TODO: duplicates ChainProvider, remove, update usages - public static async Task> GetChains(Web3Environment environment) - { - if (cached.Count > 0) - { - return cached; - } - - var response = await environment.HttpClient.Get("https://chainid.network/chains.json"); - - if (!response.IsSuccess) - { - CaptureError(response.Error, environment); - throw new HttpRequestException(response.Error); - } - - var chains = response.Response; - - if (chains == null) - { - CaptureError("failed to deserialize chains", environment); - throw new Exception("failed to deserialize chains"); - } - - foreach (var chain in chains) - { - cached[chain.ChainId] = chain; - } - - return cached; - } - - private static void CaptureError(string error, Web3Environment environment) - { - var properties = new Dictionary - { - { "error", error }, - }; - - // TODO: log error using new event format - } - public class Chain { [JsonProperty(PropertyName = "name")] From 5d8ae67b12d3b939da4409126ef5e3a5a04376df Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 11:15:08 +0000 Subject: [PATCH 19/44] Published Solution Dependencies to Package Libraries as DLLs --- .../ChainSafe.Gaming.Lootboxes.Chainlink.dll | Bin 31232 -> 31232 bytes .../Libraries/Chainsafe.Gaming.Chainlink.dll | Bin 5120 -> 5120 bytes .../Libraries/ChainSafe.Gaming.Debugging.dll | Bin 15872 -> 15872 bytes .../Libraries/ChainSafe.Gaming.Gelato.dll | Bin 44544 -> 44544 bytes .../ChainSafe.Gaming.InProcessSigner.dll | Bin 8192 -> 8192 bytes ...fe.Gaming.InProcessTransactionExecutor.dll | Bin 11776 -> 11776 bytes .../Libraries/ChainSafe.Gaming.Unity.dll | Bin 15360 -> 15360 bytes .../ChainSafe.Gaming.WalletConnect.dll | Bin 35840 -> 35840 bytes .../Runtime/Libraries/ChainSafe.Gaming.dll | Bin 215040 -> 214016 bytes 9 files changed, 0 insertions(+), 0 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Chainlink/Runtime/Libraries/ChainSafe.Gaming.Lootboxes.Chainlink.dll b/Packages/io.chainsafe.web3-unity.lootboxes/Chainlink/Runtime/Libraries/ChainSafe.Gaming.Lootboxes.Chainlink.dll index 1a0f8bf919823088834b89441a4f61be84bcddf7..4cb063e2425a3ffbf768254d526fa9ea4f1eb4ba 100644 GIT binary patch delta 107 zcmZqp!r1VIaY6@+a9-QD2MmTm7*@M)T%|*c>621v%RuPyUb} zAYd1|%GYCVmfzANO{`C~eQ!<e%he&7HA Dkh3yE delta 107 zcmZqp!r1VIaY6@6`Q6Fg8+)F_2!N^Ob&{c^b*}=9bu>hnocoKX3p5F{?GD diff --git a/Packages/io.chainsafe.web3-unity.lootboxes/Chainlink/Runtime/Libraries/Chainsafe.Gaming.Chainlink.dll b/Packages/io.chainsafe.web3-unity.lootboxes/Chainlink/Runtime/Libraries/Chainsafe.Gaming.Chainlink.dll index 5355ae4eb62d4b3abf96cde04d299a826db6da33..5f144099c5d6929bbdb04594cc1d025e3a3eeef3 100644 GIT binary patch delta 105 zcmZqBXwaC@!J_Tac4=de2B*M|t4*>0ne<%t@XswC7QQ#^AXMxMi%RfFE&oL;SLb6 zYdpNPe0{ykz73-4wv+b#nLLNPM*%AMr4A|xRBdQvBEq*ZH);Qwrmu#ZJ$QDo0|1yM BFNpvE diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.Debugging.dll b/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.Debugging.dll index ec1c8c683a210d405ae759573161358567953642..e5d1a54ec36a9a55e2ca7ef7be649998923fbb59 100644 GIT binary patch delta 105 zcmZpuX{edd!IH->dUIn>j*dXc;p^MCJ6C(|awyI^Rws6EGl%XDc9uSlmJ^eYm;?wM ywrvlzb=~JNTQmE6MWTo7WEImM1*o6|Oc12nCoFskPyTm@)5z$n@U26)aDDO1{?s9p)^+j diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.Gelato.dll b/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.Gelato.dll index 666d411073f038afd3225e028a7f6a786dd065d2..78c56d05ccdd91455c502a07f5e19af2173efa0e 100644 GIT binary patch delta 107 zcmZp;!_;txX+j4}Q%%{sjXf590{s_j=4KSPI;=aH68l*4pwZ?leH`K}QPm%2Pkyj8 zK;TLGm+3!NsXO=YKNeFH!x}N!VOg63RPeJuR1l< C{xmWG delta 107 zcmZp;!_;txX+j6f?ah;}ZtSt>6X<)UnAyJlk<&_f^*=q|Gb}e>>EjS**>Yp=<;f40 z1_*5XnK!v$)gPA@-K^+q&Ifl+c39S?02Q3#0u=vvp(789@QB58D?je%|3VL2+OChA6|T%^5-ym{^P*Pj8<5MB5Mi-^791OSY* BFAV?y delta 105 zcmZp0XmFU&!E$0!|EG;TX9NW#zyDeF>QktH4{P=EDX|L{Zq5*zz{K*q*!lY8KOzAF z>nbByZ0E}RFY~aU^6cbaj>$2iGZdhL{m-C+Ak`0hd?q&KYi@aUw)4(r5wSO%0Ep@{ ARR910 diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.InProcessTransactionExecutor.dll b/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.InProcessTransactionExecutor.dll index 6ad104af9e23cf73589b785e76196600395c50ce..9cb8ecfcad805009c7f89c0d674163ce3da63a50 100644 GIT binary patch delta 105 zcmZpOX^5H7!D1?y{a|BHhO9uuq@`=LrkMNpXN7HG-~KLdGmBga3(L9lZl@;KC` zFFX4~r8?SebLo4gyTv+!lkX^PQh*9Rg9(CEZ}pd+7M(h4;e!4%j+@sh2XO%af1NLr delta 105 zcmZpOX^5H7!7?d!#i5No8L|S#N18LTyViOv@y#jR`s(S{%`9>yEG(RlT<1@&Q3?>) zQsVzMxWm_J`n3h8=T|LwH~EgzCIzVAC2^=AP__I9QK=6u_8FJvSn;H6UZ)(y1pq{n BF_HiP diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.Unity.dll b/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.Unity.dll index d7b5efef372e0c4f47400c19212f479786b898b8..c38ccea8f917d93a975e14b0ad8b180ccd30a2fc 100644 GIT binary patch delta 105 zcmZpuXsDRb!Lm2u+}4dfH$mh)hlX;9=6rh63VS*slR<2)y6!Z3c)@t% delta 105 zcmZpuXsDRb!Q#M}ym({J4J84Q$wr%Bo!#!;?X5f8r1I5+%_Yhv{48vVclS+RV-z5; zViHf$`eTkh(}R!r2)^5|JekM1MFA>!CLAgVRBb0y?7eW$m%X?4A8zg4yumnt0|2C? BFaH1l diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.WalletConnect.dll b/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.WalletConnect.dll index 31c267fb8dea35023373240f26862275084c0455..f0aa4178c82609c064ad8ce062172385f967c395 100644 GIT binary patch delta 107 zcmZpe!PGE=X+j6f<4-orkQEPv2I{&v(z1MD5=kQ4}J`^0AcR&g2cv z0Rq!YOxhm(TI#XOzyVGv`kTe3U1AV3W8L>{;$k$J?Yk;8*0(>HXmuRVFv)p CQZUc} diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.dll b/Packages/io.chainsafe.web3-unity/Runtime/Libraries/ChainSafe.Gaming.dll index 4490e266eeecfeac16262a3a3139f2b9c2b6a4fe..518db0e8aa558c4b16aaf61e0840aa8d55689d1a 100644 GIT binary patch delta 83926 zcmb4s2b>f|_J2*!OwaCYfY~t1k~YAu&1@jLNX|JUAc#s(5e&5Sh=JLm*9d3UQB;he za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1SFK)4V%H*`=_p*D1-V@a=Z@>gMH>tgpi#&A9r_ICDvD?G%PHm2qZ4sF0bX1#d-8VfQW#9yl*|15Uh3?;+!?4dUGeiXJ0I<9NoiRD8HQi?)UyB1P*TYHT9%TpJZ{1- T&VQ?r?gG<$vvL7%&$0gx??r!E From 3f2b9ef5bd268d784d63cf6a34a97bcb1904fd46 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 19:26:07 +0800 Subject: [PATCH 20/44] Update Erc721Tests.cs --- Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index 57d513af9..666301077 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -21,7 +21,7 @@ public class Erc721Tests #region Balances private const string balanceOfAccount = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private static BigInteger balanceOfExpected = 1; + private static int balanceOfExpected = 3; #endregion From 47b217fb0b14a2a5cda11b423e31d50cbf82a4d4 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Sun, 12 Nov 2023 19:36:26 +0800 Subject: [PATCH 21/44] Update EvmTests.cs --- Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 8e56aea7f..4042d00f5 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -147,7 +147,7 @@ public IEnumerator TestGetBlockNumber() [UnityTest] public IEnumerator TestGetGasLimit() { - var getGasLimit = Evm.GetGasLimit(web3, ABI.Erc20, Contracts.Erc20, EthMethod.Transfer); + var getGasLimit = Evm.GetGasLimit(web3, ABI.Erc20, Contracts.ArrayTotal, ContractSendMethod); yield return new WaitUntil(() => getGasLimit.IsCompleted); if (getGasLimit.Exception != null) throw getGasLimit.Exception; // Just assert successful completion because result is always changing From 31572b238587998f24d6726c658175df70441d61 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 07:19:24 +0800 Subject: [PATCH 22/44] Update Erc721.cs --- .../Runtime/Scripts/EVM/Token/Erc721.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs index 046a51197..85fe41861 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs @@ -10,8 +10,6 @@ namespace Scripts.EVM.Token { public static class Erc721 { - private static string _abi = ABI.Erc721; - ///

/// Fetches all 721 Nfts from an account /// @@ -37,7 +35,7 @@ public static async Task AllErc721(Web3 web3, string chain, str /// public static async Task BalanceOf(Web3 web3, string contractAddress, string account) { - var contract = web3.ContractBuilder.Build(_abi, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc721, contractAddress); var contractData = await contract.Call(EthMethod.BalanceOf, new object[] { account @@ -71,7 +69,7 @@ public static async Task OwnerOf(Web3 web3, string contractAddress, BigI private static async Task OwnerOf(Web3 web3, string contractAddress, object[] parameters) { var method = EthMethod.OwnerOf; - var contract = web3.ContractBuilder.Build(_abi, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc721, contractAddress); var contractData = await contract.Call(method, parameters); return contractData[0].ToString(); } @@ -102,7 +100,7 @@ public static async Task> OwnerOfBatch( } var args = JsonConvert.SerializeObject(obj); var response = await Remote.CSServer.Multicall(web3, web3.ChainConfig.ChainId, web3.ChainConfig.Network, - contractAddress, _abi, method, args, multicall, web3.ChainConfig.Rpc); + contractAddress, ABI.Erc721, method, args, multicall, web3.ChainConfig.Rpc); try { var responses = JsonConvert.DeserializeObject(response); @@ -134,7 +132,7 @@ public static async Task> OwnerOfBatch( public static async Task Uri(Web3 web3, string contractAddress, string tokenId) { const string ipfsPath = "https://ipfs.io/ipfs/"; - var contract = web3.ContractBuilder.Build(_abi, contractAddress); + var contract = web3.ContractBuilder.Build(ABI.Erc721, contractAddress); if (tokenId.StartsWith("0x")) { var convertUri = tokenId.Replace("0x", "f"); From ecd76201991dd36ea9540e58cd54df2f5579fefa Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 07:43:50 +0800 Subject: [PATCH 23/44] update templates update templates --- .../Editor/WebGLTemplates/Web3GL-2020x/network.js | 8 ++++---- .../Editor/WebGLTemplates/Web3GL-MetaMask/network.js | 2 +- .../io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs | 1 - .../io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs | 1 - 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-2020x/network.js b/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-2020x/network.js index 6a00e11ad..2282e6acb 100644 --- a/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-2020x/network.js +++ b/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-2020x/network.js @@ -16,9 +16,9 @@ window.networks = [ { - id: 5, - label: "Ethereum Goerli", - token: "goETH", - rpcUrl: `https://goerli.infura.io/v3/634371d724e34613bfc66e595b853cf0`, + id: 11155111, + label: "Ethereum Sepolia", + token: "Seth", + rpcUrl: `https://sepolia.infura.io/v3/287318045c6e455ab34b81d6bcd7a65f`, } ] \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-MetaMask/network.js b/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-MetaMask/network.js index 113c06eed..0681866ba 100644 --- a/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-MetaMask/network.js +++ b/Packages/io.chainsafe.web3-unity/Editor/WebGLTemplates/Web3GL-MetaMask/network.js @@ -22,4 +22,4 @@ Used to set the network: https://chainlist.org/ 338 Cronos Testnet */ -window.web3ChainId = 5; +window.web3ChainId = 11155111; diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs index 87c899f0e..f399d8bd0 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs @@ -27,7 +27,6 @@ public class Erc20Tests #endregion private Web3 web3; - private WalletConnectConfig config; [UnitySetUp] public IEnumerator Setup() diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index 666301077..72669fc23 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -46,7 +46,6 @@ public class Erc721Tests #endregion - private WalletConnectConfig config; private Web3 web3; #region Indexer Test Parameters From 14743e1e4d606ef70f238b9eca89ccb250bceac2 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 08:08:23 +0800 Subject: [PATCH 24/44] gas limit fixed gas limit fixed --- .../Runtime/Scripts/EVM/Token/Evm.cs | 4 ++-- .../io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs | 6 +++++- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 11 +++++++++-- 3 files changed, 16 insertions(+), 5 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs index 1225b9348..cbe6ddcc0 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Evm.cs @@ -44,10 +44,10 @@ public static async Task GetBlockNumber(Web3 web3) return await web3.RpcProvider.GetBlockNumber(); } - public static async Task GetGasLimit(Web3 web3, string contractAbi, string contractAddress, string method) + public static async Task GetGasLimit(Web3 web3, string contractAbi, string contractAddress, string method, object[] args) { var contract = web3.ContractBuilder.Build(contractAbi, contractAddress); - return await contract.EstimateGas(method, new object[] { }); + return await contract.EstimateGas(method, args); } public static async Task GetGasPrice(Web3 web3) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 4042d00f5..1053bfe9a 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -147,7 +147,11 @@ public IEnumerator TestGetBlockNumber() [UnityTest] public IEnumerator TestGetGasLimit() { - var getGasLimit = Evm.GetGasLimit(web3, ABI.Erc20, Contracts.ArrayTotal, ContractSendMethod); + object[] args = + { + IncreaseAmount + }; + var getGasLimit = Evm.GetGasLimit(web3, ABI.ArrayTotal, Contracts.ArrayTotal, ContractSendMethod, args); yield return new WaitUntil(() => getGasLimit.IsCompleted); if (getGasLimit.Exception != null) throw getGasLimit.Exception; // Just assert successful completion because result is always changing diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 06b61867e..ce095b63f 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -90,7 +90,10 @@ public class EvmCalls : MonoBehaviour /// public async void ContractCall() { - object[] args = {}; + object[] args = + { + await Web3Accessor.Web3.Signer.GetAddress() + }; var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, Contracts.ArrayTotal, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); @@ -144,7 +147,11 @@ public async void GetBlockNumber() /// public async void GetGasLimit() { - var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, Contracts.ArrayTotal, methodSend); + object[] args = + { + increaseAmountSend + }; + var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, Contracts.ArrayTotal, methodSend, args); SampleOutputUtil.PrintResult(gasLimit.ToString(), nameof(Evm), nameof(Evm.GetGasLimit)); } From 378dc82eddae129a8b915956b6a38790e7b2ae62 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 00:08:44 +0000 Subject: [PATCH 25/44] Auto-duplicate Packages Samples --- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 06b61867e..ce095b63f 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -90,7 +90,10 @@ public class EvmCalls : MonoBehaviour /// public async void ContractCall() { - object[] args = {}; + object[] args = + { + await Web3Accessor.Web3.Signer.GetAddress() + }; var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, Contracts.ArrayTotal, args); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); @@ -144,7 +147,11 @@ public async void GetBlockNumber() /// public async void GetGasLimit() { - var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, Contracts.ArrayTotal, methodSend); + object[] args = + { + increaseAmountSend + }; + var gasLimit = await Evm.GetGasLimit(Web3Accessor.Web3, ABI.ArrayTotal, Contracts.ArrayTotal, methodSend, args); SampleOutputUtil.PrintResult(gasLimit.ToString(), nameof(Evm), nameof(Evm.GetGasLimit)); } From a2c055b5aaf28429d6ffbc5d0febf1b7a1b65aa8 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 08:48:30 +0800 Subject: [PATCH 26/44] update update --- .../io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs | 2 +- Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs index bae98cb6a..e40928b31 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs @@ -3,7 +3,7 @@ namespace Scripts.EVM.Token public static class ABI { public const string Erc20 = "[ { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string Erc721 = "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"approved\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"ApprovalForAll\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"grantRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"renounceRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"revokeRole\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"previousAdminRole\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"newAdminRole\",\"type\":\"bytes32\"}],\"name\":\"RoleAdminChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleGranted\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"RoleRevoked\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"string\",\"name\":\"uri\",\"type\":\"string\"}],\"name\":\"safeMint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"safeTransferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"},{\"internalType\":\"bool\",\"name\":\"approved\",\"type\":\"bool\"}],\"name\":\"setApprovalForAll\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"DEFAULT_ADMIN_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"getApproved\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"}],\"name\":\"getRoleAdmin\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"role\",\"type\":\"bytes32\"},{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"hasRole\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"operator\",\"type\":\"address\"}],\"name\":\"isApprovedForAll\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"MINTER_ROLE\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"ownerOf\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"bytes4\",\"name\":\"interfaceId\",\"type\":\"bytes4\"}],\"name\":\"supportsInterface\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"tokenId\",\"type\":\"uint256\"}],\"name\":\"tokenURI\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"}]"; + public const string Erc721 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721IncorrectOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721InsufficientApproval\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721NonexistentToken\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"approved\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_fromTokenId\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_toTokenId\", \"type\": \"uint256\" } ], \"name\": \"BatchMetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_tokenId\", \"type\": \"uint256\" } ], \"name\": \"MetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"getApproved\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ownerOf\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"string\", \"name\": \"uri\", \"type\": \"string\" } ], \"name\": \"safeMint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"tokenURI\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; public const string Erc1155 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; public const string ArrayTotal = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; public const string CustomBalanceOf = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index 72669fc23..f6b13cef0 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -29,9 +29,9 @@ public class Erc721Tests private const string ownerOfTokenId = "2"; private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private static string[] ownerOfBatchTokenIds = { "1", "2" }; + private static string[] ownerOfBatchTokenIds = { "4", "6" }; private const string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; - private static string[] ownerOfBatchExpected = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; + private static string[] ownerOfBatchExpected = { "0xdD4c825203f97984e7867F11eeCc813A036089D1", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; #endregion From b61d2c03374a692e6f7842a6097e20f5d49bdfb3 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 10:20:30 +0800 Subject: [PATCH 27/44] ownerOf ownerOf --- .../Runtime/Scripts/EVM/Token/Erc721.cs | 63 +++--- .../Tests/Runtime/Erc721Tests.cs | 3 +- .../Scenes/SampleMain.unity | 196 +++++++++++++++++- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 2 - .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 4 +- 5 files changed, 226 insertions(+), 42 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs index 85fe41861..c0ffb3532 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs @@ -1,7 +1,11 @@ using System.Collections.Generic; using System.Numerics; using System.Threading.Tasks; +using ChainSafe.Gaming.MultiCall; +using ChainSafe.Gaming.UnityPackage; using ChainSafe.Gaming.Web3; +using Nethereum.Contracts.QueryHandlers.MultiCall; +using Nethereum.Hex.HexConvertors.Extensions; using Newtonsoft.Json; using Scripts.EVM.Remote; using UnityEngine; @@ -73,53 +77,44 @@ private static async Task OwnerOf(Web3 web3, string contractAddress, obj var contractData = await contract.Call(method, parameters); return contractData[0].ToString(); } - + /// - /// Owner Of Batch ERC721 Token + /// Returns the owners of multiple token ids at once /// - /// - /// - /// - /// - /// public static async Task> OwnerOfBatch( Web3 web3, string contractAddress, - string[] tokenIds, - string multicall = "") + string[] tokenIds) { - var method = EthMethod.OwnerOf; - // build array of args - var obj = new string[tokenIds.Length][]; - for (var i = 0; i < tokenIds.Length; i++) - { - obj[i] = new[] + var erc721Contract = web3.ContractBuilder.Build(ABI.Erc721, contractAddress); + List calls = new List(); + for (int i = 0; i < tokenIds.Length; i++) + { + var callData = erc721Contract.Calldata(EthMethod.OwnerOf, new object[] { tokenIds[i] + }); + var call3Value = new Call3Value() + { + Target = Contracts.Erc721, + AllowFailure = true, + CallData = callData.HexToByteArray() }; - } - var args = JsonConvert.SerializeObject(obj); - var response = await Remote.CSServer.Multicall(web3, web3.ChainConfig.ChainId, web3.ChainConfig.Network, - contractAddress, ABI.Erc721, method, args, multicall, web3.ChainConfig.Rpc); - try + calls.Add(call3Value); + }; + + var multiCallResultResponse = await Web3Accessor.Web3.MultiCall().MultiCallAsync(calls.ToArray()); + var owners = new List(); + for (int i = 0; i < multiCallResultResponse.Count; i++) { - var responses = JsonConvert.DeserializeObject(response); - var owners = new List(); - - foreach (var t in responses) + if (multiCallResultResponse[i] != null && multiCallResultResponse[i].Success) { - // clean up address - var address = "0x" + t.Substring(t.Length - 40); - owners.Add(address); + var owner = erc721Contract.Decode(EthMethod.OwnerOf, multiCallResultResponse[i].ReturnData.ToHex()); + Debug.Log(owner.ToString()); + owners.Add(owner.ToString()); } - - return owners; - } - catch - { - Debug.LogError(response); - throw; } + return owners; } /// diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index f6b13cef0..cc59c16c0 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -30,7 +30,6 @@ public class Erc721Tests private const string ownerOfTokenId = "2"; private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; private static string[] ownerOfBatchTokenIds = { "4", "6" }; - private const string multicall = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; private static string[] ownerOfBatchExpected = { "0xdD4c825203f97984e7867F11eeCc813A036089D1", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; #endregion @@ -109,7 +108,7 @@ public IEnumerator TestOwnerOf() [UnityTest] public IEnumerator TestOwnerOfBatch() { - var getOwnerOfBatch = Erc721.OwnerOfBatch(web3, Contracts.Erc721, ownerOfBatchTokenIds, multicall); + var getOwnerOfBatch = Erc721.OwnerOfBatch(web3, Contracts.Erc721, ownerOfBatchTokenIds); yield return new WaitUntil(() => getOwnerOfBatch.IsCompleted); CollectionAssert.AreEqual(ownerOfBatchExpected, getOwnerOfBatch.Result); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity index 7ff6fd35b..07a55941c 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity @@ -2333,7 +2333,7 @@ MonoBehaviour: m_HandleRect: {fileID: 37375165} m_Direction: 0 m_Value: 0 - m_Size: 0.25564784 + m_Size: 0.2672342 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -5820,6 +5820,200 @@ MonoBehaviour: m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 +--- !u!1001 &1067896884 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1432457965} + m_Modifications: + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_RootOrder + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 108046416} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target + value: + objectReference: {fileID: 7978786053810957042} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: MultiCallBalanceOfBatch + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName + value: Execute + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: EvmCalls, Samples + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName + value: Samples.Behaviours.SampleBehaviour, Samples + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_Name + value: Button - MultiCallBalanceOf + objectReference: {fileID: 0} + - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_text + value: MultiCall + objectReference: {fileID: 0} + - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_fontSize + value: 17.9 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} +--- !u!1 &1067896885 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + m_PrefabInstance: {fileID: 1067896884} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1067896886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067896885} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 50 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 --- !u!1001 &1101863644 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index ce095b63f..55a2b993f 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -322,6 +322,4 @@ public async void MultiCall() Debug.Log($"decodedTotalSupply {((BigInteger)decodedTotalSupply[0]).ToString()}"); } } - - } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index ea5b80c03..be8a52918 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -37,8 +37,6 @@ public class Erc721Calls : MonoBehaviour #region Owner Of Batch private string[] tokenIdsOwnerOfBatch = { "1", "2" }; - // optional: multicall contract https://github.com/makerdao/multicall - private string multicallOwnerOfBatch = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; #endregion @@ -99,7 +97,7 @@ await Erc721.OwnerOf(Web3Accessor.Web3, Contracts.Erc721, tokenIdOwnerOf) /// public async void OwnerOfBatch() { - var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, Contracts.Erc721, tokenIdsOwnerOfBatch, multicallOwnerOfBatch); + var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, Contracts.Erc721, tokenIdsOwnerOfBatch); var ownersString = $"{owners.Count} owner(s):\n" + string.Join(",\n", owners); SampleOutputUtil.PrintResult(ownersString, nameof(Erc721), nameof(Erc721.OwnerOfBatch)); } From 7ff64613f4f97abdb890e22527c3c55bbe6ae706 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 02:20:48 +0000 Subject: [PATCH 28/44] Auto-duplicate Packages Samples --- .../Web3.Unity/Scenes/SampleMain.unity | 196 +++++++++++++++++- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 2 - .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 4 +- 3 files changed, 196 insertions(+), 6 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity index 7ff6fd35b..07a55941c 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity @@ -2333,7 +2333,7 @@ MonoBehaviour: m_HandleRect: {fileID: 37375165} m_Direction: 0 m_Value: 0 - m_Size: 0.25564784 + m_Size: 0.2672342 m_NumberOfSteps: 0 m_OnValueChanged: m_PersistentCalls: @@ -5820,6 +5820,200 @@ MonoBehaviour: m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 +--- !u!1001 &1067896884 +PrefabInstance: + m_ObjectHideFlags: 0 + serializedVersion: 2 + m_Modification: + m_TransformParent: {fileID: 1432457965} + m_Modifications: + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_Pivot.x + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_Pivot.y + value: 0.5 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_RootOrder + value: 18 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMax.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMax.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMin.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchorMin.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_SizeDelta.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_SizeDelta.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalScale.x + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalScale.y + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalScale.z + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalPosition.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.w + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalRotation.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchoredPosition.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_AnchoredPosition.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalEulerAnglesHint.x + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalEulerAnglesHint.y + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_LocalEulerAnglesHint.z + value: 0 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode + value: 1 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target + value: + objectReference: {fileID: 108046416} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target + value: + objectReference: {fileID: 7978786053810957042} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_CallState + value: 2 + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName + value: MultiCallBalanceOfBatch + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName + value: Execute + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName + value: EvmCalls, Samples + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName + value: Samples.Behaviours.SampleBehaviour, Samples + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName + value: UnityEngine.Object, UnityEngine + objectReference: {fileID: 0} + - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_Name + value: Button - MultiCallBalanceOf + objectReference: {fileID: 0} + - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_text + value: MultiCall + objectReference: {fileID: 0} + - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + propertyPath: m_fontSize + value: 17.9 + objectReference: {fileID: 0} + m_RemovedComponents: [] + m_SourcePrefab: {fileID: 100100000, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} +--- !u!1 &1067896885 stripped +GameObject: + m_CorrespondingSourceObject: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} + m_PrefabInstance: {fileID: 1067896884} + m_PrefabAsset: {fileID: 0} +--- !u!114 &1067896886 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1067896885} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} + m_Name: + m_EditorClassIdentifier: + m_IgnoreLayout: 0 + m_MinWidth: -1 + m_MinHeight: -1 + m_PreferredWidth: -1 + m_PreferredHeight: 50 + m_FlexibleWidth: -1 + m_FlexibleHeight: -1 + m_LayoutPriority: 1 --- !u!1001 &1101863644 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index ce095b63f..55a2b993f 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -322,6 +322,4 @@ public async void MultiCall() Debug.Log($"decodedTotalSupply {((BigInteger)decodedTotalSupply[0]).ToString()}"); } } - - } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index ea5b80c03..be8a52918 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -37,8 +37,6 @@ public class Erc721Calls : MonoBehaviour #region Owner Of Batch private string[] tokenIdsOwnerOfBatch = { "1", "2" }; - // optional: multicall contract https://github.com/makerdao/multicall - private string multicallOwnerOfBatch = "0x77dca2c955b15e9de4dbbcf1246b4b85b651e50e"; #endregion @@ -99,7 +97,7 @@ await Erc721.OwnerOf(Web3Accessor.Web3, Contracts.Erc721, tokenIdOwnerOf) /// public async void OwnerOfBatch() { - var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, Contracts.Erc721, tokenIdsOwnerOfBatch, multicallOwnerOfBatch); + var owners = await Erc721.OwnerOfBatch(Web3Accessor.Web3, Contracts.Erc721, tokenIdsOwnerOfBatch); var ownersString = $"{owners.Count} owner(s):\n" + string.Join(",\n", owners); SampleOutputUtil.PrintResult(ownersString, nameof(Erc721), nameof(Erc721.OwnerOfBatch)); } From eb1d39c977981383988e6e7984e3d3c2d958d7ab Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 12:14:21 +0800 Subject: [PATCH 29/44] owner of batch working --- .../Runtime/Scripts/EVM/Remote/CSServer.cs | 99 ----- .../Runtime/Scripts/EVM/Token/ABI.cs | 13 +- .../Runtime/Scripts/EVM/Token/Contracts.cs | 8 +- .../Runtime/Scripts/EVM/Token/Erc721.cs | 10 +- .../Tests/Runtime/Erc1155Tests.cs | 1 - .../Tests/Runtime/Erc20Tests.cs | 2 - .../Tests/Runtime/Erc721Tests.cs | 9 +- .../Tests/Runtime/EvmTests.cs | 6 +- .../Prefabs/Minter/VoucherMinter1155.prefab | 395 ------------------ .../Minter/VoucherMinter1155.prefab.meta | 7 - .../Prefabs/Minter/VoucherMinter721.prefab | 395 ------------------ .../Minter/VoucherMinter721.prefab.meta | 7 - .../Scripts/Prefabs/Minter/Mint1155.cs | 42 -- .../Scripts/Prefabs/Minter/Mint1155.cs.meta | 11 - .../Scripts/Prefabs/Minter/Mint721Voucher.cs | 42 -- .../Prefabs/Minter/Mint721Voucher.cs.meta | 11 - .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 +- .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 +- 18 files changed, 23 insertions(+), 1039 deletions(-) delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab.meta delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab.meta delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs.meta delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs delete mode 100644 src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs index 768894eb6..be986ba9c 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs @@ -15,41 +15,6 @@ public class CSServer { public class Response { public T response; } private static readonly string host = "https://api.gaming.chainsafe.io/evm"; - private static readonly string hostVoucher = "https://lazy-minting-voucher-signer.herokuapp.com"; - - /// - /// Calls a contract method using the Multicall service. - /// - /// The Web3 instance used for the call. - /// The blockchain chain identifier (e.g., Ethereum). - /// The network identifier (e.g., Mainnet, Ropsten). - /// The address of the contract to call. - /// The JSON ABI (Application Binary Interface) of the contract. - /// The name of the contract method to call. - /// The arguments to pass to the contract method (in JSON format). - /// [Optional] The Multicall specific parameters, if any. - /// [Optional] The RPC (Remote Procedure Call) configuration, if needed. - /// String encoded response from the MultiCall contract. - public static async Task Multicall(Web3 web3, string _chain, string _network, string _contract, string _abi, string _method, string _args, string _multicall = "", string _rpc = "") - { - WWWForm form = new WWWForm(); - form.AddField("projectId", web3.ProjectConfig.ProjectId); - form.AddField("chain", _chain); - form.AddField("network", _network); - form.AddField("contract", _contract); - form.AddField("abi", _abi); - form.AddField("method", _method); - form.AddField("args", _args); - form.AddField("multicall", _multicall); - form.AddField("rpc", _rpc); - string url = host + "/multicall"; - using (UnityWebRequest webRequest = UnityWebRequest.Post(url, form)) - { - await webRequest.SendWebRequest(); - Response data = JsonUtility.FromJson>(Encoding.UTF8.GetString(webRequest.downloadHandler.data)); - return data.response; - } - } /// /// Creates a mint transaction for an NFT (Non-Fungible Token) on a specified blockchain network. @@ -278,40 +243,6 @@ public static async Task GetNft(Web3 web3, string _account, string _chai } } - /// - /// Retrieves a 721 voucher. - /// - /// The Web3 instance - /// A response object containing the voucher details. - public static async Task Get721Voucher(Web3 web3) - { - string url = hostVoucher + "/voucher721?receiver=" + await web3.Signer.GetAddress(); - - using (UnityWebRequest webRequest = UnityWebRequest.Get(url)) - { - await webRequest.SendWebRequest(); - GetVoucherModel.GetVoucher721Response root721 = JsonConvert.DeserializeObject(webRequest.downloadHandler.text); - return root721; - } - } - - /// - /// Retrieves a 1155 voucher. - /// - /// The Web3 instance - /// A response object containing the voucher details. - public static async Task Get1155Voucher(Web3 web3) - { - string url = hostVoucher + "/voucher1155?receiver=" + await web3.Signer.GetAddress(); - - using (UnityWebRequest webRequest = UnityWebRequest.Get(url)) - { - await webRequest.SendWebRequest(); - GetVoucherModel.GetVoucher1155Response root1155 = JsonConvert.DeserializeObject(webRequest.downloadHandler.text); - return root1155; - } - } - /// /// Creates an approval transaction for a specific token type. /// @@ -419,36 +350,6 @@ public static async Task AllErc1155(Web3 web3, string chain, st throw new Web3Exception("NFTs deserialization failed.", e); } } - - /// - /// Creates a redeem transaction for a voucher, allowing the redemption of an NFT. - /// - /// The Web3 instance used for the transaction. - /// The blockchain chain identifier (e.g., Ethereum). - /// The network identifier (e.g., Mainnet, Ropsten). - /// The voucher to be redeemed. - /// The type or category of the voucher. - /// The address of the NFT contract associated with the voucher. - /// The account address initiating the redemption transaction. - /// A response object containing information about the redemption transaction. - public static async Task CreateRedeemTransaction(Web3 web3, string chain, string network, string voucher, string type, string nftAddress, string account) - { - WWWForm form = new WWWForm(); - form.AddField("projectId", web3.ProjectConfig.ProjectId); - form.AddField("chain", chain); - form.AddField("network", network); - form.AddField("voucher", voucher); - form.AddField("type", type); - form.AddField("nftAdrress", nftAddress); - form.AddField("account", account); - string url = host + "/createRedeemTransaction"; - using (UnityWebRequest webRequest = UnityWebRequest.Post(url, form)) - { - await webRequest.SendWebRequest(); - RedeemVoucherTxModel.Root data = JsonConvert.DeserializeObject(Encoding.UTF8.GetString(webRequest.downloadHandler.data)); - return data.response; - } - } } } diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs index e40928b31..3384d4275 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs @@ -2,10 +2,13 @@ namespace Scripts.EVM.Token { public static class ABI { - public const string Erc20 = "[ { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string Erc721 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721IncorrectOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721InsufficientApproval\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721NonexistentToken\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"approved\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_fromTokenId\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_toTokenId\", \"type\": \"uint256\" } ], \"name\": \"BatchMetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_tokenId\", \"type\": \"uint256\" } ], \"name\": \"MetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"getApproved\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ownerOf\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"string\", \"name\": \"uri\", \"type\": \"string\" } ], \"name\": \"safeMint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"tokenURI\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; - public const string Erc1155 = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string ArrayTotal = "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; - public const string CustomBalanceOf = "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; + public const string Erc20 = + "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"_amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; + public const string Erc721 = + "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721IncorrectOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721InsufficientApproval\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721NonexistentToken\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"approved\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_fromTokenId\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_toTokenId\", \"type\": \"uint256\" } ], \"name\": \"BatchMetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_tokenId\", \"type\": \"uint256\" } ], \"name\": \"MetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"getApproved\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ownerOf\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"string\", \"name\": \"_uri\", \"type\": \"string\" } ], \"name\": \"safeMint\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"tokenURI\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; + public const string Erc1155 = + "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC1155InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"idsLength\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"valuesLength\", \"type\": \"uint256\" } ], \"name\": \"ERC1155InvalidArrayLength\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC1155MissingApprovalForAll\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"_id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"_amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"_ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"_amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + public const string ArrayTotal = + "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"_addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs index a821ddd03..67b0008e8 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs @@ -2,9 +2,9 @@ { public class Contracts { - public const string Erc20 = "0x5213E57f38238C46560a0f1686CCaFf54263cE44"; - public const string Erc721 = "0xE83EE42471Ad261Cf3b9221006925d8F1FC01ee9"; - public const string Erc1155 = "0xbc7d7B826d3f9EEfCfBbA4cDC2fE8B8741114085"; - public const string ArrayTotal = "0xCb0FdD2837a61d7c39ce0fbF56403Db601CAeFd4"; + public const string Erc20 = "0x095C8d0C13bc12Fa389dCf00FD484E9cB53F58b5"; + public const string Erc721 = "0x1B21fa9a1E46D688A2d3ae5DE6A34Ab346D94890"; + public const string Erc1155 = "0x709F74bdA95B61de64758dF58c0791a751d74328"; + public const string ArrayTotal = "0xef99A5cD19db80be2e2FAd89938bf2d09C7c728b"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs index c0ffb3532..099c78409 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs @@ -2,13 +2,10 @@ using System.Numerics; using System.Threading.Tasks; using ChainSafe.Gaming.MultiCall; -using ChainSafe.Gaming.UnityPackage; using ChainSafe.Gaming.Web3; using Nethereum.Contracts.QueryHandlers.MultiCall; using Nethereum.Hex.HexConvertors.Extensions; -using Newtonsoft.Json; using Scripts.EVM.Remote; -using UnityEngine; namespace Scripts.EVM.Token { @@ -79,7 +76,7 @@ private static async Task OwnerOf(Web3 web3, string contractAddress, obj } /// - /// Returns the owners of multiple token ids at once + /// Returns owners of batch /// public static async Task> OwnerOfBatch( Web3 web3, @@ -103,15 +100,14 @@ public static async Task> OwnerOfBatch( calls.Add(call3Value); }; - var multiCallResultResponse = await Web3Accessor.Web3.MultiCall().MultiCallAsync(calls.ToArray()); + var multiCallResultResponse = await web3.MultiCall().MultiCallAsync(calls.ToArray()); var owners = new List(); for (int i = 0; i < multiCallResultResponse.Count; i++) { if (multiCallResultResponse[i] != null && multiCallResultResponse[i].Success) { var owner = erc721Contract.Decode(EthMethod.OwnerOf, multiCallResultResponse[i].ReturnData.ToHex()); - Debug.Log(owner.ToString()); - owners.Add(owner.ToString()); + owners.Add(owner[0].ToString()); } } return owners; diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs index ee4c616c9..342b4ead3 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs @@ -3,7 +3,6 @@ using System.Numerics; using ChainSafe.Gaming.Evm.JsonRpc; using ChainSafe.Gaming.UnityPackage; -using ChainSafe.Gaming.WalletConnect; using ChainSafe.Gaming.Web3; using ChainSafe.Gaming.Web3.Build; using ChainSafe.Gaming.Web3.Unity; diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs index f399d8bd0..0997776c9 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc20Tests.cs @@ -1,9 +1,7 @@ using System.Collections; using System.Numerics; -using ChainSafe.Gaming.Evm.Contracts; using ChainSafe.Gaming.Evm.JsonRpc; using ChainSafe.Gaming.UnityPackage; -using ChainSafe.Gaming.WalletConnect; using ChainSafe.Gaming.Web3; using ChainSafe.Gaming.Web3.Build; using ChainSafe.Gaming.Web3.Unity; diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index cc59c16c0..a2372772a 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -1,10 +1,7 @@ using System.Collections; -using System.Collections.Generic; -using System.Linq; -using System.Numerics; using ChainSafe.Gaming.Evm.JsonRpc; +using ChainSafe.Gaming.MultiCall; using ChainSafe.Gaming.UnityPackage; -using ChainSafe.Gaming.WalletConnect; using ChainSafe.Gaming.Web3; using ChainSafe.Gaming.Web3.Build; using ChainSafe.Gaming.Web3.Unity; @@ -12,7 +9,6 @@ using Scripts.EVM.Token; using UnityEngine; using UnityEngine.TestTools; -using Web3Unity.Scripts.Prefabs; public class Erc721Tests { @@ -30,7 +26,7 @@ public class Erc721Tests private const string ownerOfTokenId = "2"; private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; private static string[] ownerOfBatchTokenIds = { "4", "6" }; - private static string[] ownerOfBatchExpected = { "0xdD4c825203f97984e7867F11eeCc813A036089D1", "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2" }; + private static string[] ownerOfBatchExpected = { "0xdD4c825203f97984e7867F11eeCc813A036089D1", "0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44" }; #endregion @@ -78,6 +74,7 @@ public IEnumerator Setup() { services.UseUnityEnvironment(); services.UseRpcProvider(); + services.UseMultiCall(); }); var buildWeb3 = web3Builder.LaunchAsync(); diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index 1053bfe9a..e38f7701f 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -56,7 +56,7 @@ public class EvmTests : SampleTestsBase private BigInteger TransferErc20Amount = 1; - private const int Transfer721Id = 5; + private const int Transfer721Id = 1; private const int Transfer1155Id = 1; private const int Transfer1155Amount = 1; @@ -122,7 +122,7 @@ public IEnumerator TestGetArray() ArrayToSend.ConvertAll(a => a.ToLower()) }); } - + [UnityTest] public IEnumerator TestSendArray() { @@ -270,7 +270,7 @@ public IEnumerator TestECDSAAddress() [UnityTest] public IEnumerator TestCustomBalanceOfErc20() { - var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.CustomBalanceOf, Contracts.Erc20); + var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.Erc20, Contracts.Erc20); yield return new WaitUntil(() => getCustomBalanceOf.IsCompleted); Assert.AreEqual(new BigInteger(1000000000000999999), getCustomBalanceOf.Result); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab deleted file mode 100644 index 73532cb44..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab +++ /dev/null @@ -1,395 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2469385475120306930 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385475120306931} - - component: {fileID: 2469385475120306933} - - component: {fileID: 2469385475120306932} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2469385475120306931 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475120306930} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2469385475131455844} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2469385475120306933 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475120306930} - m_CullTransparentMesh: 1 ---- !u!114 &2469385475120306932 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475120306930} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Get Voucher Mint 1155 ---- !u!1 &2469385475131455843 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385475131455844} - - component: {fileID: 2469385475131455832} - - component: {fileID: 2469385475131455847} - - component: {fileID: 2469385475131455846} - m_Layer: 5 - m_Name: GetVoucher1155 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2469385475131455844 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385475120306931} - m_Father: {fileID: 2469385476375445278} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 7.3307, y: 3} - m_SizeDelta: {x: 178.6985, y: 51.3155} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2469385475131455832 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_CullTransparentMesh: 1 ---- !u!114 &2469385475131455847 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &2469385475131455846 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2469385475131455847} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 8354423990863474395} - m_TargetAssemblyTypeName: MintWeb3Wallet1155, Assembly-CSharp - m_MethodName: VoucherMintNft1155 - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &2469385475538265602 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385475538265603} - m_Layer: 0 - m_Name: VoucherMinter1155 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2469385475538265603 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475538265602} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 550.5, y: 259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385476367201654} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2469385476367201653 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385476367201654} - - component: {fileID: 8354423990863474395} - m_Layer: 0 - m_Name: GetVoucher1155 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2469385476367201654 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476367201653} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -550.5, y: -259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385476375445278} - m_Father: {fileID: 2469385475538265603} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &8354423990863474395 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476367201653} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f530a2f3db5f5c7478b08921d42c5114, type: 3} - m_Name: - m_EditorClassIdentifier: - nftAddress: 0x2c1867bc3026178a47a677513746dcc6822a137a ---- !u!1 &2469385476375445277 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385476375445278} - - component: {fileID: 2469385476375445265} - - component: {fileID: 2469385476375445264} - - component: {fileID: 2469385476375445279} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2469385476375445278 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385475131455844} - m_Father: {fileID: 2469385476367201654} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!223 &2469385476375445265 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!114 &2469385476375445264 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!114 &2469385476375445279 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab.meta b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab.meta deleted file mode 100644 index 97f0d0e46..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter1155.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: adb4ed441865ece4195a1e5a5194795d -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab deleted file mode 100644 index 6cfa7d719..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab +++ /dev/null @@ -1,395 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2759602052112117140 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602052112117141} - m_Layer: 0 - m_Name: VoucherMinter721 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2759602052112117141 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052112117140} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 550.5, y: 259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602053411208928} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2759602052780609892 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602052780609893} - - component: {fileID: 2759602052780609891} - - component: {fileID: 2759602052780609890} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2759602052780609893 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052780609892} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2759602052787827442} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2759602052780609891 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052780609892} - m_CullTransparentMesh: 1 ---- !u!114 &2759602052780609890 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052780609892} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Get Voucher Mint 721 ---- !u!1 &2759602052787827445 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602052787827442} - - component: {fileID: 2759602052787827406} - - component: {fileID: 2759602052787827441} - - component: {fileID: 2759602052787827440} - m_Layer: 5 - m_Name: GetVoucher721 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2759602052787827442 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602052780609893} - m_Father: {fileID: 2759602053423477896} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 7.3307, y: 5} - m_SizeDelta: {x: 178.6985, y: 51.3155} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2759602052787827406 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_CullTransparentMesh: 1 ---- !u!114 &2759602052787827441 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &2759602052787827440 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2759602052787827441} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1370948658301429458} - m_TargetAssemblyTypeName: MintWeb3Wallet721, Assembly-CSharp - m_MethodName: VoucherMintNft721 - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &2759602053411208931 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602053411208928} - - component: {fileID: 1370948658301429458} - m_Layer: 0 - m_Name: GetVoucher721 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2759602053411208928 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053411208931} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -550.5, y: -259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602053423477896} - m_Father: {fileID: 2759602052112117141} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1370948658301429458 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053411208931} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 785a5af054a848e4a93802898e155c97, type: 3} - m_Name: - m_EditorClassIdentifier: - nftAddress: f01559ae4021a47e26bc773587278f62a833f2a6117411afbc5a7855661936d1c ---- !u!1 &2759602053423477899 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602053423477896} - - component: {fileID: 2759602053423477895} - - component: {fileID: 2759602053423477894} - - component: {fileID: 2759602053423477897} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2759602053423477896 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602052787827442} - m_Father: {fileID: 2759602053411208928} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!223 &2759602053423477895 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!114 &2759602053423477894 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!114 &2759602053423477897 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab.meta b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab.meta deleted file mode 100644 index b3025b80f..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Prefabs/Minter/VoucherMinter721.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: cf8a2baf718a5584584015e1b2b23eb3 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs deleted file mode 100644 index 4be2c33e7..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs +++ /dev/null @@ -1,42 +0,0 @@ -using ChainSafe.Gaming.Evm.Transactions; -using ChainSafe.Gaming.UnityPackage; -using ChainSafe.Gaming.UnityPackage.Model; -using UnityEngine; -using Scripts.EVM.Remote; -using Nethereum.Hex.HexTypes; -using Newtonsoft.Json; - -public class Mint1155 : MonoBehaviour -{ - // address of nft you want to mint - public string nftAddress = "0x2c1867bc3026178a47a677513746dcc6822a137a"; - - public async void VoucherMintNft1155() - { - var voucherResponse1155 = await CSServer.Get1155Voucher(Web3Accessor.Web3); - CreateRedeemVoucherModel.CreateVoucher1155 voucher1155 = new CreateRedeemVoucherModel.CreateVoucher1155(); - voucher1155.tokenId = voucherResponse1155.tokenId; - voucher1155.minPrice = voucherResponse1155.minPrice; - voucher1155.signer = voucherResponse1155.signer; - voucher1155.receiver = voucherResponse1155.receiver; - voucher1155.amount = voucherResponse1155.amount; - voucher1155.nonce = voucherResponse1155.nonce; - voucher1155.signature = voucherResponse1155.signature; - string voucherArgs = JsonUtility.ToJson(voucher1155); - - // connects to user's browser wallet to call a transaction - var chainConfig = Web3Accessor.Web3.ChainConfig; - RedeemVoucherTxModel.Response voucherResponse = await CSServer.CreateRedeemTransaction(Web3Accessor.Web3, chainConfig.Chain, chainConfig.Network, voucherArgs, "1155", nftAddress, voucherResponse1155.receiver); - var txRequest = new TransactionRequest - { - ChainId = HexBigIntUtil.ParseHexBigInt(chainConfig.ChainId), - To = voucherResponse.tx.to, - Value = new HexBigInteger(voucherResponse.tx.value), - Data = voucherResponse.tx.data, - GasLimit = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasLimit), - GasPrice = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasPrice), - }; - var response = await Web3Accessor.Web3.TransactionExecutor.SendTransaction(txRequest); - Debug.Log(JsonConvert.SerializeObject(response)); - } -} diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs.meta b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs.meta deleted file mode 100644 index f3db421c6..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint1155.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f530a2f3db5f5c7478b08921d42c5114 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs deleted file mode 100644 index 16b4b6e41..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs +++ /dev/null @@ -1,42 +0,0 @@ -using ChainSafe.Gaming.Evm.Transactions; -using ChainSafe.Gaming.UnityPackage; -using ChainSafe.Gaming.UnityPackage.Model; -using Nethereum.Hex.HexTypes; -using Newtonsoft.Json; -using UnityEngine; -using Scripts.EVM.Remote; - -public class Mint721Voucher : MonoBehaviour -{ - // address of nft you want to mint - public string nftAddress = "f01559ae4021a47e26bc773587278f62a833f2a6117411afbc5a7855661936d1c"; - - public async void VoucherMintNft721() - { - var voucherResponse721 = await CSServer.Get721Voucher(Web3Accessor.Web3); - CreateRedeemVoucherModel.CreateVoucher721 voucher721 = new CreateRedeemVoucherModel.CreateVoucher721 - { - tokenId = voucherResponse721.tokenId, - minPrice = voucherResponse721.minPrice, - signer = voucherResponse721.signer, - receiver = voucherResponse721.receiver, - signature = voucherResponse721.signature - }; - var voucherArgs = JsonUtility.ToJson(voucher721); - - // connects to user's browser wallet to call a transaction - var chainConfig = Web3Accessor.Web3.ChainConfig; - RedeemVoucherTxModel.Response voucherResponse = await CSServer.CreateRedeemTransaction(Web3Accessor.Web3, chainConfig.Chain, chainConfig.Network, voucherArgs, "721", nftAddress, voucherResponse721.receiver); - var txRequest = new TransactionRequest - { - ChainId = HexBigIntUtil.ParseHexBigInt(chainConfig.ChainId), - To = voucherResponse.tx.to, - Value = new HexBigInteger(voucherResponse.tx.value), - Data = voucherResponse.tx.data, - GasLimit = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasLimit), - GasPrice = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasPrice), - }; - var response = await Web3Accessor.Web3.TransactionExecutor.SendTransaction(txRequest); - Debug.Log(JsonConvert.SerializeObject(response)); - } -} diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta deleted file mode 100644 index cb534e18c..000000000 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 785a5af054a848e4a93802898e155c97 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 0f0b2d92c..6eb11f377 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -47,7 +47,7 @@ public async void BalanceOf() /// public async void CustomTokenBalanceOf() { - var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, Contracts.Erc20); + var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.Erc20, Contracts.Erc20); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.CustomTokenBalance)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index be8a52918..2f6b4e79b 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -36,7 +36,7 @@ public class Erc721Calls : MonoBehaviour #region Owner Of Batch - private string[] tokenIdsOwnerOfBatch = { "1", "2" }; + private string[] tokenIdsOwnerOfBatch = { "4", "6" }; #endregion From cf8d3457b5a83199eb1339129009362b8f1fe8d2 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 04:14:49 +0000 Subject: [PATCH 30/44] Auto-duplicate Packages Samples --- .../Prefabs/Minter/VoucherMinter1155.prefab | 395 ------------------ .../Minter/VoucherMinter1155.prefab.meta | 7 - .../Prefabs/Minter/VoucherMinter721.prefab | 395 ------------------ .../Minter/VoucherMinter721.prefab.meta | 7 - .../Scripts/Prefabs/Minter/Mint1155.cs | 42 -- .../Scripts/Prefabs/Minter/Mint1155.cs.meta | 11 - .../Scripts/Prefabs/Minter/Mint721Voucher.cs | 42 -- .../Prefabs/Minter/Mint721Voucher.cs.meta | 11 - .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 +- .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 +- 10 files changed, 2 insertions(+), 912 deletions(-) delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab.meta delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab.meta delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs.meta delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs delete mode 100644 Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab deleted file mode 100644 index 73532cb44..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab +++ /dev/null @@ -1,395 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2469385475120306930 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385475120306931} - - component: {fileID: 2469385475120306933} - - component: {fileID: 2469385475120306932} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2469385475120306931 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475120306930} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2469385475131455844} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2469385475120306933 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475120306930} - m_CullTransparentMesh: 1 ---- !u!114 &2469385475120306932 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475120306930} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Get Voucher Mint 1155 ---- !u!1 &2469385475131455843 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385475131455844} - - component: {fileID: 2469385475131455832} - - component: {fileID: 2469385475131455847} - - component: {fileID: 2469385475131455846} - m_Layer: 5 - m_Name: GetVoucher1155 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2469385475131455844 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385475120306931} - m_Father: {fileID: 2469385476375445278} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 7.3307, y: 3} - m_SizeDelta: {x: 178.6985, y: 51.3155} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2469385475131455832 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_CullTransparentMesh: 1 ---- !u!114 &2469385475131455847 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &2469385475131455846 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475131455843} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2469385475131455847} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 8354423990863474395} - m_TargetAssemblyTypeName: MintWeb3Wallet1155, Assembly-CSharp - m_MethodName: VoucherMintNft1155 - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &2469385475538265602 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385475538265603} - m_Layer: 0 - m_Name: VoucherMinter1155 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2469385475538265603 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385475538265602} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 550.5, y: 259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385476367201654} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2469385476367201653 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385476367201654} - - component: {fileID: 8354423990863474395} - m_Layer: 0 - m_Name: GetVoucher1155 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2469385476367201654 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476367201653} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -550.5, y: -259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385476375445278} - m_Father: {fileID: 2469385475538265603} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &8354423990863474395 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476367201653} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: f530a2f3db5f5c7478b08921d42c5114, type: 3} - m_Name: - m_EditorClassIdentifier: - nftAddress: 0x2c1867bc3026178a47a677513746dcc6822a137a ---- !u!1 &2469385476375445277 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2469385476375445278} - - component: {fileID: 2469385476375445265} - - component: {fileID: 2469385476375445264} - - component: {fileID: 2469385476375445279} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2469385476375445278 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2469385475131455844} - m_Father: {fileID: 2469385476367201654} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!223 &2469385476375445265 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!114 &2469385476375445264 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!114 &2469385476375445279 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2469385476375445277} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab.meta b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab.meta deleted file mode 100644 index 97f0d0e46..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter1155.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: adb4ed441865ece4195a1e5a5194795d -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab deleted file mode 100644 index 6cfa7d719..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab +++ /dev/null @@ -1,395 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!1 &2759602052112117140 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602052112117141} - m_Layer: 0 - m_Name: VoucherMinter721 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2759602052112117141 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052112117140} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 550.5, y: 259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602053411208928} - m_Father: {fileID: 0} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!1 &2759602052780609892 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602052780609893} - - component: {fileID: 2759602052780609891} - - component: {fileID: 2759602052780609890} - m_Layer: 5 - m_Name: Text - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2759602052780609893 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052780609892} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: [] - m_Father: {fileID: 2759602052787827442} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 1, y: 1} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2759602052780609891 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052780609892} - m_CullTransparentMesh: 1 ---- !u!114 &2759602052780609890 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052780609892} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_FontData: - m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0} - m_FontSize: 14 - m_FontStyle: 0 - m_BestFit: 0 - m_MinSize: 10 - m_MaxSize: 40 - m_Alignment: 4 - m_AlignByGeometry: 0 - m_RichText: 1 - m_HorizontalOverflow: 0 - m_VerticalOverflow: 0 - m_LineSpacing: 1 - m_Text: Get Voucher Mint 721 ---- !u!1 &2759602052787827445 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602052787827442} - - component: {fileID: 2759602052787827406} - - component: {fileID: 2759602052787827441} - - component: {fileID: 2759602052787827440} - m_Layer: 5 - m_Name: GetVoucher721 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2759602052787827442 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602052780609893} - m_Father: {fileID: 2759602053423477896} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0.5, y: 0.5} - m_AnchorMax: {x: 0.5, y: 0.5} - m_AnchoredPosition: {x: 7.3307, y: 5} - m_SizeDelta: {x: 178.6985, y: 51.3155} - m_Pivot: {x: 0.5, y: 0.5} ---- !u!222 &2759602052787827406 -CanvasRenderer: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_CullTransparentMesh: 1 ---- !u!114 &2759602052787827441 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Material: {fileID: 0} - m_Color: {r: 1, g: 1, b: 1, a: 1} - m_RaycastTarget: 1 - m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0} - m_Maskable: 1 - m_OnCullStateChanged: - m_PersistentCalls: - m_Calls: [] - m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0} - m_Type: 1 - m_PreserveAspect: 0 - m_FillCenter: 1 - m_FillMethod: 4 - m_FillAmount: 1 - m_FillClockwise: 1 - m_FillOrigin: 0 - m_UseSpriteMesh: 0 - m_PixelsPerUnitMultiplier: 1 ---- !u!114 &2759602052787827440 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602052787827445} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} - m_Name: - m_EditorClassIdentifier: - m_Navigation: - m_Mode: 3 - m_WrapAround: 0 - m_SelectOnUp: {fileID: 0} - m_SelectOnDown: {fileID: 0} - m_SelectOnLeft: {fileID: 0} - m_SelectOnRight: {fileID: 0} - m_Transition: 1 - m_Colors: - m_NormalColor: {r: 1, g: 1, b: 1, a: 1} - m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1} - m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1} - m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608} - m_ColorMultiplier: 1 - m_FadeDuration: 0.1 - m_SpriteState: - m_HighlightedSprite: {fileID: 0} - m_PressedSprite: {fileID: 0} - m_SelectedSprite: {fileID: 0} - m_DisabledSprite: {fileID: 0} - m_AnimationTriggers: - m_NormalTrigger: Normal - m_HighlightedTrigger: Highlighted - m_PressedTrigger: Pressed - m_SelectedTrigger: Selected - m_DisabledTrigger: Disabled - m_Interactable: 1 - m_TargetGraphic: {fileID: 2759602052787827441} - m_OnClick: - m_PersistentCalls: - m_Calls: - - m_Target: {fileID: 1370948658301429458} - m_TargetAssemblyTypeName: MintWeb3Wallet721, Assembly-CSharp - m_MethodName: VoucherMintNft721 - m_Mode: 1 - m_Arguments: - m_ObjectArgument: {fileID: 0} - m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine - m_IntArgument: 0 - m_FloatArgument: 0 - m_StringArgument: - m_BoolArgument: 0 - m_CallState: 2 ---- !u!1 &2759602053411208931 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602053411208928} - - component: {fileID: 1370948658301429458} - m_Layer: 0 - m_Name: GetVoucher721 - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!4 &2759602053411208928 -Transform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053411208931} - m_LocalRotation: {x: -0, y: -0, z: -0, w: 1} - m_LocalPosition: {x: -550.5, y: -259.5, z: 0} - m_LocalScale: {x: 1, y: 1, z: 1} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602053423477896} - m_Father: {fileID: 2759602052112117141} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} ---- !u!114 &1370948658301429458 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053411208931} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 785a5af054a848e4a93802898e155c97, type: 3} - m_Name: - m_EditorClassIdentifier: - nftAddress: f01559ae4021a47e26bc773587278f62a833f2a6117411afbc5a7855661936d1c ---- !u!1 &2759602053423477899 -GameObject: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - serializedVersion: 6 - m_Component: - - component: {fileID: 2759602053423477896} - - component: {fileID: 2759602053423477895} - - component: {fileID: 2759602053423477894} - - component: {fileID: 2759602053423477897} - m_Layer: 5 - m_Name: Canvas - m_TagString: Untagged - m_Icon: {fileID: 0} - m_NavMeshLayer: 0 - m_StaticEditorFlags: 0 - m_IsActive: 1 ---- !u!224 &2759602053423477896 -RectTransform: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} - m_LocalPosition: {x: 0, y: 0, z: 0} - m_LocalScale: {x: 0, y: 0, z: 0} - m_ConstrainProportionsScale: 0 - m_Children: - - {fileID: 2759602052787827442} - m_Father: {fileID: 2759602053411208928} - m_RootOrder: 0 - m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} - m_Pivot: {x: 0, y: 0} ---- !u!223 &2759602053423477895 -Canvas: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_Enabled: 1 - serializedVersion: 3 - m_RenderMode: 0 - m_Camera: {fileID: 0} - m_PlaneDistance: 100 - m_PixelPerfect: 0 - m_ReceivesEvents: 1 - m_OverrideSorting: 0 - m_OverridePixelPerfect: 0 - m_SortingBucketNormalizedSize: 0 - m_AdditionalShaderChannelsFlag: 0 - m_SortingLayerID: 0 - m_SortingOrder: 0 - m_TargetDisplay: 0 ---- !u!114 &2759602053423477894 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 0cd44c1031e13a943bb63640046fad76, type: 3} - m_Name: - m_EditorClassIdentifier: - m_UiScaleMode: 0 - m_ReferencePixelsPerUnit: 100 - m_ScaleFactor: 1 - m_ReferenceResolution: {x: 800, y: 600} - m_ScreenMatchMode: 0 - m_MatchWidthOrHeight: 0 - m_PhysicalUnit: 3 - m_FallbackScreenDPI: 96 - m_DefaultSpriteDPI: 96 - m_DynamicPixelsPerUnit: 1 - m_PresetInfoIsWorld: 0 ---- !u!114 &2759602053423477897 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 2759602053423477899} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: dc42784cf147c0c48a680349fa168899, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreReversedGraphics: 1 - m_BlockingObjects: 0 - m_BlockingMask: - serializedVersion: 2 - m_Bits: 4294967295 diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab.meta b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab.meta deleted file mode 100644 index b3025b80f..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Prefabs/Minter/VoucherMinter721.prefab.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: cf8a2baf718a5584584015e1b2b23eb3 -PrefabImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs deleted file mode 100644 index 4be2c33e7..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs +++ /dev/null @@ -1,42 +0,0 @@ -using ChainSafe.Gaming.Evm.Transactions; -using ChainSafe.Gaming.UnityPackage; -using ChainSafe.Gaming.UnityPackage.Model; -using UnityEngine; -using Scripts.EVM.Remote; -using Nethereum.Hex.HexTypes; -using Newtonsoft.Json; - -public class Mint1155 : MonoBehaviour -{ - // address of nft you want to mint - public string nftAddress = "0x2c1867bc3026178a47a677513746dcc6822a137a"; - - public async void VoucherMintNft1155() - { - var voucherResponse1155 = await CSServer.Get1155Voucher(Web3Accessor.Web3); - CreateRedeemVoucherModel.CreateVoucher1155 voucher1155 = new CreateRedeemVoucherModel.CreateVoucher1155(); - voucher1155.tokenId = voucherResponse1155.tokenId; - voucher1155.minPrice = voucherResponse1155.minPrice; - voucher1155.signer = voucherResponse1155.signer; - voucher1155.receiver = voucherResponse1155.receiver; - voucher1155.amount = voucherResponse1155.amount; - voucher1155.nonce = voucherResponse1155.nonce; - voucher1155.signature = voucherResponse1155.signature; - string voucherArgs = JsonUtility.ToJson(voucher1155); - - // connects to user's browser wallet to call a transaction - var chainConfig = Web3Accessor.Web3.ChainConfig; - RedeemVoucherTxModel.Response voucherResponse = await CSServer.CreateRedeemTransaction(Web3Accessor.Web3, chainConfig.Chain, chainConfig.Network, voucherArgs, "1155", nftAddress, voucherResponse1155.receiver); - var txRequest = new TransactionRequest - { - ChainId = HexBigIntUtil.ParseHexBigInt(chainConfig.ChainId), - To = voucherResponse.tx.to, - Value = new HexBigInteger(voucherResponse.tx.value), - Data = voucherResponse.tx.data, - GasLimit = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasLimit), - GasPrice = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasPrice), - }; - var response = await Web3Accessor.Web3.TransactionExecutor.SendTransaction(txRequest); - Debug.Log(JsonConvert.SerializeObject(response)); - } -} diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs.meta b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs.meta deleted file mode 100644 index f3db421c6..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint1155.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: f530a2f3db5f5c7478b08921d42c5114 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs deleted file mode 100644 index 16b4b6e41..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs +++ /dev/null @@ -1,42 +0,0 @@ -using ChainSafe.Gaming.Evm.Transactions; -using ChainSafe.Gaming.UnityPackage; -using ChainSafe.Gaming.UnityPackage.Model; -using Nethereum.Hex.HexTypes; -using Newtonsoft.Json; -using UnityEngine; -using Scripts.EVM.Remote; - -public class Mint721Voucher : MonoBehaviour -{ - // address of nft you want to mint - public string nftAddress = "f01559ae4021a47e26bc773587278f62a833f2a6117411afbc5a7855661936d1c"; - - public async void VoucherMintNft721() - { - var voucherResponse721 = await CSServer.Get721Voucher(Web3Accessor.Web3); - CreateRedeemVoucherModel.CreateVoucher721 voucher721 = new CreateRedeemVoucherModel.CreateVoucher721 - { - tokenId = voucherResponse721.tokenId, - minPrice = voucherResponse721.minPrice, - signer = voucherResponse721.signer, - receiver = voucherResponse721.receiver, - signature = voucherResponse721.signature - }; - var voucherArgs = JsonUtility.ToJson(voucher721); - - // connects to user's browser wallet to call a transaction - var chainConfig = Web3Accessor.Web3.ChainConfig; - RedeemVoucherTxModel.Response voucherResponse = await CSServer.CreateRedeemTransaction(Web3Accessor.Web3, chainConfig.Chain, chainConfig.Network, voucherArgs, "721", nftAddress, voucherResponse721.receiver); - var txRequest = new TransactionRequest - { - ChainId = HexBigIntUtil.ParseHexBigInt(chainConfig.ChainId), - To = voucherResponse.tx.to, - Value = new HexBigInteger(voucherResponse.tx.value), - Data = voucherResponse.tx.data, - GasLimit = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasLimit), - GasPrice = HexBigIntUtil.ParseHexBigInt(voucherResponse.tx.gasPrice), - }; - var response = await Web3Accessor.Web3.TransactionExecutor.SendTransaction(txRequest); - Debug.Log(JsonConvert.SerializeObject(response)); - } -} diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta deleted file mode 100644 index cb534e18c..000000000 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Prefabs/Minter/Mint721Voucher.cs.meta +++ /dev/null @@ -1,11 +0,0 @@ -fileFormatVersion: 2 -guid: 785a5af054a848e4a93802898e155c97 -MonoImporter: - externalObjects: {} - serializedVersion: 2 - defaultReferences: [] - executionOrder: 0 - icon: {instanceID: 0} - userData: - assetBundleName: - assetBundleVariant: diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 0f0b2d92c..6eb11f377 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -47,7 +47,7 @@ public async void BalanceOf() /// public async void CustomTokenBalanceOf() { - var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.CustomBalanceOf, Contracts.Erc20); + var result = await Erc20.CustomTokenBalance(Web3Accessor.Web3, ABI.Erc20, Contracts.Erc20); SampleOutputUtil.PrintResult(result.ToString(), nameof(Erc20), nameof(Erc20.CustomTokenBalance)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index be8a52918..2f6b4e79b 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -36,7 +36,7 @@ public class Erc721Calls : MonoBehaviour #region Owner Of Batch - private string[] tokenIdsOwnerOfBatch = { "1", "2" }; + private string[] tokenIdsOwnerOfBatch = { "4", "6" }; #endregion From 7112e808cec73a9278e48666275c0f069505397e Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 12:48:00 +0800 Subject: [PATCH 31/44] tests --- .../Runtime/Scripts/EVM/Token/Erc1155.cs | 1 - .../Tests/Runtime/EvmTests.cs | 20 +++++++++---------- .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 2 ++ .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 2 ++ .../Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 ++ .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 ++ 6 files changed, 18 insertions(+), 11 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs index cb993322b..19b295d84 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs @@ -6,7 +6,6 @@ using Scripts.EVM.Remote; using UnityEngine; using UnityEngine.Networking; -using Web3Unity.Scripts.Prefabs; namespace Scripts.EVM.Token { diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index e38f7701f..f421aeae8 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -56,7 +56,7 @@ public class EvmTests : SampleTestsBase private BigInteger TransferErc20Amount = 1; - private const int Transfer721Id = 1; + private const int Transfer721Id = 8; private const int Transfer1155Id = 1; private const int Transfer1155Amount = 1; @@ -98,7 +98,7 @@ public IEnumerator TestContractCall() [UnityTest] public IEnumerator TestContractSend() { - config.TestResponse = "0x3f32788de980b1570256a805c7ef193e48da263954d4c106bd7b9514d460753e"; + config.TestResponse = "0x21ce11a3d68add16601b310a9662d1dd354f3fb91469ea42070f00863db2657c"; object[] args = { IncreaseAmount @@ -197,7 +197,7 @@ public IEnumerator TestUseRegisteredContract() yield return new WaitUntil(() => useRegisteredContract.IsCompleted); if (useRegisteredContract.Exception != null) throw useRegisteredContract.Exception; Assert.IsTrue(useRegisteredContract.IsCompletedSuccessfully); - Assert.AreEqual(new BigInteger(1000000000000999999), useRegisteredContract.Result); + Assert.AreEqual(new BigInteger(1000000000000000000), useRegisteredContract.Result); } [UnityTest] @@ -272,13 +272,13 @@ public IEnumerator TestCustomBalanceOfErc20() { var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.Erc20, Contracts.Erc20); yield return new WaitUntil(() => getCustomBalanceOf.IsCompleted); - Assert.AreEqual(new BigInteger(1000000000000999999), getCustomBalanceOf.Result); + Assert.AreEqual(new BigInteger(1000000000000000000), getCustomBalanceOf.Result); } [UnityTest] public IEnumerator TestMintErc20() { - config.TestResponse = "0xbcff4755f1736b8ddfedb6d88fa6fbea5630fcc7e2f4b6e88da6ad19eb1fcaa6"; + config.TestResponse = "0xf6133ad76359ffaf67853a5eb138a94ed11f29d350b907420a92c685c6df5303"; var mint20 = Erc20.MintErc20(web3, Contracts.Erc20, SendToAddress, Mint20Amount); yield return new WaitUntil(() => mint20.IsCompleted); if (mint20.Exception != null) throw mint20.Exception; @@ -289,7 +289,7 @@ public IEnumerator TestMintErc20() [UnityTest] public IEnumerator TestMintErc721() { - config.TestResponse = "0xe4ff82c87784590c747ee8528506168f8a3165c8e6980f77e388f9a521f9d6bc"; + config.TestResponse = "0x09f1c615d638ae0b3a8c4a5555b46170c42dba214f04412400f3ff639657a223"; var mint721 = Erc721.MintErc721(web3, ABI.Erc721, Contracts.Erc721, Mint721Uri); yield return new WaitUntil(() => mint721.IsCompleted); if (mint721.Exception != null) throw mint721.Exception; @@ -300,7 +300,7 @@ public IEnumerator TestMintErc721() [UnityTest] public IEnumerator TestMintErc1155() { - config.TestResponse = "0xae4160283393f81033e5ff17b2f2732b27e7db21fd3a0eba064dffc01688861c"; + config.TestResponse = "0xa04294541b934b48ada4073b07ba01492d8ad676aa2db6f93249cec0820a1dca"; var mint1155 = Erc1155.MintErc1155(web3, ABI.Erc1155, Contracts.Erc1155, Mint1155Id, Mint1155Amount); yield return new WaitUntil(() => mint1155.IsCompleted); if (mint1155.Exception != null) throw mint1155.Exception; @@ -311,7 +311,7 @@ public IEnumerator TestMintErc1155() [UnityTest] public IEnumerator TestTransferErc20() { - config.TestResponse = "0x5d00d99c01cd8cc42e1ecc0f7597ab4a9875a3a28ceea3b61fc29607b6c49293"; + config.TestResponse = "0x6d75e92ec3e214a392955f3bdc1db3c606059e4f0d7b323a70d9741dd374a9c0"; var transferErc20 = Erc20.TransferErc20(web3, Contracts.Erc20, SendToAddress, TransferErc20Amount); yield return new WaitUntil(() => transferErc20.IsCompleted); if (transferErc20.Exception != null) throw transferErc20.Exception; @@ -322,7 +322,7 @@ public IEnumerator TestTransferErc20() [UnityTest] public IEnumerator TestTransferErc721() { - config.TestResponse = "0xee15948660ad815b376131f5cccae4ce0578fb6bd96d4c4f5c3fa7bae172a5bb"; + config.TestResponse = "0x5c02df6b55bbc5f958d3a5e4b21f0db20cd2284fabe1f7278f7984d3e05de81d"; var transferErc721 = Erc721.TransferErc721(web3, Contracts.Erc721, SendToAddress, Transfer721Id); yield return new WaitUntil(() => transferErc721.IsCompleted); if (transferErc721.Exception != null) throw transferErc721.Exception; @@ -333,7 +333,7 @@ public IEnumerator TestTransferErc721() [UnityTest] public IEnumerator TestTransferErc1155() { - config.TestResponse = "0x95ad5385b189a7f3059412db5e720a7beeef4a20b48a87f4974b8d9ff9bfb56d"; + config.TestResponse = "0x5de8fb6c522d4ba85f09961f03bbdc1ee8d9c283ddd1dea0f3ccdfa27cc189af"; var transferErc1155 = Erc1155.TransferErc1155(web3, Contracts.Erc1155, Transfer1155Id, Transfer1155Amount, SendToAddress); yield return new WaitUntil(() => transferErc1155.IsCompleted); if (transferErc1155.Exception != null) throw transferErc1155.Exception; diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 55a2b993f..ab616dfe8 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -95,6 +95,7 @@ public async void ContractCall() await Web3Accessor.Web3.Signer.GetAddress() }; var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, Contracts.ArrayTotal, args); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); } @@ -109,6 +110,7 @@ public async void ContractSend() increaseAmountSend }; var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, Contracts.ArrayTotal, args); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 3a1467bab..359542494 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -114,6 +114,7 @@ public async void Uri() public async void MintErc1155() { var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, Contracts.Erc1155, idMint, amountMint); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } @@ -124,6 +125,7 @@ public async void MintErc1155() public async void TransferErc1155() { var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTransfer, amountTransfer, toAccountTransfer); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.TransferErc1155)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 6eb11f377..557f16899 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -103,6 +103,7 @@ public async void MintErc20() { string toAccount = await Web3Accessor.Web3.Signer.GetAddress(); var response = await Erc20.MintErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountMint); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.MintErc20)); } @@ -113,6 +114,7 @@ public async void MintErc20() public async void TransferErc20() { var response = await Erc20.TransferErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountTransfer); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.TransferErc20)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 2f6b4e79b..2f1ae9e8e 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -117,6 +117,7 @@ public async void Uri() public async void MintErc721() { var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, Contracts.Erc721, uriMint); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } @@ -127,6 +128,7 @@ public async void MintErc721() public async void TransferErc721() { var response = await Erc721.TransferErc721(Web3Accessor.Web3, contractTransfer, toAccountTransfer, tokenIdTransfer); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.TransferErc721)); } From b027f1c0a5a1000ff5cad14703609cb50db9c613 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 04:48:29 +0000 Subject: [PATCH 32/44] Auto-duplicate Packages Samples --- .../Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 2 ++ .../Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 2 ++ .../Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 ++ .../Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 ++ 4 files changed, 8 insertions(+) diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index 55a2b993f..ab616dfe8 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -95,6 +95,7 @@ public async void ContractCall() await Web3Accessor.Web3.Signer.GetAddress() }; var response = await Evm.ContractCall(Web3Accessor.Web3, methodCall, ABI.ArrayTotal, Contracts.ArrayTotal, args); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractCall)); } @@ -109,6 +110,7 @@ public async void ContractSend() increaseAmountSend }; var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, Contracts.ArrayTotal, args); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 3a1467bab..359542494 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -114,6 +114,7 @@ public async void Uri() public async void MintErc1155() { var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, Contracts.Erc1155, idMint, amountMint); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } @@ -124,6 +125,7 @@ public async void MintErc1155() public async void TransferErc1155() { var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTransfer, amountTransfer, toAccountTransfer); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.TransferErc1155)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 6eb11f377..557f16899 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -103,6 +103,7 @@ public async void MintErc20() { string toAccount = await Web3Accessor.Web3.Signer.GetAddress(); var response = await Erc20.MintErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountMint); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.MintErc20)); } @@ -113,6 +114,7 @@ public async void MintErc20() public async void TransferErc20() { var response = await Erc20.TransferErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountTransfer); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.TransferErc20)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 2f6b4e79b..2f1ae9e8e 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -117,6 +117,7 @@ public async void Uri() public async void MintErc721() { var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, Contracts.Erc721, uriMint); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } @@ -127,6 +128,7 @@ public async void MintErc721() public async void TransferErc721() { var response = await Erc721.TransferErc721(Web3Accessor.Web3, contractTransfer, toAccountTransfer, tokenIdTransfer); + Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.TransferErc721)); } From 816cfd54694bd5a97c5f119a3564f3fc2a5f692d Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 12:51:52 +0800 Subject: [PATCH 33/44] Update Erc1155Tests.cs --- Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs index 342b4ead3..d0cd9806c 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc1155Tests.cs @@ -81,7 +81,7 @@ public IEnumerator TestBalanceOfBatch() { var getBalanceOf = Erc1155.BalanceOfBatch(web3, Contracts.Erc1155, _accounts, _tokenIds); yield return new WaitUntil(() => getBalanceOf.IsCompleted); - CollectionAssert.AreEqual(new List { 2, 0 }, getBalanceOf.Result); + CollectionAssert.AreEqual(new List { 2, 3 }, getBalanceOf.Result); } private const string ExpectedUriResult = From 15b8304ff3c6f216cd5deb2abfe0ae356d9c9844 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 13:45:26 +0800 Subject: [PATCH 34/44] tests fixed tests fixed --- .../Runtime/Scripts/EVM/Token/ABI.cs | 10 +++++----- .../Runtime/Scripts/EVM/Token/Contracts.cs | 8 ++++---- .../Tests/Runtime/Erc721Tests.cs | 4 ++-- .../Tests/Runtime/EvmTests.cs | 12 ++++++------ .../Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 1 - .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 2 -- .../Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 -- .../Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 -- 8 files changed, 17 insertions(+), 24 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs index 3384d4275..8720130d6 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/ABI.cs @@ -2,13 +2,13 @@ namespace Scripts.EVM.Token { public static class ABI { - public const string Erc20 = - "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"_amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; + public const string Erc20 = + "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"allowance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientAllowance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" } ], \"name\": \"ERC20InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"ERC20InvalidSpender\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" } ], \"name\": \"allowance\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"spender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"decimals\", \"outputs\": [ { \"internalType\": \"uint8\", \"name\": \"\", \"type\": \"uint8\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"_amount\", \"type\": \"uint256\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"totalSupply\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transfer\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; public const string Erc721 = - "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721IncorrectOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721InsufficientApproval\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721NonexistentToken\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"approved\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_fromTokenId\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_toTokenId\", \"type\": \"uint256\" } ], \"name\": \"BatchMetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_tokenId\", \"type\": \"uint256\" } ], \"name\": \"MetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"getApproved\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ownerOf\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"string\", \"name\": \"_uri\", \"type\": \"string\" } ], \"name\": \"safeMint\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"tokenURI\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; + "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721IncorrectOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721InsufficientApproval\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidOwner\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC721InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC721NonexistentToken\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"approved\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Approval\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_fromTokenId\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_toTokenId\", \"type\": \"uint256\" } ], \"name\": \"BatchMetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"_tokenId\", \"type\": \"uint256\" } ], \"name\": \"MetadataUpdate\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"Transfer\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"approve\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"getApproved\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"name\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ownerOf\", \"outputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"string\", \"name\": \"_uri\", \"type\": \"string\" } ], \"name\": \"safeMint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"symbol\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"tokenURI\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"transferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; public const string Erc1155 = - "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC1155InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"idsLength\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"valuesLength\", \"type\": \"uint256\" } ], \"name\": \"ERC1155InvalidArrayLength\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC1155MissingApprovalForAll\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"_id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"_amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"_ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"_amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; + "[ { \"inputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"constructor\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"balance\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"needed\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"tokenId\", \"type\": \"uint256\" } ], \"name\": \"ERC1155InsufficientBalance\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"approver\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidApprover\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"idsLength\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"valuesLength\", \"type\": \"uint256\" } ], \"name\": \"ERC1155InvalidArrayLength\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidOperator\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"receiver\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidReceiver\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"sender\", \"type\": \"address\" } ], \"name\": \"ERC1155InvalidSender\", \"type\": \"error\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"owner\", \"type\": \"address\" } ], \"name\": \"ERC1155MissingApprovalForAll\", \"type\": \"error\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"ApprovalForAll\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"indexed\": false, \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" } ], \"name\": \"TransferBatch\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": true, \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"indexed\": true, \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"indexed\": false, \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" } ], \"name\": \"TransferSingle\", \"type\": \"event\" }, { \"anonymous\": false, \"inputs\": [ { \"indexed\": false, \"internalType\": \"string\", \"name\": \"value\", \"type\": \"string\" }, { \"indexed\": true, \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"URI\", \"type\": \"event\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" } ], \"name\": \"balanceOf\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address[]\", \"name\": \"accounts\", \"type\": \"address[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" } ], \"name\": \"balanceOfBatch\", \"outputs\": [ { \"internalType\": \"uint256[]\", \"name\": \"\", \"type\": \"uint256[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"account\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" } ], \"name\": \"isApprovedForAll\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"_id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"_amount\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"mint\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"_to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"_ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"_amounts\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"_data\", \"type\": \"bytes\" } ], \"name\": \"mintBatch\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256[]\", \"name\": \"ids\", \"type\": \"uint256[]\" }, { \"internalType\": \"uint256[]\", \"name\": \"values\", \"type\": \"uint256[]\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeBatchTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"from\", \"type\": \"address\" }, { \"internalType\": \"address\", \"name\": \"to\", \"type\": \"address\" }, { \"internalType\": \"uint256\", \"name\": \"id\", \"type\": \"uint256\" }, { \"internalType\": \"uint256\", \"name\": \"value\", \"type\": \"uint256\" }, { \"internalType\": \"bytes\", \"name\": \"data\", \"type\": \"bytes\" } ], \"name\": \"safeTransferFrom\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"operator\", \"type\": \"address\" }, { \"internalType\": \"bool\", \"name\": \"approved\", \"type\": \"bool\" } ], \"name\": \"setApprovalForAll\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"bytes4\", \"name\": \"interfaceId\", \"type\": \"bytes4\" } ], \"name\": \"supportsInterface\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"name\": \"uri\", \"outputs\": [ { \"internalType\": \"string\", \"name\": \"\", \"type\": \"string\" } ], \"stateMutability\": \"view\", \"type\": \"function\" } ]"; public const string ArrayTotal = - "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"_addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [ { \"internalType\": \"bool\", \"name\": \"\", \"type\": \"bool\" } ], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; + "[ { \"inputs\": [ { \"internalType\": \"uint256\", \"name\": \"_myArg\", \"type\": \"uint256\" } ], \"name\": \"addTotal\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" }, { \"inputs\": [], \"name\": \"getStore\", \"outputs\": [ { \"internalType\": \"string[]\", \"name\": \"\", \"type\": \"string[]\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"address\", \"name\": \"\", \"type\": \"address\" } ], \"name\": \"myTotal\", \"outputs\": [ { \"internalType\": \"uint256\", \"name\": \"\", \"type\": \"uint256\" } ], \"stateMutability\": \"view\", \"type\": \"function\" }, { \"inputs\": [ { \"internalType\": \"string[]\", \"name\": \"_addresses\", \"type\": \"string[]\" } ], \"name\": \"setStore\", \"outputs\": [], \"stateMutability\": \"nonpayable\", \"type\": \"function\" } ]"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs index 67b0008e8..5762141cb 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Contracts.cs @@ -2,9 +2,9 @@ { public class Contracts { - public const string Erc20 = "0x095C8d0C13bc12Fa389dCf00FD484E9cB53F58b5"; - public const string Erc721 = "0x1B21fa9a1E46D688A2d3ae5DE6A34Ab346D94890"; - public const string Erc1155 = "0x709F74bdA95B61de64758dF58c0791a751d74328"; - public const string ArrayTotal = "0xef99A5cD19db80be2e2FAd89938bf2d09C7c728b"; + public const string Erc20 = "0x358969310231363CBEcFEFe47323139569D8a88b"; + public const string Erc721 = "0x4f75BB7bdd6f7A0fD32f1b3A94dfF409F5a3F1CC"; + public const string Erc1155 = "0xAA2EbE78aa788d13AfFaaefD38C93333bbC4d51e"; + public const string ArrayTotal = "0x9839293240C535d8009920390b4D3DA256d31177"; } } \ No newline at end of file diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs index a2372772a..e4de525df 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/Erc721Tests.cs @@ -25,8 +25,8 @@ public class Erc721Tests private const string ownerOfTokenId = "2"; private const string ownerOfExpected = "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2"; - private static string[] ownerOfBatchTokenIds = { "4", "6" }; - private static string[] ownerOfBatchExpected = { "0xdD4c825203f97984e7867F11eeCc813A036089D1", "0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44" }; + private static string[] ownerOfBatchTokenIds = { "4", "5" }; + private static string[] ownerOfBatchExpected = { "0xd25b827D92b0fd656A1c829933e9b0b836d5C3e2", "0xD5c8010ef6dff4c83B19C511221A7F8d1e5cFF44" }; #endregion diff --git a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs index f421aeae8..55b954dc8 100644 --- a/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs +++ b/Packages/io.chainsafe.web3-unity/Tests/Runtime/EvmTests.cs @@ -14,7 +14,7 @@ public class EvmTests : SampleTestsBase #region ContractCalls private const string ContractSendMethod = "addTotal"; - private const int IncreaseAmount = 1; + private const int IncreaseAmount = 2; private const string ContractCallMethod = "myTotal"; private const string CallAmount = "1"; @@ -56,7 +56,7 @@ public class EvmTests : SampleTestsBase private BigInteger TransferErc20Amount = 1; - private const int Transfer721Id = 8; + private const int Transfer721Id = 5; private const int Transfer1155Id = 1; private const int Transfer1155Amount = 1; @@ -98,7 +98,7 @@ public IEnumerator TestContractCall() [UnityTest] public IEnumerator TestContractSend() { - config.TestResponse = "0x21ce11a3d68add16601b310a9662d1dd354f3fb91469ea42070f00863db2657c"; + config.TestResponse = "0x324080652dfe1463f0fcbde18961a6e7eee87f2231133523e96dc52ce8239d3f"; object[] args = { IncreaseAmount @@ -197,7 +197,7 @@ public IEnumerator TestUseRegisteredContract() yield return new WaitUntil(() => useRegisteredContract.IsCompleted); if (useRegisteredContract.Exception != null) throw useRegisteredContract.Exception; Assert.IsTrue(useRegisteredContract.IsCompletedSuccessfully); - Assert.AreEqual(new BigInteger(1000000000000000000), useRegisteredContract.Result); + Assert.AreEqual(new BigInteger(999999999999999), useRegisteredContract.Result); } [UnityTest] @@ -272,7 +272,7 @@ public IEnumerator TestCustomBalanceOfErc20() { var getCustomBalanceOf = Erc20.CustomTokenBalance(web3, ABI.Erc20, Contracts.Erc20); yield return new WaitUntil(() => getCustomBalanceOf.IsCompleted); - Assert.AreEqual(new BigInteger(1000000000000000000), getCustomBalanceOf.Result); + Assert.AreEqual(new BigInteger(999999999999999), getCustomBalanceOf.Result); } [UnityTest] @@ -311,7 +311,7 @@ public IEnumerator TestMintErc1155() [UnityTest] public IEnumerator TestTransferErc20() { - config.TestResponse = "0x6d75e92ec3e214a392955f3bdc1db3c606059e4f0d7b323a70d9741dd374a9c0"; + config.TestResponse = "0x87d8826e895247b4106596040c5133a18ecbf76077c5433091a5f18c355a120b"; var transferErc20 = Erc20.TransferErc20(web3, Contracts.Erc20, SendToAddress, TransferErc20Amount); yield return new WaitUntil(() => transferErc20.IsCompleted); if (transferErc20.Exception != null) throw transferErc20.Exception; diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index ab616dfe8..6e4c8c6a3 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -110,7 +110,6 @@ public async void ContractSend() increaseAmountSend }; var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, Contracts.ArrayTotal, args); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 359542494..3a1467bab 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -114,7 +114,6 @@ public async void Uri() public async void MintErc1155() { var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, Contracts.Erc1155, idMint, amountMint); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } @@ -125,7 +124,6 @@ public async void MintErc1155() public async void TransferErc1155() { var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTransfer, amountTransfer, toAccountTransfer); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.TransferErc1155)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 557f16899..6eb11f377 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -103,7 +103,6 @@ public async void MintErc20() { string toAccount = await Web3Accessor.Web3.Signer.GetAddress(); var response = await Erc20.MintErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountMint); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.MintErc20)); } @@ -114,7 +113,6 @@ public async void MintErc20() public async void TransferErc20() { var response = await Erc20.TransferErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountTransfer); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.TransferErc20)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 2f1ae9e8e..2f6b4e79b 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -117,7 +117,6 @@ public async void Uri() public async void MintErc721() { var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, Contracts.Erc721, uriMint); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } @@ -128,7 +127,6 @@ public async void MintErc721() public async void TransferErc721() { var response = await Erc721.TransferErc721(Web3Accessor.Web3, contractTransfer, toAccountTransfer, tokenIdTransfer); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.TransferErc721)); } From 4e275a59a55b61d82e0c643bfb68edda8626a748 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 05:46:23 +0000 Subject: [PATCH 35/44] Auto-duplicate Packages Samples --- .../Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs | 1 - .../Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 2 -- .../Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs | 2 -- .../Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs | 2 -- 4 files changed, 7 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs index ab616dfe8..6e4c8c6a3 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/EVM/EvmCalls.cs @@ -110,7 +110,6 @@ public async void ContractSend() increaseAmountSend }; var response = await Evm.ContractSend(Web3Accessor.Web3, methodSend, ABI.ArrayTotal, Contracts.ArrayTotal, args); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Evm), nameof(Evm.ContractSend)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 359542494..3a1467bab 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -114,7 +114,6 @@ public async void Uri() public async void MintErc1155() { var response = await Erc1155.MintErc1155(Web3Accessor.Web3, ABI.Erc1155, Contracts.Erc1155, idMint, amountMint); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.MintErc1155)); } @@ -125,7 +124,6 @@ public async void MintErc1155() public async void TransferErc1155() { var response = await Erc1155.TransferErc1155(Web3Accessor.Web3, Contracts.Erc1155, tokenIdTransfer, amountTransfer, toAccountTransfer); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.TransferErc1155)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs index 557f16899..6eb11f377 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc20/Erc20Calls.cs @@ -103,7 +103,6 @@ public async void MintErc20() { string toAccount = await Web3Accessor.Web3.Signer.GetAddress(); var response = await Erc20.MintErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountMint); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.MintErc20)); } @@ -114,7 +113,6 @@ public async void MintErc20() public async void TransferErc20() { var response = await Erc20.TransferErc20(Web3Accessor.Web3, Contracts.Erc20, toAccount, amountTransfer); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc20), nameof(Erc20.TransferErc20)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 2f1ae9e8e..2f6b4e79b 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -117,7 +117,6 @@ public async void Uri() public async void MintErc721() { var response = await Erc721.MintErc721(Web3Accessor.Web3, ABI.Erc721, Contracts.Erc721, uriMint); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.MintErc721)); } @@ -128,7 +127,6 @@ public async void MintErc721() public async void TransferErc721() { var response = await Erc721.TransferErc721(Web3Accessor.Web3, contractTransfer, toAccountTransfer, tokenIdTransfer); - Debug.Log(response); var output = SampleOutputUtil.BuildOutputValue(response); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.TransferErc721)); } From 6f6e8ec0824d0d785fe48b61fc6b071ea58e2dbb Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 14:36:41 +0800 Subject: [PATCH 36/44] Update SampleMain.unity --- .../Scenes/SampleMain.unity | 194 ------------------ 1 file changed, 194 deletions(-) diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity index 07a55941c..88c2ae9e0 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleMain.unity @@ -5820,200 +5820,6 @@ MonoBehaviour: m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 ---- !u!1001 &1067896884 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1432457965} - m_Modifications: - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_RootOrder - value: 18 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalScale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalScale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalScale.z - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 108046416} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target - value: - objectReference: {fileID: 7978786053810957042} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_CallState - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: MultiCallBalanceOfBatch - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName - value: Execute - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName - value: EvmCalls, Samples - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName - value: Samples.Behaviours.SampleBehaviour, Samples - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName - value: UnityEngine.Object, UnityEngine - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName - value: UnityEngine.Object, UnityEngine - objectReference: {fileID: 0} - - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_Name - value: Button - MultiCallBalanceOf - objectReference: {fileID: 0} - - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_text - value: MultiCall - objectReference: {fileID: 0} - - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_fontSize - value: 17.9 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} ---- !u!1 &1067896885 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - m_PrefabInstance: {fileID: 1067896884} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1067896886 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1067896885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreLayout: 0 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: -1 - m_PreferredHeight: 50 - m_FlexibleWidth: -1 - m_FlexibleHeight: -1 - m_LayoutPriority: 1 --- !u!1001 &1101863644 PrefabInstance: m_ObjectHideFlags: 0 From 82b53e47c22f3061fc40ab5215a2ad17ee5389af Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 06:37:01 +0000 Subject: [PATCH 37/44] Auto-duplicate Packages Samples --- .../Web3.Unity/Scenes/SampleMain.unity | 194 ------------------ 1 file changed, 194 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity index 07a55941c..88c2ae9e0 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleMain.unity @@ -5820,200 +5820,6 @@ MonoBehaviour: m_FlexibleWidth: -1 m_FlexibleHeight: -1 m_LayoutPriority: 1 ---- !u!1001 &1067896884 -PrefabInstance: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_Modification: - m_TransformParent: {fileID: 1432457965} - m_Modifications: - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_Pivot.x - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_Pivot.y - value: 0.5 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_RootOrder - value: 18 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMax.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMax.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMin.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchorMin.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_SizeDelta.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_SizeDelta.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalScale.x - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalScale.y - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalScale.z - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalPosition.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.w - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalRotation.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchoredPosition.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_AnchoredPosition.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalEulerAnglesHint.x - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalEulerAnglesHint.y - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_LocalEulerAnglesHint.z - value: 0 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.size - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Mode - value: 1 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target - value: - objectReference: {fileID: 108046416} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Target - value: - objectReference: {fileID: 7978786053810957042} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_CallState - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_CallState - value: 2 - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_MethodName - value: MultiCallBalanceOfBatch - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_MethodName - value: Execute - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_TargetAssemblyTypeName - value: EvmCalls, Samples - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_TargetAssemblyTypeName - value: Samples.Behaviours.SampleBehaviour, Samples - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Arguments.m_ObjectArgumentAssemblyTypeName - value: UnityEngine.Object, UnityEngine - objectReference: {fileID: 0} - - target: {fileID: 7324590823460843055, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[1].m_Arguments.m_ObjectArgumentAssemblyTypeName - value: UnityEngine.Object, UnityEngine - objectReference: {fileID: 0} - - target: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_Name - value: Button - MultiCallBalanceOf - objectReference: {fileID: 0} - - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_text - value: MultiCall - objectReference: {fileID: 0} - - target: {fileID: 8781309615174179339, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - propertyPath: m_fontSize - value: 17.9 - objectReference: {fileID: 0} - m_RemovedComponents: [] - m_SourcePrefab: {fileID: 100100000, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} ---- !u!1 &1067896885 stripped -GameObject: - m_CorrespondingSourceObject: {fileID: 8775736491206355084, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} - m_PrefabInstance: {fileID: 1067896884} - m_PrefabAsset: {fileID: 0} ---- !u!114 &1067896886 -MonoBehaviour: - m_ObjectHideFlags: 0 - m_CorrespondingSourceObject: {fileID: 0} - m_PrefabInstance: {fileID: 0} - m_PrefabAsset: {fileID: 0} - m_GameObject: {fileID: 1067896885} - m_Enabled: 1 - m_EditorHideFlags: 0 - m_Script: {fileID: 11500000, guid: 306cc8c2b49d7114eaa3623786fc2126, type: 3} - m_Name: - m_EditorClassIdentifier: - m_IgnoreLayout: 0 - m_MinWidth: -1 - m_MinHeight: -1 - m_PreferredWidth: -1 - m_PreferredHeight: 50 - m_FlexibleWidth: -1 - m_FlexibleHeight: -1 - m_LayoutPriority: 1 --- !u!1001 &1101863644 PrefabInstance: m_ObjectHideFlags: 0 From a3c9b369eb44537b4da7d64098cafefdf8cb7942 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 19:07:25 +0800 Subject: [PATCH 38/44] Remove tests Remove tests --- ...15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity | 125 ------------------ ...b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta | 7 - ...8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity | 125 ------------------ ...de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta | 7 - ...ac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity | 125 ------------------ ...96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta | 7 - 6 files changed, 396 deletions(-) delete mode 100644 src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity delete mode 100644 src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta delete mode 100644 src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity delete mode 100644 src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta delete mode 100644 src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity delete mode 100644 src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta diff --git a/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity b/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity deleted file mode 100644 index 0547b8542..000000000 --- a/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity +++ /dev/null @@ -1,125 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} diff --git a/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta b/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta deleted file mode 100644 index 54bfd5af8..000000000 --- a/src/UnitySampleProject/Assets/InitTestScene15bc8b70-c00d-4f64-9cdd-a903c6d0d081.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: a364d2c30a99ddc4b8a69988117ea27d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity b/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity deleted file mode 100644 index 0547b8542..000000000 --- a/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity +++ /dev/null @@ -1,125 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} diff --git a/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta b/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta deleted file mode 100644 index 394e59633..000000000 --- a/src/UnitySampleProject/Assets/InitTestScene8e075de3-f1f4-4e84-b7ab-7cf0fd65c01c.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 36312d79c884c8f47b1e32bd9820da6e -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: diff --git a/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity b/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity deleted file mode 100644 index 0547b8542..000000000 --- a/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity +++ /dev/null @@ -1,125 +0,0 @@ -%YAML 1.1 -%TAG !u! tag:unity3d.com,2011: ---- !u!29 &1 -OcclusionCullingSettings: - m_ObjectHideFlags: 0 - serializedVersion: 2 - m_OcclusionBakeSettings: - smallestOccluder: 5 - smallestHole: 0.25 - backfaceThreshold: 100 - m_SceneGUID: 00000000000000000000000000000000 - m_OcclusionCullingData: {fileID: 0} ---- !u!104 &2 -RenderSettings: - m_ObjectHideFlags: 0 - serializedVersion: 9 - m_Fog: 0 - m_FogColor: {r: 0.5, g: 0.5, b: 0.5, a: 1} - m_FogMode: 3 - m_FogDensity: 0.01 - m_LinearFogStart: 0 - m_LinearFogEnd: 300 - m_AmbientSkyColor: {r: 0.212, g: 0.227, b: 0.259, a: 1} - m_AmbientEquatorColor: {r: 0.114, g: 0.125, b: 0.133, a: 1} - m_AmbientGroundColor: {r: 0.047, g: 0.043, b: 0.035, a: 1} - m_AmbientIntensity: 1 - m_AmbientMode: 3 - m_SubtractiveShadowColor: {r: 0.42, g: 0.478, b: 0.627, a: 1} - m_SkyboxMaterial: {fileID: 0} - m_HaloStrength: 0.5 - m_FlareStrength: 1 - m_FlareFadeSpeed: 3 - m_HaloTexture: {fileID: 0} - m_SpotCookie: {fileID: 10001, guid: 0000000000000000e000000000000000, type: 0} - m_DefaultReflectionMode: 0 - m_DefaultReflectionResolution: 128 - m_ReflectionBounces: 1 - m_ReflectionIntensity: 1 - m_CustomReflection: {fileID: 0} - m_Sun: {fileID: 0} - m_IndirectSpecularColor: {r: 0, g: 0, b: 0, a: 1} - m_UseRadianceAmbientProbe: 0 ---- !u!157 &3 -LightmapSettings: - m_ObjectHideFlags: 0 - serializedVersion: 12 - m_GIWorkflowMode: 1 - m_GISettings: - serializedVersion: 2 - m_BounceScale: 1 - m_IndirectOutputScale: 1 - m_AlbedoBoost: 1 - m_EnvironmentLightingMode: 0 - m_EnableBakedLightmaps: 0 - m_EnableRealtimeLightmaps: 0 - m_LightmapEditorSettings: - serializedVersion: 12 - m_Resolution: 2 - m_BakeResolution: 40 - m_AtlasSize: 1024 - m_AO: 0 - m_AOMaxDistance: 1 - m_CompAOExponent: 1 - m_CompAOExponentDirect: 0 - m_ExtractAmbientOcclusion: 0 - m_Padding: 2 - m_LightmapParameters: {fileID: 0} - m_LightmapsBakeMode: 1 - m_TextureCompression: 1 - m_FinalGather: 0 - m_FinalGatherFiltering: 1 - m_FinalGatherRayCount: 256 - m_ReflectionCompression: 2 - m_MixedBakeMode: 2 - m_BakeBackend: 1 - m_PVRSampling: 1 - m_PVRDirectSampleCount: 32 - m_PVRSampleCount: 512 - m_PVRBounces: 2 - m_PVREnvironmentSampleCount: 256 - m_PVREnvironmentReferencePointCount: 2048 - m_PVRFilteringMode: 1 - m_PVRDenoiserTypeDirect: 1 - m_PVRDenoiserTypeIndirect: 1 - m_PVRDenoiserTypeAO: 1 - m_PVRFilterTypeDirect: 0 - m_PVRFilterTypeIndirect: 0 - m_PVRFilterTypeAO: 0 - m_PVREnvironmentMIS: 1 - m_PVRCulling: 1 - m_PVRFilteringGaussRadiusDirect: 1 - m_PVRFilteringGaussRadiusIndirect: 5 - m_PVRFilteringGaussRadiusAO: 2 - m_PVRFilteringAtrousPositionSigmaDirect: 0.5 - m_PVRFilteringAtrousPositionSigmaIndirect: 2 - m_PVRFilteringAtrousPositionSigmaAO: 1 - m_ExportTrainingData: 0 - m_TrainingDataDestination: TrainingData - m_LightProbeSampleCountMultiplier: 4 - m_LightingDataAsset: {fileID: 0} - m_LightingSettings: {fileID: 0} ---- !u!196 &4 -NavMeshSettings: - serializedVersion: 2 - m_ObjectHideFlags: 0 - m_BuildSettings: - serializedVersion: 2 - agentTypeID: 0 - agentRadius: 0.5 - agentHeight: 2 - agentSlope: 45 - agentClimb: 0.4 - ledgeDropHeight: 0 - maxJumpAcrossDistance: 0 - minRegionArea: 2 - manualCellSize: 0 - cellSize: 0.16666667 - manualTileSize: 0 - tileSize: 256 - accuratePlacement: 0 - maxJobWorkers: 0 - preserveTilesOutsideBounds: 0 - debug: - m_Flags: 0 - m_NavMeshData: {fileID: 0} diff --git a/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta b/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta deleted file mode 100644 index 9f80a3223..000000000 --- a/src/UnitySampleProject/Assets/InitTestSceneac55a96d-65b4-42ac-b0c3-b5caccdb2120.unity.meta +++ /dev/null @@ -1,7 +0,0 @@ -fileFormatVersion: 2 -guid: 3d5877ddfaf69354c97f913ff0027a5d -DefaultImporter: - externalObjects: {} - userData: - assetBundleName: - assetBundleVariant: From a0e1cc364d35b214432636336f70359074204109 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 19:25:22 +0800 Subject: [PATCH 39/44] Gelato fix Gelato fix --- .../Scenes/SampleLogin - Web3Auth.unity | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.5.1/Web3.Unity Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.5.1/Web3.Unity Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity index b7397b352..359b59511 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.5.1/Web3.Unity Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK Web3Auth/2.5.1/Web3.Unity Web3Auth Samples/Scenes/SampleLogin - Web3Auth.unity @@ -995,7 +995,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7b6902e441950fa4bb5cefdd2263164a, type: 3} m_Name: m_EditorClassIdentifier: - gelatoApiKey: _UzPz_Yk_WTjWMfcl45fLvQNGQ9ISx5ZE8TnwnVKYrE_ + gelatoApiKey: 7MFQqyGS1Iui_e_MgmFW1BfbFeJ06g8nnL2oUTlIJug_ errorPopup: {fileID: 337558421} clientId: BCc0wTmuXureEzgawhUSZOWu4bgWo56sZPrxLiHQCpg5OHcNrfa44esdTS8Dm77VtmaIyjhbthdWfbLhSwf7jtU redirectUri: torusapp://io.chainsafe.gamingsdk.sdkdemoscene/auth @@ -1488,7 +1488,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -1496,15 +1496,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -1536,11 +1536,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -190 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -1593,7 +1593,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -1601,15 +1601,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -1641,11 +1641,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -80 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -1851,10 +1851,10 @@ RectTransform: m_Father: {fileID: 221640018348301908} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 150, y: -337.825} + m_SizeDelta: {x: 300, y: 15.65} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &221640018720180777 GameObject: @@ -1996,7 +1996,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2004,15 +2004,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2044,11 +2044,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -135 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -2121,7 +2121,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2129,15 +2129,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2169,11 +2169,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -25 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -2274,7 +2274,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2282,15 +2282,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2322,11 +2322,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -2399,7 +2399,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2407,15 +2407,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2447,11 +2447,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -245 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x From f4cbd2ba2172ed5d46d654eb738f396029bbce3f Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 11:25:44 +0000 Subject: [PATCH 40/44] Auto-duplicate Packages Samples --- .../Scenes/SampleLogin - Web3Auth.unity | 82 +++++++++---------- 1 file changed, 41 insertions(+), 41 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity.web3auth/Samples~/Web3.Unity Web3Auth/Scenes/SampleLogin - Web3Auth.unity b/Packages/io.chainsafe.web3-unity.web3auth/Samples~/Web3.Unity Web3Auth/Scenes/SampleLogin - Web3Auth.unity index b7397b352..359b59511 100644 --- a/Packages/io.chainsafe.web3-unity.web3auth/Samples~/Web3.Unity Web3Auth/Scenes/SampleLogin - Web3Auth.unity +++ b/Packages/io.chainsafe.web3-unity.web3auth/Samples~/Web3.Unity Web3Auth/Scenes/SampleLogin - Web3Auth.unity @@ -995,7 +995,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 7b6902e441950fa4bb5cefdd2263164a, type: 3} m_Name: m_EditorClassIdentifier: - gelatoApiKey: _UzPz_Yk_WTjWMfcl45fLvQNGQ9ISx5ZE8TnwnVKYrE_ + gelatoApiKey: 7MFQqyGS1Iui_e_MgmFW1BfbFeJ06g8nnL2oUTlIJug_ errorPopup: {fileID: 337558421} clientId: BCc0wTmuXureEzgawhUSZOWu4bgWo56sZPrxLiHQCpg5OHcNrfa44esdTS8Dm77VtmaIyjhbthdWfbLhSwf7jtU redirectUri: torusapp://io.chainsafe.gamingsdk.sdkdemoscene/auth @@ -1488,7 +1488,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -1496,15 +1496,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -1536,11 +1536,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -190 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -1593,7 +1593,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -1601,15 +1601,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -1641,11 +1641,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -80 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -1851,10 +1851,10 @@ RectTransform: m_Father: {fileID: 221640018348301908} m_RootOrder: 6 m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} - m_AnchorMin: {x: 0, y: 0} - m_AnchorMax: {x: 0, y: 0} - m_AnchoredPosition: {x: 0, y: 0} - m_SizeDelta: {x: 0, y: 0} + m_AnchorMin: {x: 0, y: 1} + m_AnchorMax: {x: 0, y: 1} + m_AnchoredPosition: {x: 150, y: -337.825} + m_SizeDelta: {x: 300, y: 15.65} m_Pivot: {x: 0.5, y: 0.5} --- !u!1 &221640018720180777 GameObject: @@ -1996,7 +1996,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2004,15 +2004,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2044,11 +2044,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -135 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -2121,7 +2121,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2129,15 +2129,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2169,11 +2169,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -25 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -2274,7 +2274,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2282,15 +2282,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2322,11 +2322,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x @@ -2399,7 +2399,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMax.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.x @@ -2407,15 +2407,15 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchorMin.y - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.x - value: 0 + value: 300 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_SizeDelta.y - value: 0 + value: 50 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalPosition.x @@ -2447,11 +2447,11 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.x - value: 0 + value: 150 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_AnchoredPosition.y - value: 0 + value: -245 objectReference: {fileID: 0} - target: {fileID: 4764608378852082086, guid: 50ad8ea555027414b8ddfc03fc7d41ab, type: 3} propertyPath: m_LocalEulerAnglesHint.x From 1cce5a0729438a6b42ac8776abf8495833660dfe Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 21:25:52 +0800 Subject: [PATCH 41/44] Update SampleLogin.unity --- .../2.5.0/Web3.Unity Samples/Scenes/SampleLogin.unity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleLogin.unity b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleLogin.unity index 0f766adb4..086e5eb4e 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleLogin.unity +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scenes/SampleLogin.unity @@ -2675,7 +2675,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 96894e49d9863ec4db1d93a5e56f19cb, type: 3} m_Name: m_EditorClassIdentifier: - gelatoApiKey: _UzPz_Yk_WTjWMfcl45fLvQNGQ9ISx5ZE8TnwnVKYrE_ + gelatoApiKey: 7MFQqyGS1Iui_e_MgmFW1BfbFeJ06g8nnL2oUTlIJug_ errorPopup: {fileID: 1701305868} supportedWalletsDropdown: {fileID: 540464236} redirectToWalletToggle: {fileID: 981405684} From c73db66520ed70b324988a50f6eafd48ef0404bc Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 13:26:12 +0000 Subject: [PATCH 42/44] Auto-duplicate Packages Samples --- .../Samples~/Web3.Unity/Scenes/SampleLogin.unity | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleLogin.unity b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleLogin.unity index 0f766adb4..086e5eb4e 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleLogin.unity +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scenes/SampleLogin.unity @@ -2675,7 +2675,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: 96894e49d9863ec4db1d93a5e56f19cb, type: 3} m_Name: m_EditorClassIdentifier: - gelatoApiKey: _UzPz_Yk_WTjWMfcl45fLvQNGQ9ISx5ZE8TnwnVKYrE_ + gelatoApiKey: 7MFQqyGS1Iui_e_MgmFW1BfbFeJ06g8nnL2oUTlIJug_ errorPopup: {fileID: 1701305868} supportedWalletsDropdown: {fileID: 540464236} redirectToWalletToggle: {fileID: 981405684} From 32634bd411d35e5214d2ba25facb870ee7d28747 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 22:22:01 +0800 Subject: [PATCH 43/44] allerc prep allerc prep --- .../Runtime/Scripts/EVM/Remote/CSServer.cs | 29 ++++--------------- .../Runtime/Scripts/EVM/Token/Erc1155.cs | 9 ++---- .../Runtime/Scripts/EVM/Token/Erc721.cs | 9 ++---- .../Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 9 ++---- .../Scenes/SampleMain/Erc721/Erc721Calls.cs | 9 ++---- 5 files changed, 13 insertions(+), 52 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs index be986ba9c..93394f4d0 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Remote/CSServer.cs @@ -15,6 +15,7 @@ public class CSServer { public class Response { public T response; } private static readonly string host = "https://api.gaming.chainsafe.io/evm"; + private static readonly string nftHost = " https://api.gaming.chainsafe.io/v1/nft/networks/"; /// /// Creates a mint transaction for an NFT (Non-Fungible Token) on a specified blockchain network. @@ -274,25 +275,15 @@ public static async Task GetNft(Web3 web3, string _account, string _chai /// Retrieves all ERC721 tokens owned by a given account on a specific blockchain and network. /// /// The Web3 instance used for the request. - /// The blockchain chain identifier (e.g., Ethereum). - /// The network identifier (e.g., Mainnet, Ropsten). /// The account address for which to retrieve ERC721 tokens. - /// [Optional] The address of the ERC721 contract (if filtering by contract is required). - /// [Optional] The maximum number of tokens to retrieve (default: 500). - /// [Optional] The number of tokens to skip in the query (default: 0). /// An array of response objects containing details of the ERC721 tokens. - public static async Task AllErc721(Web3 web3, string chain, string network, string account, string contract = "", int take = 500, int skip = 0) + public static async Task AllErc721(Web3 web3, string account) { WWWForm form = new WWWForm(); form.AddField("projectId", web3.ProjectConfig.ProjectId); - form.AddField("chain", chain); - form.AddField("network", network); form.AddField("account", account); - form.AddField("contract", contract); - form.AddField("first", take); - form.AddField("skip", skip); - string url = host + "/all721"; + string url = $"{nftHost}{web3.ChainConfig.ChainId}/{account}/tokens"; string rawNfts; using (UnityWebRequest webRequest = UnityWebRequest.Post(url, form)) { @@ -315,24 +306,14 @@ public static async Task AllErc721(Web3 web3, string chain, str /// Retrieves all ERC1155 tokens owned by a given account on a specific blockchain and network. /// /// The Web3 instance used for the request. - /// The blockchain chain identifier (e.g., Ethereum). - /// The network identifier (e.g., Mainnet, Ropsten). /// The account address for which to retrieve ERC1155 tokens. - /// [Optional] The address of the ERC1155 contract (if filtering by contract is required). - /// [Optional] The maximum number of tokens to retrieve (default: 500). - /// [Optional] The number of tokens to skip in the query (default: 0). /// An array of response objects containing details of the ERC1155 tokens. - public static async Task AllErc1155(Web3 web3, string chain, string network, string account, string contract = "", int take = 500, int skip = 0) + public static async Task AllErc1155(Web3 web3, string account) { WWWForm form = new WWWForm(); form.AddField("projectId", web3.ProjectConfig.ProjectId); - form.AddField("chain", chain); - form.AddField("network", network); form.AddField("account", account); - form.AddField("contract", contract); - form.AddField("first", take); - form.AddField("skip", skip); - string url = host + "/all1155"; + string url = $"{nftHost}{web3.ChainConfig.ChainId}/{account}/tokens"; string rawNfts; using (UnityWebRequest webRequest = UnityWebRequest.Post(url, form)) { diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs index 19b295d84..a291aceec 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc1155.cs @@ -15,16 +15,11 @@ public static class Erc1155 /// Fetches all 1155 Nfts from an account /// /// - /// - /// /// - /// - /// - /// /// - public static async Task AllErc1155(Web3 web3, string chain, string network, string account, string contract, int take, int skip) + public static async Task AllErc1155(Web3 web3, string account) { - return await CSServer.AllErc1155(web3, chain, network, account, contract, take, skip); + return await CSServer.AllErc1155(web3, account); } /// diff --git a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs index 099c78409..409627d4c 100644 --- a/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs +++ b/Packages/io.chainsafe.web3-unity/Runtime/Scripts/EVM/Token/Erc721.cs @@ -15,16 +15,11 @@ public static class Erc721 /// Fetches all 721 Nfts from an account /// /// - /// - /// /// - /// - /// - /// /// - public static async Task AllErc721(Web3 web3, string chain, string network, string account, string contract, int take, int skip) + public static async Task AllErc721(Web3 web3, string account) { - return await CSServer.AllErc721(web3, chain, network, account, contract, take, skip); + return await CSServer.AllErc721(web3, account); } /// diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 3a1467bab..a45bb180b 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -13,13 +13,8 @@ public class Erc1155Calls : MonoBehaviour #region Fields #region All Erc - - private string chainAllErc = "ethereum"; - private string networkAllErc = "goerli"; + private string accountAllErc = "0xfaecAE4464591F8f2025ba8ACF58087953E613b1"; - private string contractAllErc = ""; - private int takeAllErc = 1000; - private int skipAllErc = 0; #endregion @@ -73,7 +68,7 @@ public class Erc1155Calls : MonoBehaviour /// public async void AllErc1155() { - var allNfts = await Erc1155.AllErc1155(Web3Accessor.Web3, chainAllErc, networkAllErc, accountAllErc, contractAllErc, takeAllErc, skipAllErc); + var allNfts = await Erc1155.AllErc1155(Web3Accessor.Web3, accountAllErc); var output = string.Join(",\n", allNfts.Select(nft => $"{nft.TokenId} - {nft.Uri}")); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.AllErc1155)); } diff --git a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 2f6b4e79b..48046abb4 100644 --- a/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/src/UnitySampleProject/Assets/Samples/web3.unity SDK/2.5.0/Web3.Unity Samples/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -12,13 +12,8 @@ public class Erc721Calls : MonoBehaviour #region Fields #region All Erc - - private string chainAllErc = "ethereum"; - private string networkAllErc = "goerli"; // mainnet goerli + private string accountAllErc = "0xfaecAE4464591F8f2025ba8ACF58087953E613b1"; - private string contractAllErc = "0x2c1867BC3026178A47a677513746DCc6822A137A"; - private int takeAllErc = 500; - private int skipAllErc = 0; #endregion @@ -67,7 +62,7 @@ public class Erc721Calls : MonoBehaviour /// public async void AllErc721() { - var allNfts = await Erc721.AllErc721(Web3Accessor.Web3, chainAllErc, networkAllErc, accountAllErc, contractAllErc, takeAllErc, skipAllErc); + var allNfts = await Erc721.AllErc721(Web3Accessor.Web3, accountAllErc); var output = string.Join(",\n", allNfts.Select(nft => $"{nft.TokenId} - {nft.Uri}")); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.AllErc721)); } From bb45821658d0262b258198d9ade0ca85ed6b9513 Mon Sep 17 00:00:00 2001 From: sneakzttv Date: Mon, 13 Nov 2023 14:22:26 +0000 Subject: [PATCH 44/44] Auto-duplicate Packages Samples --- .../Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs | 9 ++------- .../Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs | 9 ++------- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs index 3a1467bab..a45bb180b 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc1155/Erc1155Calls.cs @@ -13,13 +13,8 @@ public class Erc1155Calls : MonoBehaviour #region Fields #region All Erc - - private string chainAllErc = "ethereum"; - private string networkAllErc = "goerli"; + private string accountAllErc = "0xfaecAE4464591F8f2025ba8ACF58087953E613b1"; - private string contractAllErc = ""; - private int takeAllErc = 1000; - private int skipAllErc = 0; #endregion @@ -73,7 +68,7 @@ public class Erc1155Calls : MonoBehaviour /// public async void AllErc1155() { - var allNfts = await Erc1155.AllErc1155(Web3Accessor.Web3, chainAllErc, networkAllErc, accountAllErc, contractAllErc, takeAllErc, skipAllErc); + var allNfts = await Erc1155.AllErc1155(Web3Accessor.Web3, accountAllErc); var output = string.Join(",\n", allNfts.Select(nft => $"{nft.TokenId} - {nft.Uri}")); SampleOutputUtil.PrintResult(output, nameof(Erc1155), nameof(Erc1155.AllErc1155)); } diff --git a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs index 2f6b4e79b..48046abb4 100644 --- a/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs +++ b/Packages/io.chainsafe.web3-unity/Samples~/Web3.Unity/Scripts/Scenes/SampleMain/Erc721/Erc721Calls.cs @@ -12,13 +12,8 @@ public class Erc721Calls : MonoBehaviour #region Fields #region All Erc - - private string chainAllErc = "ethereum"; - private string networkAllErc = "goerli"; // mainnet goerli + private string accountAllErc = "0xfaecAE4464591F8f2025ba8ACF58087953E613b1"; - private string contractAllErc = "0x2c1867BC3026178A47a677513746DCc6822A137A"; - private int takeAllErc = 500; - private int skipAllErc = 0; #endregion @@ -67,7 +62,7 @@ public class Erc721Calls : MonoBehaviour /// public async void AllErc721() { - var allNfts = await Erc721.AllErc721(Web3Accessor.Web3, chainAllErc, networkAllErc, accountAllErc, contractAllErc, takeAllErc, skipAllErc); + var allNfts = await Erc721.AllErc721(Web3Accessor.Web3, accountAllErc); var output = string.Join(",\n", allNfts.Select(nft => $"{nft.TokenId} - {nft.Uri}")); SampleOutputUtil.PrintResult(output, nameof(Erc721), nameof(Erc721.AllErc721)); }