fungibletoken
Approve
This endpoint is used to grant permission for a designated spender to withdraw tokens from a user's ERC-20 token balance. By invoking the standard ERC-20 approve function, it sets an allowance that enables the spender to access up to a specified number of tokens on behalf of the user.
💡 Compute Unit Value: 80 (Fixed)
post/defi/v1/fungibletoken/approve
Request
- Base URLhttps://svc.blockdaemon.com
- URLhttps://svc.blockdaemon.com/defi/v1/fungibletoken/approve
- AuthAPI key in header X-API-Key
Request body
Example request
{
"from": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"tokenAddress": "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
"amount": "1000000000000000000",
"to": "0xdAe2F6EdDdA6fb4fb60cc02633DE27e2b431B402",
"gas": "100000",
"chainId": "1",
"chainSymbol": "ETH",
"gasPriority": "low",
"enableFee": false,
"simulate": false
}Response
Successful response
Example response
{
"status": 200,
"msg": "success",
"data": {
"chainId": "1",
"from": "0x63056E00436Da25BcF48A40dfBbDcc7089351006",
"to": "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
"value": "0",
"gas": "100000",
"data": "0x095ea7b3000000000000000000000000828b154032950c8ff7cf8085d841723db269605600000000000000000000000000000000000000000000003635c9adc5dea00000",
"referenceId": "ab50faa439b64b66beae1a894e1f0a0a"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.