From ef499c07ac88ef9ae603e972bd93ce2eaf90181a Mon Sep 17 00:00:00 2001 From: Hai | Kreate Date: Thu, 24 Aug 2023 21:43:15 +0700 Subject: [PATCH] feat: new cardano rpc req format --- rust/chains/hyperlane-cardano/src/rpc/mod.rs | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/rust/chains/hyperlane-cardano/src/rpc/mod.rs b/rust/chains/hyperlane-cardano/src/rpc/mod.rs index d798208359..10e501dd1f 100644 --- a/rust/chains/hyperlane-cardano/src/rpc/mod.rs +++ b/rust/chains/hyperlane-cardano/src/rpc/mod.rs @@ -123,7 +123,10 @@ impl CardanoRpc { "0x{}", parsed_metadata.origin_mailbox.encode_hex::() ), - checkpoint_root: parsed_metadata.checkpoint_root.encode_hex::(), + checkpoint_root: format!( + "0x{}", + parsed_metadata.checkpoint_root.encode_hex::() + ), checkpoint_index: parsed_metadata.checkpoint_index, message: Box::new(EstimateInboundMessageFeeRequestMessage { version: message.version as u32, @@ -132,7 +135,7 @@ impl CardanoRpc { sender: format!("0x{}", message.sender.encode_hex::()), destination_domain: message.destination, recipient: format!("0x{}", message.recipient.encode_hex::()), - message: message.body.encode_hex(), + message: format!("0x{}", message.body.encode_hex::()), }), signatures: parsed_metadata.signatures, }, @@ -154,7 +157,10 @@ impl CardanoRpc { "0x{}", parsed_metadata.origin_mailbox.encode_hex::() ), - checkpoint_root: parsed_metadata.checkpoint_root.encode_hex::(), + checkpoint_root: format!( + "0x{}", + parsed_metadata.checkpoint_root.encode_hex::() + ), checkpoint_index: parsed_metadata.checkpoint_index, message: Box::new(EstimateInboundMessageFeeRequestMessage { version: message.version as u32, @@ -163,7 +169,7 @@ impl CardanoRpc { sender: format!("0x{}", message.sender.encode_hex::()), destination_domain: message.destination, recipient: format!("0x{}", message.recipient.encode_hex::()), - message: message.body.encode_hex(), + message: format!("0x{}", message.body.encode_hex::()), }), // signatures: parsed_metadata.signatures,