mint
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: "0xdF1eeB2e8998fA72F08Ca9E2756E6a2A6B3593A0",
method: "function mint(address _target, uint256 _quantity, address _to) payable",
params: [_target, _quantity, _to]
}
],
chainId: 1,
from: "<YOUR_WALLET_ADDRESS>"
})
});
const data = await response.json();