From 47e8d3ad6c43a3ed72ef547d3fdd232bf58f2050 Mon Sep 17 00:00:00 2001 From: Mikelle Date: Wed, 15 May 2024 12:59:00 +0200 Subject: [PATCH] chore: get rid of contracts hardcode --- contracts-abi/config/testnet.go | 10 ++++----- .../nomad/mev-commit-oracle.nomad.j2 | 5 ----- .../nomad/templates/nomad/mev-commit.nomad.j2 | 4 ---- infrastructure/nomad/vars.yml | 22 ------------------- 4 files changed, 5 insertions(+), 36 deletions(-) diff --git a/contracts-abi/config/testnet.go b/contracts-abi/config/testnet.go index 553abeb3e..eb74d2c07 100644 --- a/contracts-abi/config/testnet.go +++ b/contracts-abi/config/testnet.go @@ -9,9 +9,9 @@ type Contracts struct { } var TestnetContracts = Contracts{ - BidderRegistry: "0xded9029fC3789ED393D62686c0c0f9dfA92aA2f6", - ProviderRegistry: "0xFA19327bDBf2632aAB7C77e61DC69DbC872d5AC1", - PreconfCommitmentStore: "0x1F8989fAd5f0538D794Fd9fa15d50942F305f367", - Oracle: "0x1cB85eC90320Ef25FB4F991E41392f518980e53a", - BlockTracker: "0xCB4AA84C916BB891cBF43320e0c97C3d4329Cec7", + BidderRegistry: "0x1E218818D409E0f00dfeBE8A960F7585d4fDff70", + ProviderRegistry: "0x0332388390d9df01cA3d26269f2B1Fc314deD9c0", + PreconfCommitmentStore: "0x2Aff805aBdF1Fe79AfcF8B3a9B4B45ECcD6b6D6e", + Oracle: "0x77A4FE615de28fdf0bF68D9B9ba773A32b5C7630", + BlockTracker: "0x042744D8cF66d8455350D43F9e09CA73b5C0CB94", } diff --git a/infrastructure/nomad/templates/nomad/mev-commit-oracle.nomad.j2 b/infrastructure/nomad/templates/nomad/mev-commit-oracle.nomad.j2 index 891923354..13bc48dbe 100644 --- a/infrastructure/nomad/templates/nomad/mev-commit-oracle.nomad.j2 +++ b/infrastructure/nomad/templates/nomad/mev-commit-oracle.nomad.j2 @@ -134,11 +134,6 @@ job "{{ job.name }}" { else 'service:' + job.name + '-{{ env "NOMAD_ALLOC_INDEX" }}' }}" MEV_ORACLE_LOG_LEVEL="{{ job.env.get('log-level', 'info') }}" - MEV_ORACLE_PRECONF_CONTRACT_ADDR="{{ job.env['preconf_contract_address'] }}" - MEV_ORACLE_BLOCKTRACKER_CONTRACT_ADDR="{{ job.env['blocktracker_contract_address'] }}" - MEV_ORACLE_ORACLE_CONTRACT_ADDR="{{ job.env['oracle_contract_address'] }}" - MEV_ORACLE_BIDDERREGISTRY_CONTRACT_ADDR="{{ job.env['bidder_registry_contract_address'] }}" - MEV_ORACLE_PROVIDERREGISTRY_CONTRACT_ADDR="{{ job.env['provider_registry_contract_address'] }}" MEV_ORACLE_LAGGERD_MODE="{{ job.env.get('laggerd-mode', '20') }}" MEV_ORACLE_L1_RPC_URL="{{ job.env['l1_rpc_url'] }}" {%- raw %} diff --git a/infrastructure/nomad/templates/nomad/mev-commit.nomad.j2 b/infrastructure/nomad/templates/nomad/mev-commit.nomad.j2 index 33776e16f..30ce395a0 100644 --- a/infrastructure/nomad/templates/nomad/mev-commit.nomad.j2 +++ b/infrastructure/nomad/templates/nomad/mev-commit.nomad.j2 @@ -76,10 +76,6 @@ job "{{ job.name }}" { MEV_COMMIT_P2P_ADDR="{{ job.env.get('p2p-address', '0.0.0.0') }}" MEV_COMMIT_SERVER_TLS_CERTIFICATE="{{ job.env['tls_crt_file'] }}" MEV_COMMIT_SERVER_TLS_PRIVATE_KEY="{{ job.env['tls_key_file'] }}" - MEV_COMMIT_PROVIDER_REGISTRY_ADDR="{{ job.env.get('provider_registry_contract_address') }}" - MEV_COMMIT_BIDDER_REGISTRY_ADDR="{{ job.env.get('bidder_registry_contract_address') }}" - MEV_COMMIT_PRECONF_ADDR="{{ job.env.get('preconf_contract_address') }}" - MEV_COMMIT_BLOCK_TRACKER_ADDR="{{ job.env.get('blocktracker_contract_address') }}" {% if job.env['type'] == 'provider' %} MEV_COMMIT_NAT_ADDR="{{ job.env['nat_address'] }}" {%- raw %} diff --git a/infrastructure/nomad/vars.yml b/infrastructure/nomad/vars.yml index e76747320..27cdc0306 100644 --- a/infrastructure/nomad/vars.yml +++ b/infrastructure/nomad/vars.yml @@ -7,11 +7,6 @@ server_common_name: "mev-commit_{{ env }}.mev-commit.primev.xyz" tls_crt_file: "{{ certificates_dir }}/{{ server_common_name }}.crt" tls_key_file: "{{ private_keys_dir }}/{{ server_common_name }}.key" tls_ca_crt_file: "{{ ca_certificates_dir }}/ca-{{ server_common_name }}.crt" -preconf_contract_address: "0x2Aff805aBdF1Fe79AfcF8B3a9B4B45ECcD6b6D6e" -blocktracker_contract_address: "0x042744D8cF66d8455350D43F9e09CA73b5C0CB94" -oracle_contract_address: "0x77A4FE615de28fdf0bF68D9B9ba773A32b5C7630" -bidder_registry_contract_address: "0x1E218818D409E0f00dfeBE8A960F7585d4fDff70" -provider_registry_contract_address: "0x0332388390d9df01cA3d26269f2B1Fc314deD9c0" jobs: - name: datadog-agent-logs-collector @@ -101,10 +96,6 @@ jobs: type: bootnode tls_crt_file: "{{ tls_crt_file }}" tls_key_file: "{{ tls_key_file }}" - preconf_contract_address: "{{ preconf_contract_address }}" - blocktracker_contract_address: "{{ blocktracker_contract_address }}" - bidder_registry_contract_address: "{{ bidder_registry_contract_address }}" - provider_registry_contract_address: "{{ provider_registry_contract_address }}" - name: mev-commit-provider-node1 template: mev-commit.nomad.j2 @@ -127,10 +118,6 @@ jobs: nat_address: "{{ ansible_facts['default_ipv4']['address'] }}" tls_crt_file: "{{ tls_crt_file }}" tls_key_file: "{{ tls_key_file }}" - preconf_contract_address: "{{ preconf_contract_address }}" - blocktracker_contract_address: "{{ blocktracker_contract_address }}" - bidder_registry_contract_address: "{{ bidder_registry_contract_address }}" - provider_registry_contract_address: "{{ provider_registry_contract_address }}" - name: mev-commit-provider-node1-funder template: mev-commit-funder.nomad.j2 @@ -150,11 +137,6 @@ jobs: to: 8080 env: l1_rpc_url: https://ethereum-holesky-rpc.publicnode.com - preconf_contract_address: "{{ preconf_contract_address }}" - blocktracker_contract_address: "{{ blocktracker_contract_address }}" - bidder_registry_contract_address: "{{ bidder_registry_contract_address }}" - provider_registry_contract_address: "{{ provider_registry_contract_address }}" - oracle_contract_address: "{{ oracle_contract_address }}" - name: mev-commit-bidder-node1 template: mev-commit.nomad.j2 @@ -176,10 +158,6 @@ jobs: type: bidder tls_crt_file: "{{ tls_crt_file }}" tls_key_file: "{{ tls_key_file }}" - preconf_contract_address: "{{ preconf_contract_address }}" - blocktracker_contract_address: "{{ blocktracker_contract_address }}" - bidder_registry_contract_address: "{{ bidder_registry_contract_address }}" - provider_registry_contract_address: "{{ provider_registry_contract_address }}" - name: mev-commit-bidder-node1-funder template: mev-commit-funder.nomad.j2