wallets
array and get its EIP-1193 provider via its getEthereumProvider
method:request
method, send a eth_sendTransaction
JSON-RPC to the wallet. In the params
array, include as the first entry an object containing the transaction’s parameters, such as to
, value
, data
, gasLimit
, maxPriorityFeePerGas
, maxFeePerGas
, and gasPrice
.eth_sendTransaction
.from
as we populate it from the user’s connected wallet, and you can pass either a number
, bigint
, or a hexadecimal string
into the value
parameter.Library | Method |
---|---|
Viem | Use the wallet client’s sendTransaction method. |
Ethers | Use the signer’s sendTransaction method. |
Wagmi | Use the useSendTransaction hook. |