Documentation ¶
Index ¶
- Constants
- Variables
- func CastCall(contractAddress superchain.Address, calldata string, args []string, ...) ([]string, error)
- func CheckGasLimit(chain *superchain.ChainConfig, l1Client *ethclient.Client, ...) error
- func GetBytecodeHash(ctx context.Context, chainID uint64, contractName string, ...) (string, error)
- func GetContractVersion(ctx context.Context, addr common.Address, client *ethclient.Client) (string, error)
- func Retry[S, T any](fn func(S) (T, error)) func(S) (T, error)
- type BytecodeAndImmutableReferences
- type ImmutableReference
Constants ¶
View Source
const DefaultMaxRetries = 3
Variables ¶
View Source
var ( ErrChainIdNotListed = errors.New("chain ID is not listed at chainid.network") ErrLocalChainNameMismatch = errors.New("local chain name does not match name from chainid.network") ErrChainIdDuplicated = errors.New("chain ID is duplicated") ErrChainNameDuplicated = errors.New("chain name duplicated") ErrChainPublicRpcNotListed = errors.New("chain public RPC not listed in chainid.network") )
Functions ¶
func CheckGasLimit ¶
func CheckGasLimit(chain *superchain.ChainConfig, l1Client *ethclient.Client, getGasLimitOverride *getGasLimitFunc) error
func GetBytecodeHash ¶
func GetBytecodeHash(ctx context.Context, chainID uint64, contractName string, targetContractAddr common.Address, client *ethclient.Client, tag standard.Tag) (string, error)
GetBytecodeHash gets the hash of the bytecode of a contract
- at a given address, if the contract is not a proxy contract
- at the proxy implementation contract's address, if the contract is a proxy contract (we currently use the name suffix to determine whether the contract is a proxy or not)
Types ¶
type BytecodeAndImmutableReferences ¶
type BytecodeAndImmutableReferences struct { Bytecode []byte `json:"object"` ImmutableReferences map[string][]ImmutableReference `json:"immutableReferences"` }
Define a struct to represent the structure of the JSON data
type ImmutableReference ¶
ImmutableReference to store the start/length of a contract's immutable references. Immutables are directly assigned values once or are initialized in a constructor. They are encoded in the contract bytecode, and the AST that is generated by the compiler has info about the offset & length within the bytecode.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.