API Reference

cfx_getAccount - Conflux

Returns an account, identified by its address.

Parameters

  • BASE32 - Address of the account.
    QUANTITY|TAG - (optional, default: "latest_state") Integer epoch number, or the string "latest_state", "latest_confirmed", "latest_checkpoint" or "earliest", see the epoch number parameter

Returns

Object - The state of the given account:

  • address: BASE32 - Address of the account.
  • balance: QUANTITY - The balance of the account.
  • nonce: QUANTITY - The nonce of the account's next transaction.
  • codeHash: DATA - The code hash of the account.
  • stakingBalance: QUANTITY - The staking balance of the account.
  • collateralForStorage: QUANTITY - The collateral storage of the account.
  • accumulatedInterestReturn: QUANTITY - Accumulated interest return of the account.
  • admin: BASE32 - Admin of the account.

Example

Request

curl -X POST \
--data '{"jsonrpc":"2.0","method": "cfx_getAccount",
    "params":  [
   "cfx:type.contract:acc7uawf5ubtnmezvhu9dhc6sghea0403y2dgpyfjp",
   "latest_state"
],"id":1}' \
-H "Content-Type: application/json" \
https://cfx-core.unifra.io/v1/ad2eb3c7a9404cc6a35a6641eaf70577 


Result

{
    "jsonrpc": "2.0",
    "result": {
        "accumulatedInterestReturn": "0x0",
        "address": "CFX:TYPE.CONTRACT:ACC7UAWF5UBTNMEZVHU9DHC6SGHEA0403Y2DGPYFJP",
        "admin": "CFX:TYPE.USER:AAT8NZGDDRS7A2XNV2ZS4EUJSR9XDG3FRJXHPB7562",
        "balance": "0x0",
        "codeHash": "0x17404120e429d743f170be02a42dd5018a3d340863ef7c7bf41db1baab1a1cd7",
        "collateralForStorage": "0x19274b259f654000",
        "nonce": "0x1",
        "stakingBalance": "0x0"
    },
    "id": 0
}
Language
URL
Click Try It! to start a request and see the response here!