All Projects → hunterlong → Ethereum Ico Contract

hunterlong / Ethereum Ico Contract

Tested Ethereum ICO Contract for Token Crowdsales

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Ethereum Ico Contract

Ico Contracts
Ethereum smart contracts that have been used during successful ICOs
Stars: ✭ 160 (+171.19%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract, ico
Rico
The Responsible Initial Coin Offering Framework
Stars: ✭ 83 (+40.68%)
Mutual labels:  ethereum, smart-contracts, ico
Daox Contracts
Smart contracts for creating Daox-based fundraising organization
Stars: ✭ 31 (-47.46%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Eden Smart Contracts
EDEN - EDN Smart Token & Smart Contracts
Stars: ✭ 109 (+84.75%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Smart Contract Sanctuary
🐦🌴🌴🌴🦕 A home for ethereum smart contracts. 🏠
Stars: ✭ 99 (+67.8%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Smart Contracts
Ethereum smart contracts for security and utility tokens
Stars: ✭ 1,187 (+1911.86%)
Mutual labels:  ethereum, smart-contracts, ico
Smart Contracts Example
Simple example of token market. Based on blockchain technology using Ethereum platform.
Stars: ✭ 37 (-37.29%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Ico Contracts
🎉 ICO Contracts of the ALIS.
Stars: ✭ 69 (+16.95%)
Mutual labels:  ethereum, smart-contracts, ico
Solidity
🔐 Ethereum smart contracts developed for the Hanzo Platform.
Stars: ✭ 46 (-22.03%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Cryptocurrencyawesome
Cryptocurrency study materials resources
Stars: ✭ 118 (+100%)
Mutual labels:  ethereum, smart-contracts, ico
Ethereum Smart Contracts Security Checklist
Ethereum Smart Contracts Security CheckList From Knownsec 404 Team
Stars: ✭ 114 (+93.22%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Colonynetwork
Colony Network smart contracts
Stars: ✭ 351 (+494.92%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Nmr
The Numeraire Ethereum Smart Contract
Stars: ✭ 316 (+435.59%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
React Ethereum Dapp Example
A starter boilerplate for an Ethereum dapp using web3.js v1.0, truffle, react, and parity
Stars: ✭ 384 (+550.85%)
Mutual labels:  ethereum, smart-contracts, ethereum-contract
Ethereum book
精通以太坊 (中文版)
Stars: ✭ 875 (+1383.05%)
Mutual labels:  ethereum, smart-contracts
Textmessage.eth
Send SMS Text Messages within the Ethereum Blockchain - TextMessage.ETH
Stars: ✭ 11 (-81.36%)
Mutual labels:  ethereum, ethereum-contract
Protocol
⛓ Dev Protocol is an open source middleware for creator's sustainability.
Stars: ✭ 56 (-5.08%)
Mutual labels:  ethereum, smart-contracts
Smartift Contract
The solidity code for the SIFT smart contract.
Stars: ✭ 11 (-81.36%)
Mutual labels:  ethereum, ico
Augmint Web
Augmint Web Frontend
Stars: ✭ 15 (-74.58%)
Mutual labels:  ethereum, smart-contracts
Outsmarting Smart Contracts
A repo with information about security of Ethereum Smart Contracts
Stars: ✭ 29 (-50.85%)
Mutual labels:  ethereum, smart-contracts

Ethereum ICO Crowdsale Contract Build Status

This is a basic example of a crowdsale with a brand new ERC20 token. First deploy the Sale contract, and then the ERC20 token contract. The ERC20 contract will require the Sale Contract etheruem address.

Contract Details

  • Creates/Mints 5 million Tokens and holds them inside contract.
  • ERC20 and Sale Contract both reference eachother
  • Converts payable ETH to TOKEN's directly to user
  • ETH payed to contract is forwarded to a different wallet (holds ICO funds)
  • Updateable ETH/TOKEN rate
  • Developers and Founders can allocate a specific amount of tokens to be released at later date.
  • Ability to turn on/off transfer of coins. (via sale contract)
  • Crowdsale ends on a specific block number
  • Token contrbutions will be removed from the Mint and transfered to the purchaser.
  • Users that have tokens held can release them once time has passed without owner permission.

Deploy Instructions

  1. You must deploy the Sale contract first. Be sure to change the token sale details in contract. Include a wallet address for ETH to be sent to for each contribution. Example: Sale("0x004F3E7fFA2F06EA78e14ED2B13E87d710e8013F") creating contract 0x2b15ebaab98a5af6b0e3e9baef3580b9a387ffed

  2. Once you have the Sale contract, deploy the Token contract. Be sure to change the token details and createTokens intial minted amount. When you deploy the Token contract, you must include the Sale contract address when you deploy the contract. Example: Token("0x2b15ebaab98a5af6b0e3e9baef3580b9a387ffed") creating token contract 0x501775ea69e834c2cdc0be13ab25704d92168101

  3. Now you can finalize the process by running the setup function to the Sale contract. The setup function requires the token contract address and then ending block number of when the ICO should end. The owner of the contract can also end at any time. Example: setup("0x501775ea69e834c2cdc0be13ab25704d92168101", 7000000) creating transaction 0x682392db4d184fc5e96c7dbf53b29c891d7158422ecd7935b484159ed633ca79 My ICO sale will end and expire on block #7000000.

  4. Your ICO has begun! You can now send ETH to the Sale contract address to receive your new tokens! I sent 1 ETH with data: 0xd7bb99ba to my Sale contract address. The user must send ETH or the transaction will fail! Example: 1 ETH - Data: 0xd7bb99ba - Gas Limit: 80000 creating transaction 0xbf541f8b39d5b94670c909e85cec8035b7c30d178d2c6e5637e1ad395ca2d9b2 This transaction sent 1 ETH to the ETH wallet address and also sent me 600 Tokens.

  5. Once you received your $15 million for the ICO you can close it at anytime with the closeSale function. Example: closeSale() creating transaction 0xae7608515185bfeb3aa185890edb733bc5c0031f392ece5366179463bd27e430. The ICO Sale is over!

This ICO-sale contract will allow you to change owners, change token rate per ETH, hold tokens for a specific amount of time, and allow users that have tokens held. The Sale contract locks the tokens, once the set block height has been passed, the user can run realeaseHeldCoins() (0x6ce5b3cf) to the sale contract to receive their tokens if the time has passed! Example: 0xf1856d866db8a022b847960b5caa55170640714dbd14e981625d6cf373973885

Crowdsale Contract

function contribute() external payable is the function for the purchaser to mint new tokens. (Data: 0xd7bb99ba)

ERC20 Additions

The ERC20 contract has a couple additions to be reviewed by you. When the token contract is deployed, it will require the Sale Contract address and will be set 1 and only 1 time. If you set an incorrect address when you deploy the ERC20 you'll have to re-deploy the sale and ERC20 again. This is for security, 1 time set functions.

Minting Tokens

Minting Tokens call comes from the Sale contract, when the ERC20 is deployed it will force the Sale contract. function mintToken(address to, uint256 amount) external returns (bool success);

Change "transfer" method from the Sale Contract. function changeTransfer(bool allowed);

Hold Token Period

The Sale Contract will allow you to hold a specific amount of tokens for an amount of time before being released directly to address. The createHoldToken function requires an address and the amount of tokens given at end of period.

function createHeldCoins() internal {
  createHoldToken(0x4f70Dc5Da5aCf5e71988c3a8473a6D8a7E7Ba4c9, 100000000000000000000000); // 100,000
  createHoldToken(0x323c82c7Ae55B48745f4eCcd2523450d291f2412, 250000000000000000000000); // 250,000
}

You can change the amount of blocks in future to release.

function createHoldToken(address _to, uint256 amount) internal {
...
  heldTimeline[_to] = block.number + 200000;
...
}

Once a time period as passed, the wallet owner can do a contract call to receive the tokens. (Data: 0x6ce5b3cf)

function releaseHeldCoins()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].