In this doc
HomeKaleido ServicesEther PoolFund an Account and Check Your Balance

Fund an Account and Check Your Balance

Fund Your Ether Pool Account

The Ether Pool exists on a per-environment basis as a pre-funded one billion ether account configured in the genesis block of the chain. The ether can be accessed by any member of a consortium that owns and operates a node in the environment via the Kaleido user interface or through a simple /fundaccount API call.

The governance of the pool is left entirely to the discretion of the consortium. For example, the pool can be used intermittently on a need-by-need basis or drained immediately and then disseminated in accordance with some agreed upon protocol.  The pool offers a convenient alternative to developing your own ERC20 token and can be used in myriad ways.  For example, mapping to fiat or fungible assets, enforcing smart contract costs or prioritizing transaction mining.

How to fund an account

You can add ether to a node’s account in one of two ways.  Either through the intuitive Kaleido user interface or via a simple POST call against the /fundaccount API.

From the UI:

  • Navigate to the environment containing the node you wish to fund.
  • Expand the node details and ascertain the Ethereum account address.
    This is the hex string next to the USER ACCOUNTS row.
  • Return to your environment panel and expand the Ether Pool dropdown.
    Click Fund Account.
  • On the Fund Account screen enter the node’s Ethereum account address and specify the requested amount as either Ether or Wei.  Click FUND.
  • Wait a few seconds.  You will be returned to the environment panel when the call completes.

From the API:

  • Programmatically inject ether into a node account through a simple POST to the /fundaccount endpoint with the Ethereum account address and requested amount in the body of the call.  For example, to request 100 ether:
curl -X POST -d '{"account":"0x51D91D3128252728a37131713c8d98724BDF744E", "amount":"100"}' -H "$HDR_AUTH" -H "$HDR_CT" "$APIURL/consortia/{consortia_id}/environments/{environment_id}/eth/fundaccount" | jq

Checking your balance

Now you can use a simple geth attach command to hook into your node and retrieve the balance.
For example, geth attach https://username:password@NodeURL

Once you have successfully accessed the node, you can use the getBalance API in the eth module to list out the balance.
For example:

eth.getBalance(eth.coinbase) for the default user account on a node using PoA or Raft consensus.

For alternate accounts stored on the node, or when using IBFT, the specific account address must be enumerated. For example: