Skip to main content

Module deploy

Module deploy 

Source
Expand description

Generic deploy and upgrade primitives, usable over any alloy Provider that has a wallet wired in. Signing is the consumer’s concern; nothing here constructs or holds keys.

Functions§

deploy_behind_proxy
Deploy an implementation from artifacts and put it behind a fresh ERC1967 proxy whose init data is init_call ABI-encoded. Returns the proxy address. The common shape of every UUPS deploy in the stack.
deploy_contract
Deploy a contract and return its address.
deploy_contract_from
Deploy a contract, optionally fetching the sender’s nonce explicitly.
deploy_proxy
Deploy an ERC1967 proxy pointing at implementation with init_data (the ABI-encoded initializer call).
deploy_with_ctor
Deploy bytecode with ABI-encoded constructor args appended.
upgrade_uups
Upgrade a UUPS proxy: deploy contract’s current implementation from artifacts, then call upgradeToAndCall(new_impl, data) on the proxy. Returns the new implementation address. data is usually empty (state is already initialized); pass a re-initializer call when the upgrade needs one.