allowance

Check if token allowance has been provided for pan cake swap router

/bsc/pcs/allowance

POST https://cryptotalk-public-gateway-byeii62k.de.gateway.dev/bsc/pcs/allowance

Code sample is given below

Query Parameters

Name
Type
Description

key

string

API Key

Request Body

Name
Type
Description

params

object

{"addr" : "wallet addr", "frm_tkn_addr":"token addr", "gas" : "1", "amt_float" : 1}

{
  "isError": false,
  "isAllowed": false,
  "text": "Sign rawTx and broadcast",
  "rawTx": {
    "from": "0x7acaa0e45241e85e0bf644ccfb1faf5b06458318",
    "value": "0x0",
    "to": "0xf859bf77cbe8699013d6dbc7c2b926aaf307f830",
    "data": "0x095ea7b300000000000000000000000005ff2b0db69458a0750badebc4f9e13add608c7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff",
    "nonce": "0x0",
    "gasLimit": "0x1250d",
    "gasPrice": "0x3b9aca00"
  },
  "rawTxExactAmt": {
    "from": "0x7acaa0e45241e85e0bf644ccfb1faf5b06458318",
    "value": "0x0",
    "to": "0xf859bf77cbe8699013d6dbc7c2b926aaf307f830",
    "data": "0x095ea7b300000000000000000000000005ff2b0db69458a0750badebc4f9e13add608c7f0000000000000000000000000000000000000000000000000de0b6b3a7640000",
    "nonce": "0x0",
    "gasLimit": "0x1250d",
    "gasPrice": "0x3b9aca00"
  },
  "allowance_addr": "0x05fF2B0DB69458A0750badebc4f9e13aDd608C7F",
  "addr": "0x7acAa0e45241E85E0bf644ccfB1faF5B06458318",
  "operation": "ENABLE",
  "frm_tkn_symbol": "BRY"
}

Sample code to check if an address has already provided allowance for CAKE token to Pancake swap

Last updated

Was this helpful?