INFINITY TRADE COIN ICO Documentation

Tools for writing and deploying smart contracts

Infura – scalable blockchain infrastructure. Don’t run a full Ethereum node, let them handle the infrastructure layer

Mist Browser – browse the dApp. Separate browser to browse dApps and interact with them.

Truffle Framework – The Ethereum Development framework. It has built-in smart contract compilation, linking, deployment, and binary management.

Metamask – It allows to run Ethereum dApps right in the browser without running a full Ethereum node. It is a browser plugin that allows users to make Ethereum transactions through regular websites.

Remix – Web IDE to write, deploy and run Solidity smart contracts

ETHFiddle - Share you Solidity Script

ETHFiddle - Framework to audit smart contract code

External Documentation

Solidity Documentation - Solidity Documentation

Create your own crypto - Create your own crypto (official)

ICO Smart Contact Framework - ICO Smart Contact Framework

Smart Contract Example

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
     pragma solidity ^0.4.0;

     contract Coin {
      // The keyword "public" makes those variables
      // readable from outside.
      address public minter;
      mapping (address => uint) public balances;

      // Events allow light clients to react on
      // changes efficiently.
      event Sent(address from, address to, uint amount);

      // This is the constructor whose code is
      // run only when the contract is created.
      function Coin() {
      minter = msg.sender;
      }

      function mint(address receiver, uint amount) {
      if (msg.sender != minter) return;
      balances[receiver] += amount;
      }

      function send(address receiver, uint amount) {
      if (balances[msg.sender] < amount) return;
      balances[msg.sender] -= amount;
      balances[receiver] += amount;
      Sent(msg.sender, receiver, amount);
      }
     }
address public minter;

It’s a 160 bit variable ideal for storing addresses on the Ethereum network.

mapping (address => uint) public balances;

Creates a mapping between address and unit type which stores the coin balance in each address

function Coin() {
minter = msg.sender;
}

Constructor function. Executed as soon as the contract is deployed. This sets the value of minter to the address which has deployed the contract. This ensures that only the owner of the contract can mint new coins and nobody else. This is ensured by the following function:

function mint(address receiver, uint amount)

Function sending coin value equal to amount to the receiver address.

function send(address receiver, uint amount)

Function sending coins to the receiver’s address from the sender’s address

Deploying smart contract in Ethereum blockchain

Testnets simulate the Ethereum network and EVM. It enables developers to upload and interact with smart contracts without paying the cost of gas.

Smart contracts must pay gas for their computations on the Ethereum network. However, testnets provide environments for developers to test their contracts without paying any money. Testnet gas is available for free from many public areas. es. ropsten