execute
payable
Use this function in your app
const response = await fetch('https://api.thirdweb.com/v1/contracts/write', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-secret-key': '<YOUR_SECRET_KEY>'
},
body: JSON.stringify({
calls: [
{
contractAddress: "0xd85da690EF288A6976DE0E85Fb2Aad512eBAfbf7",
method: "function execute((address from, address to, uint256 value, uint256 gas, uint256 nonce, bytes data) req, bytes signature) payable returns (bool, bytes)",
params: [req, signature]
}
],
chainId: 10,
from: "<YOUR_WALLET_ADDRESS>"
})
});
const data = await response.json();