diff --git a/nitro-bridge-setup/README.md b/nitro-bridge-setup/README.md index 345fce1..beb7674 100644 --- a/nitro-bridge-setup/README.md +++ b/nitro-bridge-setup/README.md @@ -27,6 +27,9 @@ The following commands have to be executed in the [`nitro-bridge-setup`](./) dir # This account should have tokens for funding Nitro channels nitro_chain_pk: "" + # Specifies the block number to start looking for nitro adjudicator events + nitro_chain_start_block: "" + # Custom L2 token to be deployed token_name: "LaconicNetworkToken" token_symbol: "LNT" diff --git a/nitro-bridge-setup/bridge-vars.example.yml b/nitro-bridge-setup/bridge-vars.example.yml index bf55c4e..a7a906b 100644 --- a/nitro-bridge-setup/bridge-vars.example.yml +++ b/nitro-bridge-setup/bridge-vars.example.yml @@ -1,5 +1,6 @@ nitro_chain_url: "" nitro_chain_pk: "" +nitro_chain_start_block: 0 nitro_sc_pk: "" na_address: "" vpa_address: "" diff --git a/nitro-bridge-setup/templates/specs/bridge-nitro-spec.yml.j2 b/nitro-bridge-setup/templates/specs/bridge-nitro-spec.yml.j2 index 58eaff2..ffdf553 100644 --- a/nitro-bridge-setup/templates/specs/bridge-nitro-spec.yml.j2 +++ b/nitro-bridge-setup/templates/specs/bridge-nitro-spec.yml.j2 @@ -3,6 +3,7 @@ deploy-to: compose config: NITRO_CHAIN_URL: {{ nitro_chain_url }} NITRO_CHAIN_PK: {{ nitro_chain_pk }} + NITRO_CHAIN_START_BLOCK: {{ nitro_chain_start_block }} NITRO_SC_PK: {{ nitro_sc_pk }} NA_ADDRESS: "{{ na_address }}" VPA_ADDRESS: "{{ vpa_address }}" diff --git a/nitro-contracts-setup/deploy-contracts.yml b/nitro-contracts-setup/deploy-contracts.yml index e68caaa..e8b4385 100644 --- a/nitro-contracts-setup/deploy-contracts.yml +++ b/nitro-contracts-setup/deploy-contracts.yml @@ -100,3 +100,11 @@ register: asset_address - debug: msg: "ASSET_ADDRESS: {{ asset_address.stdout }}" + + - name: Export NITRO_CHAIN_START_BLOCK + shell: laconic-so deployment --dir nitro-contracts-deployment exec nitro-contracts "jq '.receipt.blockNumber' /app/deployment/hardhat-deployments/geth/NitroAdjudicator.json" + args: + chdir: "{{ nitro_directory }}" + register: nitro_chain_start_block + - debug: + msg: "NITRO_CHAIN_START_BLOCK: {{ nitro_chain_start_block.stdout }}" \ No newline at end of file diff --git a/nitro-nodes-setup/README.md b/nitro-nodes-setup/README.md index fd2de53..2c3f37b 100644 --- a/nitro-nodes-setup/README.md +++ b/nitro-nodes-setup/README.md @@ -34,6 +34,9 @@ The following commands have to be executed in [`nitro-nodes-setup`](./) director # Private key of the account on chain that is used for funding channels in Nitro node nitro_chain_pk: "" + # Specifies the block number to start looking for nitro adjudicator events + nitro_chain_start_block: "" + # Contract address of NitroAdjudicator na_address: "" diff --git a/nitro-nodes-setup/nitro-vars.example.yml b/nitro-nodes-setup/nitro-vars.example.yml index 1ff9bc9..cf6c589 100644 --- a/nitro-nodes-setup/nitro-vars.example.yml +++ b/nitro-nodes-setup/nitro-vars.example.yml @@ -1,6 +1,7 @@ nitro_chain_url: "" nitro_sc_pk: "" nitro_chain_pk: "" +nitro_chain_start_block: 0 na_address: "" vpa_address: "" ca_address: "" diff --git a/nitro-nodes-setup/templates/configs/l1-nitro-config.env.j2 b/nitro-nodes-setup/templates/configs/l1-nitro-config.env.j2 index e8cd934..a875f68 100644 --- a/nitro-nodes-setup/templates/configs/l1-nitro-config.env.j2 +++ b/nitro-nodes-setup/templates/configs/l1-nitro-config.env.j2 @@ -6,3 +6,4 @@ VPA_ADDRESS="{{ vpa_address }}" CA_ADDRESS="{{ ca_address }}" NITRO_BOOTPEERS={{ nitro_l1_bridge_multiaddr }} NITRO_EXT_MULTIADDR={{ nitro_l1_ext_multiaddr }} +NITRO_CHAIN_START_BLOCK: {{ nitro_chain_start_block }}