With a stunning design, connected to the blockchain, metamask pairing, interaction with smart contracts, sending Ethereum through the blockchain network, and writing solidity code.
In the latest releasecontract.call() has changed the parameters to accept array instead of single param.
The API for interacting with smart contracts via the thirdweb React & TypeScript SDKs has been updated in favor of explicitly defining function arguments and (optionally) call overrides.
Using the contract.call function in the TypeScript SDK now looks like the following:
Note that the arguments to the contract function are now passed in as an array as the second parameter to contract.call, and the overrides are passed optionally as the last parameter.
const data = await contract.call(
"myFunctionName", // Name of your function as it is on the smart contract
// Arguments to your function, in the same order they are on your smart contract
[
"arg1", // e.g. Argument 1
"arg2", // e.g. Argument 2
],
);
In the latest release
contract.call()
has changed the parameters to accept array instead of single param.