2021-01-23 09:20:17 -08:00
|
|
|
#!/usr/bin/env bash
|
2021-08-26 01:35:09 -07:00
|
|
|
# Regenerate node/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
|
2022-08-26 09:35:22 -07:00
|
|
|
docker build -t localhost/wormhole-foundation/wormhole-abigen:latest .
|
2020-08-17 14:01:59 -07:00
|
|
|
)
|
|
|
|
|
2020-11-28 13:11:48 -08:00
|
|
|
function gen() {
|
|
|
|
local name=$1
|
|
|
|
local pkg=$2
|
2020-08-17 14:01:59 -07:00
|
|
|
|
2022-04-28 09:20:38 -07:00
|
|
|
kubectl exec -c tests eth-devnet-0 -- npx truffle@5.4.1 run abigen $name
|
2020-11-28 13:11:48 -08:00
|
|
|
|
|
|
|
kubectl exec -c tests eth-devnet-0 -- cat abigenBindings/abi/${name}.abi | \
|
2022-08-26 09:35:22 -07:00
|
|
|
docker run --rm -i localhost/wormhole-foundation/wormhole-abigen:latest /bin/abigen --abi - --pkg ${pkg} > \
|
2021-08-26 01:35:09 -07:00
|
|
|
node/pkg/ethereum/${pkg}/abi.go
|
2020-11-28 13:11:48 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
gen Wormhole abi
|
|
|
|
gen ERC20 erc20
|