Skip to content

Commit

Permalink
feat: add paid lovelace to TxOutcome
Browse files Browse the repository at this point in the history
  • Loading branch information
hai-kreate authored and serejke committed Aug 8, 2023
1 parent 97f1ac6 commit c269507
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
4 changes: 2 additions & 2 deletions rust/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion rust/chains/hyperlane-cardano/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
7 changes: 4 additions & 3 deletions rust/chains/hyperlane-cardano/src/mailbox.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
}

Expand All @@ -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,
})
Expand Down

0 comments on commit c269507

Please sign in to comment.