2021-01-23 09:20:17 -08:00
|
|
|
#!/usr/bin/env bash
|
2020-08-17 14:01:59 -07:00
|
|
|
# Regenerate bridge/pkg/ethereum/abi using a running eth-devnet's state.
|
2020-11-28 13:11:48 -08:00
|
|
|
set -euo pipefail
|
2020-08-17 14:01:59 -07:00
|
|
|
|
|
|
|
(
|
|
|
|
cd third_party/abigen
|
|
|
|
docker build -t localhost/certusone/wormhole-abigen:latest .
|
|
|
|
)
|
|
|
|
|
2020-11-28 13:11:48 -08:00
|
|
|
function gen() {
|
|
|
|
local name=$1
|
|
|
|
local pkg=$2
|
2020-08-17 14:01:59 -07:00
|
|
|
|
2020-11-28 13:11:48 -08:00
|
|
|
kubectl exec -c tests eth-devnet-0 -- npx truffle run abigen $name
|
|
|
|
|
|
|
|
kubectl exec -c tests eth-devnet-0 -- cat abigenBindings/abi/${name}.abi | \
|
|
|
|
docker run --rm -i localhost/certusone/wormhole-abigen:latest /bin/abigen --abi - --pkg ${pkg} > \
|
|
|
|
bridge/pkg/ethereum/${pkg}/abi.go
|
|
|
|
}
|
|
|
|
|
|
|
|
gen Wormhole abi
|
|
|
|
gen ERC20 erc20
|