Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions ape-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,13 @@ foundry:
amoy:
upstream_provider: infura
cache: false
base:
mainnet:
upstream_provider: infura
cache: false
sepolia:
upstream_provider: infura
cache: false

etherscan:
ethereum:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
deployment:
name: lynx-redeploy-multisig-factory-base
chain_id: 84532 # base

artifacts:
dir: ./deployment/artifacts/
filename: lynx-redeploy-multisig-factory-base.json

constants:
SIGNING_COORDINATOR_CHILD: "0xcc537b292d142dABe2424277596d8FFCC3e6A12D"

contracts:
- ThresholdSigningMultisig
- ThresholdSigningMultisigCloneFactory:
constructor:
_implementation: $ThresholdSigningMultisig
_signingCoordinatorChild: $SIGNING_COORDINATOR_CHILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
deployment:
name: lynx-redeploy-multisig-factory-root
chain_id: 11155111 # sepolia

artifacts:
dir: ./deployment/artifacts/
filename: lynx-redeploy-multisig-factory-root.json

constants:
SIGNING_COORDINATOR_CHILD: "0xC3085b0feB8C348D0BD7fabF4299c93dc2aE11d7"

contracts:
- ThresholdSigningMultisig
- ThresholdSigningMultisigCloneFactory:
constructor:
_implementation: $ThresholdSigningMultisig
_signingCoordinatorChild: $SIGNING_COORDINATOR_CHILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
deployment:
name: redeploy-multisig-factory-base
chain_id: 8453 # base

artifacts:
dir: ./deployment/artifacts/
filename: redeploy-multisig-factory-base.json

constants:
SIGNING_COORDINATOR_CHILD: "0xdecd7F2056fb1653300fc2Ba1CbFe6203E731Ad3"

contracts:
- ThresholdSigningMultisig
- ThresholdSigningMultisigCloneFactory:
constructor:
_implementation: $ThresholdSigningMultisig
_signingCoordinatorChild: $SIGNING_COORDINATOR_CHILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
deployment:
name: redeploy-multisig-factory-root
chain_id: 1 # Ethereum Mainnet

artifacts:
dir: ./deployment/artifacts/
filename: redeploy-multisig-factory-root.json

constants:
SIGNING_COORDINATOR_CHILD: "0x8543A95262AfAB66ebA77d6C23d9db9e53Ea6E1A"

contracts:
- ThresholdSigningMultisig
- ThresholdSigningMultisigCloneFactory:
constructor:
_implementation: $ThresholdSigningMultisig
_signingCoordinatorChild: $SIGNING_COORDINATOR_CHILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
deployment:
name: mainnet-upgrade-signing-coordinator
chain_id: 1 # Ethereum

artifacts:
dir: ./deployment/artifacts/
filename: mainnet-upgrade-signing-coordinator.json

constants:
TACO_APPLICATION: "0x347CC7ede7e5517bD47D20620B2CF1b406edcF07"

contracts:
- SigningCoordinator:
constructor:
_application: $TACO_APPLICATION
2 changes: 1 addition & 1 deletion scripts/lynx/upgrade_signing_coordinator.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def main():
"""This script upgrades SigningCoordinator on Lynx/Sepolia."""

deployer = Deployer.from_yaml(filepath=CONSTRUCTOR_PARAMS_FILEPATH, verify=VERIFY)
instances = contracts_from_registry(filepath=ARTIFACTS_DIR / "lynx.json", chain_id=11155111)
instances = contracts_from_registry(filepath=LYNX_REGISTRY, chain_id=11155111)
signing_coordinator = deployer.upgrade(
project.SigningCoordinator, instances[project.SigningCoordinator.contract_type.name].address
)
Expand Down
31 changes: 31 additions & 0 deletions scripts/mainnet/upgrade_signing_coordinator.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/python3

from ape import project

from deployment.constants import ARTIFACTS_DIR, CONSTRUCTOR_PARAMS_DIR
from deployment.params import Deployer
from deployment.registry import contracts_from_registry, merge_registries

VERIFY = False
CONSTRUCTOR_PARAMS_FILEPATH = CONSTRUCTOR_PARAMS_DIR / "mainnet" / "upgrade-signing-coordinator.yml"
MAINNET_REGISTRY = ARTIFACTS_DIR / "mainnet.json"


def main():
"""This script upgrades SigningCoordinator on Mainnet/Ethereum."""
deployer = Deployer.from_yaml(filepath=CONSTRUCTOR_PARAMS_FILEPATH, verify=VERIFY)
instances = contracts_from_registry(filepath=MAINNET_REGISTRY, chain_id=1)
signing_coordinator = deployer.upgrade(
project.SigningCoordinator, instances[project.SigningCoordinator.contract_type.name].address
)

deployments = [
signing_coordinator,
]

deployer.finalize(deployments=deployments)
merge_registries(
registry_1_filepath=MAINNET_REGISTRY,
registry_2_filepath=deployer.registry_filepath,
output_filepath=MAINNET_REGISTRY,
)
71 changes: 71 additions & 0 deletions scripts/redeploy_multisig_factory.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
#!/usr/bin/python3
from pathlib import Path

import click
from ape import project
from ape.cli import ConnectedProviderCommand, network_option

from deployment.constants import ARTIFACTS_DIR, SUPPORTED_TACO_DOMAINS
from deployment.params import Deployer
from deployment.registry import contracts_from_registry, merge_registries

VERIFY = False


@click.command(cls=ConnectedProviderCommand)
@network_option(required=True)
@click.option(
"--constructor-params-filepath",
"-f",
type=click.Path(dir_okay=False, exists=True, path_type=Path),
help="Constructor params filepath",
required=True,
)
@click.option(
"--domain",
"-d",
help="TACo domain",
type=click.Choice(SUPPORTED_TACO_DOMAINS),
required=True,
)
def cli(network, constructor_params_filepath, domain):
"""
This script updates the MultisigFactory contract used by SigningCoordinatorChild.
It can be reused for different chains by providing the relevant constructor params
file and domain values.
"""
deployer = Deployer.from_yaml(filepath=constructor_params_filepath, verify=VERIFY)
registry_filepath = ARTIFACTS_DIR / f"{domain}.json"
chain_id = deployer.config["deployment"]["chain_id"]

instances = contracts_from_registry(filepath=registry_filepath, chain_id=chain_id)
signing_coordinator_child = instances[project.SigningCoordinatorChild.contract_type.name]

assert signing_coordinator_child.address == deployer.constants.SIGNING_COORDINATOR_CHILD, (
f"Incorrect child contract address; expected {signing_coordinator_child.address} "
f"but got {deployer.constants.SIGNING_COORDINATOR_CHILD}"
)

_ = deployer.deploy(project.ThresholdSigningMultisig)
signing_multisig_clone_factory = deployer.deploy(project.ThresholdSigningMultisigCloneFactory)

# set updated multisig factory
deployer.transact(
signing_coordinator_child.setMultisigFactory,
signing_multisig_clone_factory.address,
)

deployments = [
signing_multisig_clone_factory,
]
deployer.finalize(deployments=deployments)

merge_registries(
registry_1_filepath=registry_filepath,
registry_2_filepath=deployer.registry_filepath,
output_filepath=registry_filepath,
)


if __name__ == "__main__":
cli()
Loading