diff --git a/contracts/scripts/core/DeployCore.s.sol b/contracts/scripts/core/DeployCore.s.sol index de725ad8e..40dec1f62 100644 --- a/contracts/scripts/core/DeployCore.s.sol +++ b/contracts/scripts/core/DeployCore.s.sol @@ -15,6 +15,12 @@ import {BlockTracker} from "../../contracts/core/BlockTracker.sol"; import {console} from "forge-std/console.sol"; contract DeployTestnet is Script { + + // Amount of ETH required to fund the Oracle contract. + uint256 public constant ORACLE_FUNDING = 1000 ether; + + error FailedToSendETHToOracle(address addr); + function run() external { require(block.chainid == 17864, "chainID not 17864 (testnet env)"); vm.startBroadcast(); @@ -102,6 +108,9 @@ contract DeployTestnet is Script { preconfManager.updateOracleContract(address(oracle)); console.log("_PreconfManagerWithOracle:", address(oracle)); + (bool success, ) = payable(oracleKeystoreAddress).call{value: ORACLE_FUNDING}(""); + require(success, FailedToSendETHToOracle(oracleKeystoreAddress)); + vm.stopBroadcast(); } } diff --git a/contracts/scripts/standard-bridge/DeployStandardBridge.s.sol b/contracts/scripts/standard-bridge/DeployStandardBridge.s.sol index 8ee9769e7..9daffd2d0 100644 --- a/contracts/scripts/standard-bridge/DeployStandardBridge.s.sol +++ b/contracts/scripts/standard-bridge/DeployStandardBridge.s.sol @@ -14,7 +14,7 @@ import {console} from "forge-std/console.sol"; contract BridgeBase is Script { // Amount of ETH which must be allocated only to the contract deployer on mev-commit chain genesis. - uint256 public constant DEPLOYER_GENESIS_ALLOCATION = type(uint256).max - 10 ether; + uint256 public constant DEPLOYER_GENESIS_ALLOCATION = type(uint256).max - 2000 ether; // Amount of ETH to initially fund the relayer account on both chains. uint256 public constant RELAYER_INITIAL_FUNDING = 1 ether; @@ -23,7 +23,7 @@ contract BridgeBase is Script { // AND initially fund the relayer, all on mev-commit chain. // This amount of ETH must be initially locked in the L1 gateway contract to ensure a 1:1 peg // between mev-commit chain ETH and L1 ETH. - uint256 public constant MEV_COMMIT_CHAIN_SETUP_COST = 1 ether + RELAYER_INITIAL_FUNDING; + uint256 public constant MEV_COMMIT_CHAIN_SETUP_COST = 10000 ether + RELAYER_INITIAL_FUNDING; // Amount of ETH required on L1 to initialize the L1 gateway, make transfer calls, and initially fund the relayer on L1. uint256 public constant L1_SETUP_COST = 1 ether + RELAYER_INITIAL_FUNDING; diff --git a/infrastructure/nomad/playbooks/deploy.yml b/infrastructure/nomad/playbooks/deploy.yml index ef6a7c52d..dd7e2c679 100644 --- a/infrastructure/nomad/playbooks/deploy.yml +++ b/infrastructure/nomad/playbooks/deploy.yml @@ -495,7 +495,7 @@ echo "${ALLOC}" | jq --arg address "0x${ADDRESS}" ' . + { ($address): { - "balance": "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFD4A51000FDA0FFFF" + "balance": "0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF" } } ' diff --git a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 index a86b629bf..714162bff 100644 --- a/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 +++ b/infrastructure/nomad/playbooks/templates/jobs/mev-commit-funder.nomad.j2 @@ -37,8 +37,8 @@ job "{{ job.name }}" { {%- raw %} XDG_CONFIG_HOME="local/.config" KEYSTORE_PATH="/local/data-{{ env "NOMAD_ALLOC_INDEX" }}/keystore" - KEYSTORE_FILENAME="{{ with secret "secret/data/mev-commit" }}{{ .Data.data.{% endraw %}{{ job.target.artifacts | selectattr('keystores', 'defined') | map(attribute='keystores') | first | list | first }}{% raw %}_filename }}{{ end }}" - KEYSTORE_PASSWORD="{{ with secret "secret/data/mev-commit" }}{{ .Data.data.{% endraw %}{{ job.target.artifacts | selectattr('keystores', 'defined') | map(attribute='keystores') | first | list | first }}{% raw %}_password }}{{ end }}" + KEYSTORE_FILENAME="{{ with secret "secret/data/mev-commit" }}{{ .Data.data.contract_deployer_keystore_filename }}{{ end }}" + KEYSTORE_PASSWORD="{{ with secret "secret/data/mev-commit" }}{{ .Data.data.contract_deployer_keystore_password }}{{ end }}" {% endraw %} EOH destination = "secrets/.env" @@ -68,19 +68,21 @@ job "{{ job.name }}" { mkdir -p "${KEYSTORE_PATH}" > /dev/null 2>&1 {{- with secret "secret/data/mev-commit" }} KEYSTORE_FILE="${KEYSTORE_PATH}/${KEYSTORE_FILENAME}" - echo '{{ .Data.data.{% endraw %}{{ job.target.artifacts | selectattr('keystores', 'defined') | map(attribute='keystores') | first | list | first }}{% raw %} }}' > "${KEYSTORE_FILE}" + echo '{{ .Data.data.contract_deployer_keystore }}' > "${KEYSTORE_FILE}" {{ end }} {{- range nomadService "{% endraw %}{{ job.target.name }}{% raw %}" }} + {{- if contains "http" .Tags }} + ADDRESS=$(curl -sk https://{{ .Address }}:{{ .Port }}/v1/debug/topology | jq -r '.topology.self["Ethereum Address"]') + {{- end }} {{- range nomadService "mev-commit-geth-bootnode1" }} {{- if contains "http" .Tags }} - ADDRESS=$(cat "${KEYSTORE_FILE}" | jq -r '.address') cast send \ --keystore "${KEYSTORE_FILE}" \ --password "${KEYSTORE_PASSWORD}" \ --priority-gas-price 2000000000 \ --gas-price 5000000000 \ - --value 1000ether \ + --value 10ether \ --rpc-url http://{{ .Address }}:{{ .Port }} \ "${ADDRESS}" diff --git a/infrastructure/nomad/playbooks/variables/profiles.yml b/infrastructure/nomad/playbooks/variables/profiles.yml index a10270009..b930baf29 100644 --- a/infrastructure/nomad/playbooks/variables/profiles.yml +++ b/infrastructure/nomad/playbooks/variables/profiles.yml @@ -81,7 +81,6 @@ jobs: name: geth_signer_node1_nodekey - keystores: geth_signer1_keystore: - allocation: true count: 1 ports: - metrics: @@ -155,7 +154,6 @@ jobs: contract_deployer_keystore: allocation: true bridge_relayer_keystore: - allocation: true count: 1 ports: - http: @@ -186,7 +184,6 @@ jobs: - *p2p_artifact - keystores: bootnode1_keystore: - allocation: false count: 1 ports: - metrics: @@ -213,7 +210,6 @@ jobs: - *p2p_artifact - keystores: provider1_keystore: - allocation: true count: 1 ports: - metrics: @@ -240,7 +236,6 @@ jobs: - *p2p_artifact - keystores: provider2_keystore: - allocation: true count: 1 ports: - metrics: @@ -266,7 +261,6 @@ jobs: - *p2p_artifact - keystores: provider3_keystore: - allocation: true count: 1 ports: - metrics: @@ -342,7 +336,6 @@ jobs: - *p2p_artifact - keystores: bidder1_keystore: - allocation: true count: 1 ports: - metrics: @@ -368,7 +361,6 @@ jobs: - *p2p_artifact - keystores: bidder2_keystore: - allocation: true count: 1 ports: - metrics: @@ -393,7 +385,6 @@ jobs: - *p2p_artifact - keystores: bidder3_keystore: - allocation: true count: 1 ports: - metrics: @@ -418,7 +409,6 @@ jobs: - *p2p_artifact - keystores: bidder4_keystore: - allocation: true count: 1 ports: - metrics: @@ -443,7 +433,6 @@ jobs: - *p2p_artifact - keystores: bidder5_keystore: - allocation: true count: 1 ports: - metrics: @@ -533,7 +522,6 @@ jobs: name: oracle_register_provider_api_auth_token - keystores: oracle_keystore: - allocation: true dependencies: contracts_deployer: *contracts_deployer_job count: 1 @@ -571,7 +559,6 @@ jobs: artifacts: - keystores: faucet_keystore: - allocation: true count: 1 ports: - http: @@ -624,11 +611,8 @@ jobs: - *l1_transactor_artifact - keystores: l1_transactor_account1_keystore: - allocation: true l1_transactor_account2_keystore: - allocation: true l1_transactor_account3_keystore: - allocation: true dependencies: mock_l1: *mock_l1_job env: @@ -641,11 +625,8 @@ jobs: - *bridge_v1_artifact - keystores: bridge_emulator_account1_keystore: - allocation: true bridge_emulator_account2_keystore: - allocation: true bridge_emulator_account3_keystore: - allocation: true dependencies: contracts_deployer: *contracts_deployer_job count: 1