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.

See https://github.com/OpenZeppelin/openzeppelin-foundry-upgrades/blob/3a4bd0d10e945e82472b306776eb5ec272571945/src/Upgrades.sol#L295

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
Parma beacon_address

The master copy beacon address

Returns

Proxied contract interface

Return type

web3.contract.contract.Contract