Skip to content

Commit

Permalink
chore: get rid of contracts hardcode
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikelle committed May 15, 2024
1 parent 290f0f8 commit 47e8d3a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 36 deletions.
10 changes: 5 additions & 5 deletions contracts-abi/config/testnet.go
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
4 changes: 0 additions & 4 deletions infrastructure/nomad/templates/nomad/mev-commit.nomad.j2
Original file line number Diff line number Diff line change
Expand Up @@ -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 %}
Expand Down
22 changes: 0 additions & 22 deletions infrastructure/nomad/vars.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
Expand All @@ -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
Expand Down

0 comments on commit 47e8d3a

Please sign in to comment.