- Install go:
brew install go
- Install node and yarn:
brew install node yarn
- Install ganache: https://truffleframework.com/ganache
- Install docker: https://docs.docker.com/v17.12/docker-for-mac/install
- Install gamma-cli:
brew install orbs-network/devtools/gamma-cli
- Download the project with:
go get -u github.com/orbs-network/asb2018/...
- If this fails due to access permission errors, try:
git clone git@github.com:orbs-network/asb2018.git ~/go/src/github.com/orbs-network/asb2018
cd ~/go/src/github.com/orbs-network/asb2018
go get ./...
- If this fails due to access permission errors, try:
- Open project root directory:
cd ~/go/src/github.com/orbs-network/asb2018
- Install project by running in terminal:
yarn
-
Before you start:
- Make sure ganache is running locally on port 7545
- Go over the configuration in
./ganache_test.go
- Notice for example you need to change
UserAccountOnEthereum
to one of the accounts from your ganache
- Notice for example you need to change
-
Deploying the contracts:
- Open project root directory:
cd ~/go/src/github.com/orbs-network/asb2018
- Run in terminal:
./ganache_1_deploy.sh
- After, don't forget to update configuration values in
./ganache_test.go
according to instructions
- Open project root directory:
-
Swapping from Ethereum to Orbs:
- Open project root directory:
cd ~/go/src/github.com/orbs-network/asb2018
- Run in terminal:
./ganache_2_eth_to_orbs.sh
- Open project root directory:
-
Swapping back from Orbs to Ethereum:
- Open project root directory:
cd ~/go/src/github.com/orbs-network/asb2018
- Run in terminal:
./ganache_3_orbs_to_eth.sh
- Open project root directory:
-
When you finish:
- Stop Gamma server by running:
gamma-cli stop-local
- Close ganache
- Stop Gamma server by running:
-
Before you start:
- Create an infura account and insert its endpoint URL (with token) in
truffle-config.js
- Create an Ethereum account funded with Ropsten ETH (> 2) and insert its mnemonic in
truffle-config.js
- Go over the configuration in
./ropsten_test.go
- You may want to change the Orbs contract names to avoid name collisions on test net (eg. add a number at end)
- If you don't have your own ERC20 contract, leave
EthereumErc20Address
empty until after deployment stage - Notice you need to change
UserAccountOnEthereum
to your HDWallet account fromtruffle-config.js
- If you inserted your own ERC20 contract, make sure
UserAccountOnEthereum
has enough tokens for the transfer
- Create an infura account and insert its endpoint URL (with token) in
-
Deploying the contracts:
- Open project root directory:
cd ~/go/src/github.com/orbs-network/asb2018
- Run in terminal:
./ropsten_1_deploy.sh
- Notice that contract deployments to Ropsten may be slow and appear to be stuck (they're waiting to be mined), it's normal to wait a few minutes here
- After, don't forget to update configuration values in
./ropsten_test.go
according to instructions
- Open project root directory:
-
Swapping from Ethereum to Orbs:
- Open project root directory:
cd ~/go/src/github.com/orbs-network/asb2018
- Run in terminal:
./ropsten_2_eth_to_orbs.sh
- Open project root directory:
-
Swapping back from Orbs to Ethereum:
- Open project root directory:
cd ~/go/src/github.com/orbs-network/asb2018
- Run in terminal:
./ropsten_3_orbs_to_eth.sh
- Open project root directory: