"No matching function" in the ABI
See original GitHub issueI’m having a similar issue. Using V5 under NodeJS
const fillInterface = new ethers.utils.Interface(FILL_ORDER_ABI); // function abi
const data = fillInterface.encodeFunctionData("fillOrder",[orderTuple, takerAssetFillAmount, signature])
Error: no matching function (argument=“name”, value=“fillOrder”, code=INVALID_ARGUMENT, version=abi/5.0.9)
The ABI
{
"constant":false,"inputs":[
{"components":[
{"internalType":"address","name":"makerAddress","type":"address"},
{"internalType":"address","name":"takerAddress","type":"address"},
{"internalType":"address","name":"feeRecipientAddress","type":"address"},
{"internalType":"address","name":"senderAddress","type":"address"},
{"internalType":"uint256","name":"makerAssetAmount","type":"uint256"},
{"internalType":"uint256","name":"takerAssetAmount","type":"uint256"},
{"internalType":"uint256","name":"makerFee","type":"uint256"},
{"internalType":"uint256","name":"takerFee","type":"uint256"},
{"internalType":"uint256","name":"expirationTimeSeconds","type":"uint256"},
{"internalType":"uint256","name":"salt","type":"uint256"},
{"internalType":"bytes","name":"makerAssetData","type":"bytes"},
{"internalType":"bytes","name":"takerAssetData","type":"bytes"},
{"internalType":"bytes","name":"makerFeeAssetData","type":"bytes"},
{"internalType":"bytes","name":"takerFeeAssetData","type":"bytes"}
],
"internalType":"struct LibOrder.Order","name":"order","type":"tuple"
},
{"internalType":"uint256","name":"takerAssetFillAmount","type":"uint256"},
{"internalType":"bytes","name":"signature","type":"bytes"}
],
"name":"fillOrder",
"outputs":[
{"components":[
{"internalType":"uint256","name":"makerAssetFilledAmount","type":"uint256"},
{"internalType":"uint256","name":"takerAssetFilledAmount","type":"uint256"},
{"internalType":"uint256","name":"makerFeePaid","type":"uint256"},
{"internalType":"uint256","name":"takerFeePaid","type":"uint256"},
{"internalType":"uint256","name":"protocolFeePaid","type":"uint256"}
],
"internalType":"struct LibFillResults.FillResults",
"name":"fillResults","type":"tuple"}
],"payable":true,
"stateMutability":"payable",
"type":"function"
}
Not sure why it wont see the function. This ABI was working with WEB3
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (4 by maintainers)
Top Results From Across the Web
I get a weird error about no matching function when I try to use ...
I get a weird error about no matching function when I try to use winrt::capture. Last time, we looked at using the C++/WinRT...
Read more >no matching function for call to 'MY_OBJ - Stack Overflow
You defined a constructor for Vector requiring an argument, so now Base can't construct its member Vectors without an argument supplied. Put the ......
Read more >Interface - Ethers.js
Create a new Interface from a JSON string or object representing abi. ... getFunction("doesNotExist()"); // [Error: no matching function] { // argument: ...
Read more >"multiple matching functions" with Hardhat and contracts ...
I've recently “upgraded” my deployment setup to use Hardhat and the latest @openzeppelin/contracts-upgradeable package.
Read more >web3.py does not print Events `ValueError: No matching ...
var event = myContract.LogJob({}, {fromBlock:0, toBlock:'latest'}); event.watch(function(error, result) { console.log(JSON.stringify(result)); }); ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can you show more of your code? This works for me:
Nope but I was sure it was. Not sure if something is wrong with my abi. Interface is looking for an array given the map error.