generate-abi.sh 571 B

12345678910111213141516171819202122
  1. #!/bin/bash
  2. # Regenerate bridge/pkg/ethereum/abi using a running eth-devnet's state.
  3. set -euo pipefail
  4. (
  5. cd third_party/abigen
  6. docker build -t localhost/certusone/wormhole-abigen:latest .
  7. )
  8. function gen() {
  9. local name=$1
  10. local pkg=$2
  11. kubectl exec -c tests eth-devnet-0 -- npx truffle run abigen $name
  12. kubectl exec -c tests eth-devnet-0 -- cat abigenBindings/abi/${name}.abi | \
  13. docker run --rm -i localhost/certusone/wormhole-abigen:latest /bin/abigen --abi - --pkg ${pkg} > \
  14. bridge/pkg/ethereum/${pkg}/abi.go
  15. }
  16. gen Wormhole abi
  17. gen ERC20 erc20