Back to Union

`build-evm-deployer-tx`

tools/build-evm-deployer-tx/README.md

396-update-release-pipeline-after-unionpd-galoisd-rename1.8 KB
Original Source

build-evm-deployer-tx

Build and sign the raw, pre-EIP-155 transaction for deploying the EVM deployer bytecode.

cast does not allow for signing a transaction without providing a chain id (EIP-155). However, to create a transaction that can be submitted on many chains, the chain id cannot be included.

This tool exists only to fill the gaps in cast's functionality, and is intended to be used alongside cast.

Usage

sh
SIG_HASH="$(nix run .#build-evm-deployer-tx -- signature-hash)"
# the wallet will need to be threaded to cast here (see `cast wallet address --help` for more information)
SIG="$(cast wallet sign --no-hash "$SIG_HASH")"
nix run .#build-evm-deployer-tx -- raw-tx "$SIG"

The generated transaction can then be used with cast publish.

Verification

The following source files are used for deployment:

The compiled ABI can be found at ./abi.json.

Compiler settings:

  • Compiler version v0.8.27
  • Optimizer enabled
  • Optimizer runs: 1000
  • Via IR: true
  • EVM Version cancun

An example verified deployment can be found here, deployed using this key.

Further Reading

This pre-EIP-155 transaction for multi-chain deployments is inspired by the deployment for multicall3.