buyTicket
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: "0x7B3e950827b6da7D4cfF45E5a9Dc92e8201DFad3",
method: "function buyTicket(string _orderId, uint256 _amount, address _tokenAddress) payable",
params: [_orderId, _amount, _tokenAddress]
}
],
chainId: 888888888,
from: "<YOUR_WALLET_ADDRESS>"
})
});
const data = await response.json();