Skip to content

Commit

Permalink
Add script to confirm operator addresses for Lynx nodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Sep 26, 2023
1 parent ca7e27a commit 0ad8570
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
10 changes: 8 additions & 2 deletions deployment/constants.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
from pathlib import Path

from ape import networks, project

import deployment
from ape import networks, project

LOCAL_BLOCKCHAIN_ENVIRONMENTS = ["local"]
PRODUCTION_ENVIRONMENTS = ["mainnet", "polygon-main"]
Expand All @@ -18,3 +17,10 @@
SPECIAL_VALUE_VARIABLES = {"EMPTY_BYTES": b""}
PROXY_NAME = "TransparentUpgradeableProxy"
OZ_DEPENDENCY = project.dependencies["openzeppelin"]["4.9.1"]

LYNX_NODES = {
# staking provider -> operator
"0xb15d5a4e2be34f4be154a1b08a94ab920ffd8a41": "0x890069745E9497C6f99Db68C4588deC5669F3d3E",
"0x210eeac07542f815ebb6fd6689637d8ca2689392": "0xf48F720A2Ed237c24F5A7686543D90596bb8D44D",
"0x48C8039c32F4c6f5cb206A5911C8Ae814929C16B": "0xce057adc39dcD1b3eA28661194E8963481CC48b2",
}
20 changes: 20 additions & 0 deletions scripts/lynx/confirm_operator_addresses.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
from ape import project
from ape.cli import get_user_selected_account
from deployment.constants import ARTIFACTS_DIR, LYNX_NODES
from deployment.registry import contracts_from_registry

ROOT_REGISTRY_FILEPATH = ARTIFACTS_DIR / "lynx" / "lynx-alpha-13-root-registry.json"


def main():
"""
Confirm lynx operator addresses on the Goerli side of the bridge
ape run lynx confirm_operator_addresses --network ethereum:goerli:infura
"""

deployer_account = get_user_selected_account()
deployments = contracts_from_registry(filepath=ROOT_REGISTRY_FILEPATH)
mock_polygon_root = deployments[project.MockPolygonRoot.contract_type.name]
for _, operator in LYNX_NODES.items():
mock_polygon_root.confirmOperatorAddress(operator, sender=deployer_account)

0 comments on commit 0ad8570

Please sign in to comment.