Links

Holding Contract

Overview

The Holding Contract holds tokens for initial investors. These tokens are "pre-mined", and do not enter the pool through block validation. Tokens are held for affiliates until a specific point of time that is specified in the contract, at which point they can be released to the specified address. The constructor of the holding contract and its initial balance is part of the chainspec file. This allows the investors' tokens to be locked at the first block.
The mapping between the account address and the token amount is hard coded into the contract and cannot be changed after deployment. After a block that has a later timestamp than the holding timestamp of an address is created, the tokens for that address can be transferred to the address by calling the realeaseFunds method. This method can be called by anyone, not only by the address that holds that balance.
Interaction with Holding Contract
​

Documentation and Source Code

Check a Balance and Withdraw Funds

If you're an investor and want to see your balance, you can use the Balance Viewer interface: http://balance.energyweb.org/​.​
You will need MetaMask pointed to a local or a remote node
  • To learn how to connect via remote RPC, go here​
  • To learn how to run a local node go here​
  1. 1.
    Enter your address in the lookup field to see your holding balance
  2. 2.
    If the release period has ended, press the "Withdraw" button to release the funds to the address it belongs to. Make sure you trigger the withdraw function with an account that has some ethers to cover transaction costs
Holding Contract User Interface

Mapping Between Address and Tokens

The mapping between addresses and tokens/release timestamp is kept in the storage of this contract. This mapping data structure was filled at the deploy time of the contract and cannot be changed.
mapping (address => Holder) public holders;
​
// -- snip --
​
struct Holder {
uint256 availableAmount;
uint256 lockedUntilBlocktimestamp;
}
​
// -- snip --
​
// in the constructor
addHolding(0x120470000000000000000000000000000000000a, 10000000000000000000000000, 1564509540);

Interacting with the Holding Contract

Contract Address and ABI

Contract
Address
JSON ABI
Holding
0x1204700000000000000000000000000000000004

Callable Functions

Function Name
Description
releaseFunds(address)
Releases funds for a holding address if it is present in the contract and the holding period is over
holders(address)
Returns the holding data for an address, the available amount and the holding-period-end blocktimestamp
TARGET_AMOUNT()
Returns the total amount initially held by the contract