web3p / web3.php

A php interface for interacting with the Ethereum blockchain and ecosystem. Native ABI parsing and smart contract interactions.
MIT License
1.15k stars 540 forks source link

Error "Undefined array key "coders"" #346

Open bjutkoski opened 5 months ago

bjutkoski commented 5 months ago

I'm having this error Undefined array key "coders" when methods has tuple[] or tuple as input/output

/web3p/web3.php/src/Contracts/Types/Tuple.php:116

input as tuple[]

{ "inputs": [ { "internalType": "string", "name": "documentId", "type": "string" }, { "components": [ { "internalType": "string", "name": "documentItemId", "type": "string" }, { "internalType": "string", "name": "id", "type": "string" }, { "internalType": "string", "name": "locationId", "type": "string" }, { "internalType": "string", "name": "wasteId", "type": "string" }, { "internalType": "uint256", "name": "amount", "type": "uint256" } ], "internalType": "struct WasteTraceability.CollectionRequestItem[]", "name": "collectionRequestItems", "type": "tuple[]" } ], "name": "createCollectionRequest", "outputs": [], "stateMutability": "nonpayable", "type": "function" }

tuple as output

{ "inputs": [ { "internalType": "string", "name": "wasteId", "type": "string" } ], "name": "getWaste", "outputs": [ { "components": [ { "internalType": "string", "name": "name", "type": "string" }, { "internalType": "uint256", "name": "decimals", "type": "uint256" } ], "internalType": "struct WasteTraceability.Waste", "name": "", "type": "tuple" } ], "stateMutability": "view", "type": "function" }

Ow3nTan commented 3 months ago

i am encountering the same issue now