0

Hi I am trying to pass an array of objects -

[   
{     
"tokenId": "6719509505",     
"merkleProof": ["0x3dd7537d9d901bc746ff8bfcf0315067c981c161693dc3c75267d83ec0d688d2",       "0xcf0fd76a410d5c3d4b7a983e5da832494b991497ff5b9d68491c7cf99254c905",       "0x32f9484ca0223b15dd93dc5c833d022ed854a21d1e69a8235787094f696ebb1b"]  
},   
{     
"tokenId": "6231137281",     
"merkleProof": ["0x77319cc263c886aa6fa366c5182cb765a6bb587d4d5758e53e471305a06b0b35",       "0xcf0fd76a410d5c3d4b7a983e5da832494b991497ff5b9d68491c7cf99254c905",       "0x32f9484ca0223b15dd93dc5c833d022ed854a21d1e69a8235787094f696ebb1b"]   
},   
{     
"tokenId": "6231137285",     
"merkleProof": ["0xc1178a9fc48c60b6504ffe104f028f8b3fae85d75353ad61c419cb8390ab7e7b",       "0x0c88393d69e0dc6038f666403e26286b19cffbb7e44d0ead07494afea017ecc7",       "0x3f1ae32d2fc63976e18bda6a0d7c6458f34d82c14224024732428400299e25d1"]   
} 
]

to my function in Remix -

function mint(Proof[] memory proofs) public {

but I am getting this error -

transact to merkle.mint errored: Error encoding arguments: Error: cannot encode object for signature with missing names (argument="values", coder={"name":"uint256","type":"uint256","localName":null,"dynamic":false,"size":32,"signed":false}, value={"tokenId":"6719509505","merkleProof":["0x3dd7537d9d901bc746ff8bfcf0315067c981c161693dc3c75267d83ec0d688d2","0xcf0fd76a410d5c3d4b7a983e5da832494b991497ff5b9d68491c7cf99254c905","0x32f9484ca0223b15dd93dc5c833d022ed854a21d1e69a8235787094f696ebb1b"]}, code=INVALID_ARGUMENT, version=abi/5.5.0)

Any ideas as to why?

1 Answer 1

0

Figured it out. The issue was the curly brackets {} and I didn't need to pass the key names, just the values.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.