Skip to content

Commit

Permalink
Better Lagoon deployment test script
Browse files Browse the repository at this point in the history
  • Loading branch information
miohtama committed Jan 8, 2025
1 parent 96408b9 commit 9ed9e08
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion eth_defi/safe/deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def deploy_safe(
for a in owners:
assert type(a) == str and a.startswith("0x"), f"owners must be hex addresses, got {type(a)}"

logger.info("Deploying safe.\nOwners: %s\nThreshold: %s", owners, threshold)
logger.info("Deploying safe.\nInitial cosigner list: %s\nInitial threshold: %s", owners, threshold)
ethereum_client = create_safe_ethereum_client(web3)

owners = [Web3.to_checksum_address(a) for a in owners]
Expand Down
13 changes: 9 additions & 4 deletions scripts/lagoon/deploy-lagoon.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@

logging.basicConfig(level=logging.INFO, stream=sys.stdout)

RANDO1 = "0xa7208b5c92d4862b3f11c0047b57a00Dc304c0f8"
RANDO2 = "0xbD35322AA7c7842bfE36a8CF49d0F063bf83a100"


def main():
PRIVATE_KEY = os.environ["PRIVATE_KEY"]
Expand All @@ -36,15 +39,17 @@ def main():
deployer_wallet = HotWallet.from_private_key(PRIVATE_KEY)
deployer = deployer_wallet.account
asset_manager = deployer.address
multisig_owners = [deployer.address]
# Add some random multisig holders
multisig_owners = [deployer.address, RANDO1, RANDO2]

if SIMULATE:
print("Simulation deployment with Anvil")
anvil = fork_network_anvil(JSON_RPC_BASE, SIMULATE)
anvil = fork_network_anvil(JSON_RPC_BASE)
web3 = create_multi_provider_web3(anvil.json_rpc_url)
else:
print("Base deployment")
print("Base production deployment")
web3 = create_multi_provider_web3(JSON_RPC_BASE)

chain_id = web3.eth.chain_id

uniswap_v2 = fetch_deployment(
Expand All @@ -66,7 +71,7 @@ def main():
asset_manager=asset_manager,
parameters=parameters,
safe_owners=multisig_owners,
safe_threshold=1,
safe_threshold=len(multisig_owners) - 1,
uniswap_v2=uniswap_v2,
uniswap_v3=None,
any_asset=True,
Expand Down

0 comments on commit 9ed9e08

Please sign in to comment.