Write
approve
approve(address spender, uint256 value) returns(bool)Provides an allowance to spender on the account of msg.sender .
emit Approvalburn
burn(uint256 amount)Burns amount of 1XMM tokens for msg.sender .
burn(address account, uint256 amount)Burn amount of 1XMM tokens for account. account must provide allowance to msg.sender for this transaction to be accepted. This function is similar to burnFrom.
emit BurntWhen tokens are burnt, the account of user impacted by the burn is reduced by amount value, as well as the cap and the totalSupply .
burnFrom
burnFrom(address account, uint256 amount)Burn amount of 1XMM tokens for account. account must provide allowance to msg.sender for this transaction to be accepted.
emit BurntdepositEther
depositEther() payable returns(uint256 amountToken)Allow users to deposit native ETH on the 1XMM smart contract and receive in exchange the equivalent amount of 1XMM tokens. The amount of 1XMM tokens, amountToken, is computed such as:
amountToken = (msg.value * EthExchangeRate) / 10000The amount of tokens is compared to availableTokens. If amountToken > availableTokens, the difference of ETH is given back to the user.
emit Deposited
emit AllocatedNotes:
this function is available only if ethDepositIsAllowed is set to true
for kyc purposes this function will not be available at project start
sellBack
sellBack(uint128 amountToken)Allows users to sell back amountToken of 1XMM tokens against ETH. The sell back can occur only if ETHExchangeIsAllowed == true.
The exchange is performed at ETHExchangeRate such as:
ETHAmount = (amountToken * 10000) / ETHExchangeRateIf ETHAmount is bigger than the available amount of ETH stored on the 1XMM contract, the amount of 1XMM tokens is adjusted to match the available quantity of ETH. The quantity of 1XMM tokens which have been exchanged is burnt.
emit Burnt
emit ChangedBack
emit WithdrawnsellBackAgainst
sellBackAgainst(uint128 amountToken, address tokenToBeReceived)Allows users to sell back amountToken of 1XMM tokens against tokenToBeReceived. The sell back can occur only if exchange against tokenToBeReceived is allowed. The exchange is performed at rate such as:
amountTokenToBeReceived = (amountToken * 10000) / rateIf amountTokenToBeReceived is bigger than the available amount of expected tokens stored on the 1XMM contract, the amount of 1XMM tokens is adjusted. The quantity of 1XMM tokens which have been exchanged is burnt.
emit Burnt
emit ChangedBackFor
emit WithdrawnLast updated