Skip to content

Commit

Permalink
add some checks during deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
bout3fiddy committed Dec 25, 2023
1 parent 50a4d8d commit f50a4e8
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 8 deletions.
31 changes: 23 additions & 8 deletions scripts/deploy_infra.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,24 +233,39 @@ def deploy_infra(network, url, account, fork=False):

# initialise ownership addresses: this is so we can do create2
# addresses across multiple chains (where args are different)
logger.log("Instantiating ownership ...")
factory.initialise_ownership(fee_receiver, deploy_utils.FIDDYDEPLOYER)

# Set up implementation addresses in the factory.
factory.set_pool_implementation(amm_blueprint, 0)
factory.set_views_implementation(views_contract)
factory.set_math_implementation(math_contract)
if not factory.pool_implementations(0) == amm_blueprint.address:
logger.log("Setting AMM implementation ...")
factory.set_pool_implementation(amm_blueprint, 0)

if network == "ethereum:mainnet":
factory.set_gauge_implementation(deployments[network]["gauge"])
if not factory.views_implementation() == views_contract.address:
logger.log("Setting Views implementation ...")
factory.set_views_implementation(views_contract)

if not factory.math_implementation() == math_contract.address:
logger.log("Setting Math implementation ...")
factory.set_math_implementation(math_contract)

if (
network == "ethereum:mainnet"
and not factory.gauge_implementation() == deployments[network]["gauge"]
):
gauge_impl = deployments[network]["gauge"]
logger.log(f"Setting gauge implementation to {gauge_impl} ...")
factory.set_gauge_implementation(gauge_impl)

logger.log("Infra deployed!")


def main():

forkmode = True

deploy_infra(
"gnosis:mainnet",
os.environ["RPC_GNOSIS"],
"ethereum:mainnet",
os.environ["RPC_ETHEREUM"],
"FIDDYDEPLOYER",
fork=forkmode,
)
Expand Down
2 changes: 2 additions & 0 deletions scripts/deployment_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ class CurveNetworkSettings:
fee_receiver_address="0xbF7E49483881C76487b0989CD7d9A8239B20CA41", # burner
),
"base:mainnet": CurveNetworkSettings(
dao_ownership_contract="0x2c163fe0f079d138b9c04f780d735289344C8B80",
thin_proxy_contract="0xe8269B33E47761f552E1a3070119560d5fa8bBD6",
fee_receiver_address="0xe8269B33E47761f552E1a3070119560d5fa8bBD6",
),
Expand Down Expand Up @@ -111,6 +112,7 @@ class CurveNetworkSettings:
fee_receiver_address="0x98B4029CaBEf7Fd525A36B0BF8555EC1d42ec0B6",
),
"mantle:mainnet": CurveNetworkSettings(
dao_ownership_contract="0xfe87a6CDCa1EEb90987c6A196a1C5F5C76F5F2b0",
thin_proxy_contract="0xf3A431008396df8A8b2DF492C913706BDB0874ef",
fee_receiver_address="0xf3A431008396df8A8b2DF492C913706BDB0874ef",
),
Expand Down

0 comments on commit f50a4e8

Please sign in to comment.