writeContract
Function to call functions on a smart contract using the connected Abstract Global Wallet.
The AbstractClient
includes a writeContract
method that can be used to call functions on a smart contract using the connected Abstract Global Wallet.
Usage
Parameters
The address of the contract to write to.
The ABI of the contract to write to.
The name of the function to call on the contract.
The arguments to pass to the function.
The account to use for the transaction. By default, this is set to the Abstract Global Wallet’s account.
The chain to use for the transaction. By default, this is set to the chain specified in the AbstractClient.
The amount of native token to send with the transaction (in wei).
Data to append to the end of the calldata. Useful for adding a “domain” tag.
The amount of gas for publishing one byte of data on Ethereum.
Address of the paymaster smart contract that will pay the gas fees of the transaction.
Input data to the paymaster. Required if paymaster
is provided.
Returns
Returns a Promise<Hex>
containing the transaction hash of the contract write operation.
Was this page helpful?