You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
486 B

  1. #!/bin/sh
  2. set -e
  3. gen() {
  4. local name=$1
  5. local pkg=$2
  6. local folder=$3
  7. if [ -z "$3" ]; then
  8. folder=$name
  9. fi
  10. jq .abi "${CONTRACTS}/artifacts/${pkg}.json" > /tmp/${name}.abi
  11. abigen --abi /tmp/${name}.abi --pkg=${pkg} --out=${folder}/${pkg}.go
  12. }
  13. if [ "$1" = "" ]; then
  14. echo "Usage: $0 CONTRACTS_REPO_PATH"
  15. exit 1
  16. fi
  17. CONTRACTS="$1"
  18. gen hermez Hermez
  19. gen auction HermezAuctionProtocol
  20. gen withdrawdelayer WithdrawalDelayer
  21. gen HEZ HEZ tokenHEZ