Code Monkey home page Code Monkey logo

crowdsale's Introduction

CrowdSale

Building a crowdsale smartcontract on ethereum using Truffle & OpenZepplin

Run npm install

Testing Steps

truffle compile open another tab and run testrpc -u 0 truffle migrate Once successfully done, run 'truffle console' and execute following commands to check the contract

account1 = web3.eth.accounts[1]

VamshiCoinCrowdsale.deployed().then(inst => { crowdsale = inst })
crowdsale.token().then(addr => { tokenAddress = addr } )
tokenAddress

vamshiCoinInstance = VamshiCoin.at(tokenAddress)
vamshiCoinInstance.balanceOf(account1).then(balance => balance.toString(10))

VamshiCoinCrowdsale.deployed().then(inst => inst.sendTransaction({ from: account1, value: web3.toWei(5, "ether")}))

vamshiCoinInstance.balanceOf(account1).then(balance => account1GusTokenBalance = balance.toString(10))
web3.fromWei(account1GusTokenBalance, "ether")

Get Ether for Ropsten Network

faucet.ropsten.be:3001 - go to this, enter your address of ropsten account and get 3 ETH.

Deploying a truffle contract to ropsten

https://medium.com/@guccimanepunk/how-to-deploy-a-truffle-contract-to-ropsten-e2fb817870c1

--Syncing Ropsten Network https://ethereum.stackexchange.com/a/19366/17168

--More about testnets https://karl.tech/intro-guide-to-ethereum-testnets/ --Installing geth http://www.ziggify.com/blog/blockchain-stack-1-installing-ethereum-geth-smart-contract/

--Auditing Contract “The ultimate guide to audit a Smart Contract + Most dangerous attacks in Solidity” @Merunas2 https://medium.com/@merunasgrincalaitis/how-to-audit-a-smart-contract-most-dangerous-attacks-in-solidity-ae402a7e7868

--ICO Checklist https://medium.com/@merunasgrincalaitis/what-it-takes-to-create-a-successful-ico-how-expensive-it-is-your-complete-guide-35912722351e

--Attacks on Ethereum Smart Contracts https://www.cryptologie.net/article/423/attacks-on-ethereum-smart-contracts/

crowdsale's People

Contributors

vamshi4001 avatar

Stargazers

Daniel wu avatar

Watchers

 avatar James Cloos avatar Prady avatar

Forkers

cchx0000

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.