Skip to content

AlbertChanX/CYCToken

Repository files navigation

How to run

  1. install
npm install -g truffle
npm install -g ganache-cli

npm init -y
npm install -E zeppelin-solidity

// npm update -g truffle

(🍎) npm install openzeppelin-solidity :star: openzeppelin-solidity@1.9.0

  1. create project in a empty folder
truffle init
ganache-cli -p 8545 // start client
  1. compile/deploy contract in root dir
truffle compile  // check build folder
truffle migrate --network development // check it in truffle.js
  1. interact with Contract in console
truffle console --network development

// get account from ganache-cli
account0 = web3.eth.accounts[0]

// call contract
CYCToken.deployed().then(inst => { CYCTokenInstance = inst })

CYCTokenInstance.totalSupply.call()

// or like this
CYCToken.at(CYCToken.address).name.call()

// event
CYCTokenInstance.Transfer.call()

//func
CYCTokenInstance.transfer('0x', 100)
  1. deploy contract in ropsten
truffle migrate --network ropsten
  • runing result:
Deploying CYCToken...
  ... 0x2d04ff6f016a8e03f8c3f662f5a73b6ca94bfa4d95c0055b847cd8ed453f363e
  CYCToken: 0xd797d0b277e2f3b01c123ceef78180b6ea643fc2
  • 🎉view contract in here

Warning to be fixed

when compile sol

Warning: Defining constructors as functions with the same name as the contract is deprecated. Use "constructor(...) { ... }" instead.
  function CYCToken() public {
  ^ (Relevant source part starts here and spans across multiple lines).

solidity_flattener

truffle-flattener:

truffle-flattener <*.sol> >> <new.sol>

Refer

  1. EIP-20

  2. truffle

  3. Lavevel-Token

  4. DongriToken

  5. ERC20

  6. OurToken

  7. Awesome Crowdsales

  8. provider

  9. smart contract

  10. Kubide/solidity-Boilerplate: A basic Solidity - Truffle - OpenZeppelin - Infura Boilerplate

About

CYCle ERC20 Token Contract Deployment

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published