Ok guys what is it that I am messing up on here. I have a contract that takes arrays for the constructor. I have 4 arrays, strings, addresses, unit256 and bool. I tried filling it out two different ways with no success. Mind you I am launching from Remix. It should not make a difference but this is my first time playing with a contract that takes arrays for the constructor also.
First way I tried
['TESTIES', 'TESTSS'], [0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd, 0xD99D1c33F9fC3444f8101754aBC46c52416550D1, 0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04, 0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E], [18, 1000000, 100, 200, 300, 400, 500, 600, 5, 1000,1000, 10000, 0], ['true', 'false', 'true', 'true', 'true', 'true', 'true', 'true']
Second way I tried.
stringParams: ["TESTIES", "TESTS"]
addressParams: ["0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", "0xD99D1c33F9fC3444f8101754aBC46c52416550D1", "0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04", "0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E"]
numberParams: [18, 1000000, 200, 100, 500, 500, 500, 4, 1000, 1000, 10000, 3]
boolParams: [false, false, true, false, true, false, false, true]
Also tried this
["TESTIES", "TESTS"], ["0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", "0xD99D1c33F9fC3444f8101754aBC46c52416550D1", "0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04", "0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E"], [18, 1000000, 200, 100, 500, 500, 500, 4, 1000, 1000, 10000, 3], [false, false, true, false, true, false, false, true]
Any and all help is appreciated
Jan 20, 2024, 8:21 PM
//nest everything in one single array
[
["TESTIES", "TESTS"], ["0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", "0xD99D1c33F9fC3444f8101754aBC46c52416550D1", "0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04", "0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E"], [18, 1000000, 200, 100, 500, 500, 500, 4, 1000, 1000, 10000, 3], [false, false, true, false, true, false, false, true]
]
[
["TESTIES", "TESTS"], ["0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd", "0xD99D1c33F9fC3444f8101754aBC46c52416550D1", "0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04", "0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E"], [18, 1000000, 200, 100, 500, 500, 500, 4, 1000, 1000, 10000, 3], [false, false, true, false, true, false, false, true]
]
Try it out
Jan 20, 2024, 8:31 PM
Thank you. I tried it but it didnt work 🥲
This is data that is being passed to the contracts constructor upon deployment. From what am figuring out this is the correct way to format it. However it is giving me a the error that I am posting and I cannot see where I have the amount of arguments being off from what it is being passed.
string[] 'TESTIES', 'TESTS', address[] 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd, 0xD99D1c33F9fC3444f8101754aBC46c52416550D1, 0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04, 0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E, uint256[] 18, 1000000, 100, 200, 300, 400, 500, 600, 5, 1000, 1000, 10000, 3, bool[] false, false, true, false, true, false, false, true
Error encoding arguments: Error: types/values length mismatch (count={"types":4,"values":27}, value={"types":["string[]","address[]","uint256[]","bool[]"],"values":[[],"'TESTS'",[],"0xD99D1c33F9fC3444f8101754aBC46c52416550D1","0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04","0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E",[],"1000000","100","200","300","400","500","600","5","1000","1000","10000","3",[],false,true,false,true,false,false,true]}, code=INVALID_ARGUMENT, version=abi/5.7.0)
This is data that is being passed to the contracts constructor upon deployment. From what am figuring out this is the correct way to format it. However it is giving me a the error that I am posting and I cannot see where I have the amount of arguments being off from what it is being passed.
string[] 'TESTIES', 'TESTS', address[] 0xae13d989daC2f0dEbFf460aC112a837C89BAa7cd, 0xD99D1c33F9fC3444f8101754aBC46c52416550D1, 0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04, 0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E, uint256[] 18, 1000000, 100, 200, 300, 400, 500, 600, 5, 1000, 1000, 10000, 3, bool[] false, false, true, false, true, false, false, true
Error encoding arguments: Error: types/values length mismatch (count={"types":4,"values":27}, value={"types":["string[]","address[]","uint256[]","bool[]"],"values":[[],"'TESTS'",[],"0xD99D1c33F9fC3444f8101754aBC46c52416550D1","0xC5F155345E154C4f598113D0DDD5dEb0dD79Bf04","0x476E71Bc24028C2797b6d2f8DE2dCb346cf53c1E",[],"1000000","100","200","300","400","500","600","5","1000","1000","10000","3",[],false,true,false,true,false,false,true]}, code=INVALID_ARGUMENT, version=abi/5.7.0)
Jan 20, 2024, 8:49 PM
this format is correct
Jan 20, 2024, 9:16 PM
It needs to be entered all into one field.
That should be correct from everything I am seeing but it gives me this error
creation of FatToken errored: Error encoding arguments: TypeError: str.charCodeAt is not a function
creation of FatToken errored: Error encoding arguments: TypeError: str.charCodeAt is not a function
Jan 20, 2024, 9:34 PM