Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: set nautilus gas price via env var #3901

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions rust/chains/hyperlane-ethereum/src/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use async_trait::async_trait;
use ethers::abi::AbiEncode;
use ethers::prelude::Middleware;
use ethers_contract::builders::ContractCall;
use tracing::instrument;
use tracing::{debug, instrument};

use hyperlane_core::accumulator::incremental::IncrementalMerkle;
use hyperlane_core::accumulator::TREE_DEPTH;
Expand Down Expand Up @@ -261,6 +261,7 @@ where

/// Returns a ContractCall that processes the provided message.
/// If the provided tx_gas_limit is None, gas estimation occurs.
#[instrument]
async fn process_contract_call(
&self,
message: &HyperlaneMessage,
Expand All @@ -271,7 +272,17 @@ where
metadata.to_vec().into(),
RawHyperlaneMessage::from(message).to_vec().into(),
);
fill_tx_gas_params(tx, tx_gas_limit, self.provider.clone()).await
let mut tx = fill_tx_gas_params(tx, tx_gas_limit, self.provider.clone()).await?;
if self.domain.id() == 22222 {
if let Ok(gas_price) = std::env::var("NAUTILUS_GAS_PRICE")
.unwrap_or_default()
.parse::<U256>()
{
debug!(%gas_price, "Using custom gas price for Nautilus");
tx = tx.gas_price(gas_price);
}
}
Ok(tx)
}
}

Expand Down
10 changes: 1 addition & 9 deletions typescript/infra/config/environments/mainnet2/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -141,15 +141,7 @@ const hyperlane: RootAgentConfig = {
validators: {
docker: {
repo,
tag: 'c30f471-20240530-150953',
},
chainDockerOverrides: {
[chainMetadata.solana.name]: {
tag: 'c30f471-20240530-150953',
},
[chainMetadata.nautilus.name]: {
tag: 'c30f471-20240530-150953',
},
tag: 'aaee5f2-20240605-130143',
},
connectionType: AgentConnectionType.HttpQuorum,
chains: validatorChainConfig(Contexts.Hyperlane),
Expand Down
Loading