cfx_checkBalanceAgainstTransaction
Check if user balance is enough for the transaction.
- CURL
curl --request POST \
     --url https://main.confluxrpc.com \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "id": 1,
  "jsonrpc": "2.0",
  "params": [null,null,null,null,null,null],
  "method": "cfx_checkBalanceAgainstTransaction"
}'
Params
account_addr required
Schema
type : string
Pattern : 
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$contract_addr required
Schema
type : string
Pattern : 
^(NET\d+|CFX|CFXTEST)(:TYPE\..*|):[ABCDEFGHJKMNPRSTUVWXYZ0123456789]{42}$gas_limit required
Schema
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,63}|0)$gas_price required
Schema
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,63}|0)$storage_limit required
Schema
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,63}|0)$epoch optional
Represents rpc api epoch number param.
oneOf
- U64
- string
type : string
Pattern : 
^0x([1-9a-f][0-9a-f]{0,15}|0)$type : string
Possible values : 
- earliest
- latest_checkpoint
- latest_finalized
- latest_confirmed
- latest_state
- latest_mined
Result
Schema
type : object
- isBalanceEnough isBalanceEnoughtype : boolean
- willPayCollateral willPayCollateraltype : boolean
- willPayTxFee willPayTxFeetype : boolean