From c269507fce4fa7a4d122e4cb7b834c457024a8e9 Mon Sep 17 00:00:00 2001 From: Hai | Kreate Date: Tue, 8 Aug 2023 15:10:41 +0700 Subject: [PATCH] feat: add paid lovelace to TxOutcome --- rust/Cargo.lock | 4 ++-- rust/chains/hyperlane-cardano/Cargo.toml | 2 +- rust/chains/hyperlane-cardano/src/mailbox.rs | 7 ++++--- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 79ef17701a..b2afa8404a 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -3014,9 +3014,9 @@ dependencies = [ [[package]] name = "hyperlane-cardano-rpc-rust-client" -version = "1.0.8" +version = "1.0.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658a6f309fa426bc5ce4487e65c77ff0ae9c736a0c23a7f0437ee6d132b2fc3e" +checksum = "c08f5df4bd5caa7ecea92cd1baa08114bd454cc26b37bb183235e914be12266c" dependencies = [ "reqwest", "serde", diff --git a/rust/chains/hyperlane-cardano/Cargo.toml b/rust/chains/hyperlane-cardano/Cargo.toml index a70da6b306..dc733f4d11 100644 --- a/rust/chains/hyperlane-cardano/Cargo.toml +++ b/rust/chains/hyperlane-cardano/Cargo.toml @@ -15,4 +15,4 @@ hex = "0.4.3" tracing = { workspace = true } reqwest = { workspace = true } tokio = { workspace = true, features = ["macros"] } -hyperlane-cardano-rpc-rust-client = "1.0.8" +hyperlane-cardano-rpc-rust-client = "1.0.9" diff --git a/rust/chains/hyperlane-cardano/src/mailbox.rs b/rust/chains/hyperlane-cardano/src/mailbox.rs index 2b5f378625..b2db202da0 100644 --- a/rust/chains/hyperlane-cardano/src/mailbox.rs +++ b/rust/chains/hyperlane-cardano/src/mailbox.rs @@ -158,9 +158,9 @@ impl Mailbox for CardanoMailbox { Ok(TxOutcome { txid: H256::from_str(res.tx_id.as_str()).unwrap(), executed: true, - // TODO[cardano]: Complete these - gas_used: U256::zero(), - gas_price: U256::zero(), + gas_used: U256::from(res.fee_lovelace), + // NOTE: There's no "dynamic" gas price on Cardano + gas_price: U256::from(res.fee_lovelace), }) } @@ -177,6 +177,7 @@ impl Mailbox for CardanoMailbox { let fee_lovelace = res.fee_lovelace as u32; Ok(TxCostEstimate { gas_limit: U256::from(fee_lovelace), + // NOTE: There's no "dynamic" gas price on Cardano gas_price: U256::from(fee_lovelace), l2_gas_limit: None, })