I want to call the Seaport contract (SeaportContract), more precisely the fulfillBasicOrder
function but I have some problems.
First I know that in order to call another function contract we need to have its interface, problem: the Seaport interface needs many additional files to be imported and I wondered if there was maybe another way to call it so Ive seen here Calling function from deployed contract
And now my other problem is that, I indeed have the function signature ("fulfillBasicOrder((address,uint256,uint256,address,address,address,uint256,uint256,uint8,uint256,uint256,bytes32,uint256,bytes32,bytes32,uint256,(uint256,address)[],bytes))")
But I only have the calldata to call it, no parameters (so some very long string bytes 0xfb0f3ee1000000000.....0000000000000000
). Is there a way I can call that function the way I described ? So without using interface and with the calldata ? Or will I have to import manually all of the seaport files.
interface.encodeFunctionData
function (see ethers docs) to encode the parameters. Or when you start with the calldata you can decode it viainterface.decodeFunctionData
.