diff --git a/dex/networks/eth/contracts/README.md b/dex/networks/eth/contracts/README.md index 0d2e08feee..e8b099cef8 100644 --- a/dex/networks/eth/contracts/README.md +++ b/dex/networks/eth/contracts/README.md @@ -2,11 +2,7 @@ Have `solc` and `abigen` installed on your system and run from this directory: -`abigen --sol ETHSwapV{version}.sol --pkg eth --out ../contract.go` - -To generate the runtime bytecode, run from this directory: - -`./genruntime.sh {version}` +`./updatecontract.sh {version}` ## History diff --git a/dex/networks/eth/contracts/genruntime.sh b/dex/networks/eth/contracts/genruntime.sh deleted file mode 100755 index 1d3cbd6a31..0000000000 --- a/dex/networks/eth/contracts/genruntime.sh +++ /dev/null @@ -1,32 +0,0 @@ -#!/usr/bin/env bash -# This script generates the runtime bytecoode for a solidity contract. It is used -# to compare against the runtime bytecode on chain in order to verify that the -# expected contract is deployed. - -if [ "$#" -ne 1 ] -then - echo "Usage: $0 version" >&2 - exit 1 -fi - -ETH_SWAP_VERSION=$1 -SOLIDITY_FILE=ETHSwapV${ETH_SWAP_VERSION}.sol -if [ ! -f ./${SOLIDITY_FILE} ] -then - echo "${SOLIDITY_FILE} does not exist" >&2 - exit 1 -fi - -solc --bin-runtime --optimize ${SOLIDITY_FILE} -o . -BYTECODE=$( "../BinRuntimeV${ETH_SWAP_VERSION}.go" <&2 + exit 1 +fi + +ETH_SWAP_VERSION=$1 +SOLIDITY_FILE=ETHSwapV${ETH_SWAP_VERSION}.sol +if [ ! -f ./${SOLIDITY_FILE} ] +then + echo "${SOLIDITY_FILE} does not exist" >&2 + exit 1 +fi + +solc --bin-runtime --optimize ${SOLIDITY_FILE} -o . +BYTECODE=$( "../BinRuntimeV${ETH_SWAP_VERSION}.go" <