github.com/vchain-us/vcn@v0.9.11-0.20210921212052-a2484d23c0b3/BUILD-smart-contracts.md (about) 1 ## Generating smart contracts on linux 2 3 Clone https://github.com/ethereum/go-ethereum and compile `abigen` command in ./cmd/abigen 4 5 Download solc at https://github.com/ethereum/solidity/releases?after=v-1.5.0 and chmod +x on it and copy in /usr/bin 6 solc version must be: 7 ```bash 8 solc --version 9 solc, the solidity compiler commandline interface 10 Version: -1.4.24+commit.e67f0147.Linux.g++ 11 ``` 12 13 Place at the root of the contracts repo and generate go files with: 14 ``` 15 abigen --sol organisations/contracts/OrganisationsRelay.sol --pkg blockchain --out organisationsrelay.go 16 abigen --sol assets/contracts/AssetsRelay.sol --pkg blockchain --out assetsrelay.go 17 ``` 18 19 ## Cross-compiling for various platforms 20 21 The C libraries of [go-ethereum](https://github.com/ethereum/go-ethereum) make a more sophisticated cross-compilation 22 necessary. 23 The `make dist` target takes care of all steps by using [xgo](https://github.com/techknowlogick/xgo) and [docker](https://github.com/docker).