Skip to content

TwinToken/ERC20-Smart-Contract

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

Ethereum Smart Contract

TwinToken(XTW) Contract Details

  • Creates/Mints 10 billion Tokens and holds them inside contract.
  • Token and Sale Contract reference eachother.
  • Code based on OpenZeppelin audited erc20.
  • Tested on truffle for unit testing.
  • Uses Safemath Library from OpenZeppelin for safer mathematical calculations.
  • Added distrubution function for ease of access. Only accessible to Owner of the contract.
function distributeTokens(address _to, uint256 _value) public onlyOwner returns (bool success) {
        _value = _value * 10**18;
        require(balances[owner] >= _value && _value > 0);
        
        balances[_to] = balances[_to].add(_value);
        balances[owner] = balances[owner].sub(_value);
        Transfer(owner, _to, _value);
        return true;
}

TwinToken(XTW) Crowdsale Contract Details

  • Converts payable ETH to TOKEN's directly to user
  • ETH payed to contract is forwarded to a different wallet (owner's wallet)
  • Updateable ETH/TOKEN rate
function changeRate (uint256 _RATE) external onlyOwner {
       RATE = _RATE;
}
  • Ability to turn on/off sale. (via sale contract)
  • Crowdsale ends on a specific date
  • Token contrbutions will be removed from the Crowdsale contract and transfered to the purchaser.

About

Solidity smart contract code for ERC20 token and crowdsale

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published