SimpleICO¶
SimpleICO scheme.
Execution cost: less than 21271 gas
Deployment cost: less than 865200 gas
Combined cost: less than 886471 gas
Constructor¶
Events¶
DonationReceived(address,address,uint256,uint256)¶
Execution cost: No bound available
Params:
- organization of type
address
- _beneficiary of type
address
- _incomingEther of type
uint256
- _tokensAmount of type
uint256
OwnershipTransferred(address,address)¶
Execution cost: No bound available
Params:
- previousOwner of type
address
- newOwner of type
address
Methods¶
owner()¶
Execution cost: less than 721 gas
Attributes: constant
Returns:
- output_0 of type
address
hashedParameters()¶
Execution cost: less than 700 gas
Attributes: constant
Returns:
- output_0 of type
bytes32
donate(address,address)¶
Donating ethers to get tokens. If the donation is higher than the remaining ethers in the "cap", The donator will get the change in ethers.
Execution cost: No bound available
Attributes: payable
Params:
-
_avatar of type
address
The Avatar's of the organization.
-
_beneficiary of type
address
The donator's address - which will receive the ICO's tokens.
Returns:
uint number of tokens minted for the donation.
- output_0 of type
uint256
haltICO(address)¶
Allowing admin to halt an ICO.
Execution cost: less than 21475 gas
Params:
-
_avatar of type
address
The Avatar's of the organization
getParametersHash(uint256,uint256,uint256,uint256,address,address)¶
Hash the parameters and return the hash value
Execution cost: less than 829 gas
Attributes: constant
Params:
-
_cap of type
uint256
the ico cap
-
_price of type
uint256
represents Tokens per 1 Eth
-
_startBlock of type
uint256
ico start block
-
_endBlock of type
uint256
ico end
-
_beneficiary of type
address
the ico ether beneficiary
-
_admin of type
address
the address of the ico admin which can hold and resume the ICO.
Returns:
bytes32 -the params hash
- output_0 of type
bytes32
isActive(address)¶
Check is an ICO is active (halted is still considered active). Active ICO: 1. The organization is registered. 2. The ICO didn't reach it's cap yet. 3. The current block isn't bigger than the "endBlock" & Smaller then the "startBlock"
Execution cost: less than 3761 gas
Attributes: constant
Params:
-
_avatar of type
address
The Avatar's of the organization
Returns:
bool which represents a successful of the function
- output_0 of type
bool
organizationsICOInfo(address)¶
Execution cost: less than 1559 gas
Attributes: constant
Params:
- param_0 of type
address
Returns:
- paramsHash of type
bytes32
- avatarContractICO of type
address
- totalEthRaised of type
uint256
- isHalted of type
bool
parameters(bytes32)¶
Execution cost: less than 1880 gas
Attributes: constant
Params:
- param_0 of type
bytes32
Returns:
- cap of type
uint256
- price of type
uint256
- startBlock of type
uint256
- endBlock of type
uint256
- beneficiary of type
address
- admin of type
address
resumeICO(address)¶
Allowing admin to reopen an ICO.
Execution cost: less than 21513 gas
Params:
-
_avatar of type
address
The Avatar's of the organization
setParameters(uint256,uint256,uint256,uint256,address,address)¶
Hash the parameters, save them if necessary, and return the hash value
Execution cost: less than 122123 gas
Params:
-
_cap of type
uint256
the ico cap
-
_price of type
uint256
represents Tokens per 1 Eth
-
_startBlock of type
uint256
ico start block
-
_endBlock of type
uint256
ico end
-
_beneficiary of type
address
the ico ether beneficiary
-
_admin of type
address
the address of the ico admin which can hold and resume the ICO.
Returns:
bytes32 -the params hash
- output_0 of type
bytes32
start(address)¶
start an ICO
Execution cost: No bound available
Params:
-
_avatar of type
address
The Avatar's of the organization
transferOwnership(address)¶
Allows the current owner to transfer control of the contract to a newOwner.
Execution cost: less than 23049 gas
Params:
-
newOwner of type
address
The address to transfer ownership to.
updateParameters(bytes32)¶
Execution cost: less than 20572 gas
Params:
- _hashedParameters of type
bytes32