Code Monkey home page Code Monkey logo

ethereum-relay's Introduction

Solidity

1. 用solidity compiler輸出abi給go解析使用

solc --overwrite --abi contracts/ERC20ByteCodeGenerator.sol -o contracts/dist/

2. 用solidity compiler輸出bin給EVM bytecode使用

solc --overwrite --bin contracts/ERC20ByteCodeGenerator.sol -o contracts/dist/

3. 將智能合約輸出成go檔

~/go/bin/abigen --bin=contracts/dist/ERC20ByteCodeGenerator.bin --abi=contracts/dist/ERC20ByteCodeGenerator.abi --pkg=token --out=contracts/dist/ERC20Token.go 

P.S.

solc 透過這樣裝

brew update
brew tap ethereum/ethereum
brew install solidity

abigen則是

go get -u github.com/ethereum/go-ethereum
cd $(go env GOPATH)/pkg/github.com/ethereum/go-ethereum/
make
make devtools

ethereum-relay's People

Watchers

 avatar

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.