github.com/MetalBlockchain/subnet-evm@v0.4.9/scripts/generate_precompile.sh (about) 1 #!/usr/bin/env bash 2 set -e 3 4 # This script generates a Stateful Precompile stub based off of a Solidity ABI file. 5 # It first sets the necessary CGO_FLAGs for the BLST library used in MetalGo and 6 # then runs PrecompileGen. 7 if ! [[ "$0" =~ scripts/generate_precompile.sh ]]; then 8 echo "must be run from repository root, but got $0" 9 exit 255 10 fi 11 12 # Load the versions 13 SUBNET_EVM_PATH=$( 14 cd "$(dirname "${BASH_SOURCE[0]}")" 15 cd .. && pwd 16 ) 17 18 # Load the constants 19 source "$SUBNET_EVM_PATH"/scripts/constants.sh 20 21 go run ./cmd/precompilegen/main.go $@