chore: use GasOracle before the GasEscalator middleware

dan/gas-escalator-middleware
Daniel Savu 2 weeks ago
parent ba6df0cf15
commit 2cd101010b
No known key found for this signature in database
GPG Key ID: 795E587829AF7E08
  1. 20
      rust/main/Cargo.lock
  2. 10
      rust/main/Cargo.toml
  3. 6
      rust/main/chains/hyperlane-ethereum/src/rpc_clients/trait_builder.rs

20
rust/main/Cargo.lock generated

@ -2900,7 +2900,7 @@ dependencies = [
[[package]]
name = "ethers"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"ethers-addressbook",
"ethers-contract",
@ -2914,7 +2914,7 @@ dependencies = [
[[package]]
name = "ethers-addressbook"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"ethers-core",
"once_cell",
@ -2925,7 +2925,7 @@ dependencies = [
[[package]]
name = "ethers-contract"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"ethers-contract-abigen",
"ethers-contract-derive",
@ -2943,7 +2943,7 @@ dependencies = [
[[package]]
name = "ethers-contract-abigen"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"Inflector",
"cfg-if",
@ -2967,7 +2967,7 @@ dependencies = [
[[package]]
name = "ethers-contract-derive"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"ethers-contract-abigen",
"ethers-core",
@ -2981,7 +2981,7 @@ dependencies = [
[[package]]
name = "ethers-core"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"arrayvec",
"bytes",
@ -3011,7 +3011,7 @@ dependencies = [
[[package]]
name = "ethers-etherscan"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"ethers-core",
"getrandom 0.2.15",
@ -3027,7 +3027,7 @@ dependencies = [
[[package]]
name = "ethers-middleware"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"async-trait",
"auto_impl 0.5.0",
@ -3075,7 +3075,7 @@ dependencies = [
[[package]]
name = "ethers-providers"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"async-trait",
"auto_impl 1.2.0",
@ -3111,7 +3111,7 @@ dependencies = [
[[package]]
name = "ethers-signers"
version = "1.0.2"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-07-2#eab0225acb793161a4aa28af5e875791ca40be92"
source = "git+https://github.com/hyperlane-xyz/ethers-rs?tag=2024-11-08#0773c2af5eeec3394c24f8271d7680b7a5855e98"
dependencies = [
"async-trait",
"coins-bip32 0.7.0",

@ -211,27 +211,27 @@ overflow-checks = true
[workspace.dependencies.ethers]
features = []
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-11-07-2"
tag = "2024-11-08"
[workspace.dependencies.ethers-contract]
features = ["legacy"]
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-11-07-2"
tag = "2024-11-08"
[workspace.dependencies.ethers-core]
features = []
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-11-07-2"
tag = "2024-11-08"
[workspace.dependencies.ethers-providers]
features = []
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-11-07-2"
tag = "2024-11-08"
[workspace.dependencies.ethers-signers]
features = ["aws"]
git = "https://github.com/hyperlane-xyz/ethers-rs"
tag = "2024-11-07-2"
tag = "2024-11-08"
[patch.crates-io.curve25519-dalek]
branch = "v3.2.2-relax-zeroize"

@ -198,8 +198,7 @@ pub trait BuildableWithProvider {
where
P: JsonRpcClient + 'static,
{
let provider = wrap_with_gas_oracle(Provider::new(client), locator.domain)?;
self.build_with_signer(provider, conn, locator, signer)
self.build_with_signer(Provider::new(client), conn, locator, signer)
.await
}
@ -223,8 +222,9 @@ pub trait BuildableWithProvider {
.await
.map_err(ChainCommunicationError::from_other)?;
let gas_escalator_provider = wrap_with_gas_escalator(signing_provider);
let gas_oracle_provider = wrap_with_gas_oracle(gas_escalator_provider, locator.domain)?;
let nonce_manager_provider =
wrap_with_nonce_manager(gas_escalator_provider, signer.address())
wrap_with_nonce_manager(gas_oracle_provider, signer.address())
.await
.map_err(ChainCommunicationError::from_other)?;

Loading…
Cancel
Save