deploy_beacon_proxy
Documentation for eth_defi.lagoon.beacon_proxy.deploy_beacon_proxy function.
- deploy_beacon_proxy(web3, deployer, beacon_address, implementation_contract_abi, payload=b'', gas=500000)[source]
Deploy a new proxy contract from the beacon master contract.
Uses [OpenZeppelin beacon proxy contract deployment pattern](https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades/)
Example:
# Deploy a new vault contract using a beacon proxy contract pattern vault = deploy_beacon_proxy( web3, deployer=deployer, beacon_address=beacon_address, implementation_contract_abi="lagoon/Vault.json", )
- Parameters
web3 (web3.main.Web3) – Web3 instance
implementation_contract_abi (str) – The name of the JSON ABI file for the implementation.
payload (bytes) – Encoded constructor args.
gas – Gas limit for the deployment.
deployer (Union[eth_typing.evm.HexAddress, eth_account.signers.local.LocalAccount]) –
beacon_address (Union[eth_typing.evm.HexAddress, str]) –
- Parma beacon_address
The master copy beacon address
- Returns
Proxied contract interface
- Return type
web3.contract.contract.Contract