The contract for the protection of investors

We made a contract that can return investment during ICO.
This is done so that people are not afraid of the scum.
The issue of tokens is unlimited, in order to be able to generate a return procedure and, upon return, to burn tokens.

Contract Functions


Fallback function

function() external payable
Fallback function calls createTokensForEth(address _investor, uint256 _aidValue) function to create tokens when investor sends ETH directly to ICO smart contract address.

setRate

function setRate(uint256 _RateEth) external oracleOnly
Set ETH/USD exchange rate and update token price.

startPreIco

function startPreIco() external managerOnly
Set ICO status to PreIcoStarted.

pausePreIco

function pausePreIco() external managerOnly
Set Ico status to PreIcoPaused.

finishPreIco

function finishPreIco() external managerOnly
Set ICO status to PreIcoFinished.

startIco

function startIco() external managerOnly
Set ICO status to IcoStarted.

pauseIco

function startIco() external managerOnly
Set ICO status to IcoPaused.

finishIco

function finishIco() external managerOnly
Finish ICO and allocate tokens for bounty company, partners and team pools.

enableTokensTransfer

function enableTokensTransfer() external managerOnly
Unfreezes tokens (enable token transfers).

rememberEther

function rememberEther(uint256 _value, address _investor) internal
Stores amount invested from specific address.

rememberTokensEth

function rememberTokensEth(uint256 _value, address _investor) internal
Stores amount of AID tokens investor received (for ETH purchases).

rememberTokensOtherCrypto

function rememberTokensOtherCrypto(uint256 _value, address _investor) internal
Stores amount of AID tokens investor received (for purchases in BTC, LTC, BCC).

buyForInvestor

function buyForInvestor(address _investor,uint256 _aidValue,string _txHash) external controllersOnly
buyForInvestor function is called by one of controllers createTokensForOtherCrypto(address _investor, uint256 _aidValue)
function to allocate tokens to investors who make a deposit in non-ETH currencies.

createTokensForOtherCrypto

function createTokensForOtherCrypto(address _investor, uint256 _aidValue) internal
Issue tokens for investors who paid in other cryptocurrencies.

createTokensForEth

function createTokensForEth(address _investor, uint256 _aidValue) internal

Issue tokens for investors who paid in ETH.

getBonus

function getBonus(uint256 _value) public constant returns(uint256)

get current bonus

daysFromIcoStart

function daysFromIcoStart() public constant returns(uint256)

Count days from Ico start day.

returnEther

function returnEther() public
Allows investors to return their investments(in ETH) if preICO or ICO_RETURN_DURATION is not over yet and burns tokens.

returnOtherCrypto

function returnOtherCrypto(address _investor, string _logString) external refundManagerOnly
This method is called by refund manager to burn tokens of investors who want to revoke their investments in other cryptocurrencies.

withdrawEther

function withdrawEther(uint256 _value) external managerOnly
Allows Company withdrawing investments when ICO_RETURN_DURATION is over

AidaIco Events
LogStartICO

event LogStartICO();
LogPauseICO

event LogPauseICO();
LogFinishICO

event LogFinishICO(address bountyFund, address partnersFund, address teamFund);
LogBuyForInvestor

event LogBuyForInvestor(address investor, uint256 aidValue, string txHash);
LogReturnEth

event LogReturnEth(address investor, uint256 eth);
LogReturnOtherCrypto

event LogReturnOtherCrypto(address investor, string logString);

What do you think about contract?

If you want more, please get to Github
Sign In or Register to comment.