-
Notifications
You must be signed in to change notification settings - Fork 1
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
bump astria and penumbra deps #5
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -195,21 +195,29 @@ fn build_transfer_message_astria( | |
timeout_height: TimeoutHeight, | ||
timeout_timestamp: Timestamp, | ||
) -> Any { | ||
use astria_core::sequencer::v1::asset::default_native_asset_id; | ||
use astria_core::primitive::v1::Address; | ||
let sender: Address = sender | ||
.to_string() | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This has |
||
.parse() | ||
.expect("can parse astria bech32m sender address"); | ||
|
||
let timeout_height = match timeout_height { | ||
// TODO: update astria IbcHeight to support optional? | ||
TimeoutHeight::At(height) => astria_core::generated::sequencer::v1::IbcHeight { | ||
revision_number: height.revision_number(), | ||
revision_height: height.revision_height(), | ||
}, | ||
TimeoutHeight::Never => astria_core::generated::sequencer::v1::IbcHeight { | ||
revision_number: 0, | ||
revision_height: u64::MAX, | ||
}, | ||
TimeoutHeight::At(height) => { | ||
astria_core::generated::protocol::transaction::v1alpha1::IbcHeight { | ||
revision_number: height.revision_number(), | ||
revision_height: height.revision_height(), | ||
} | ||
} | ||
TimeoutHeight::Never => { | ||
astria_core::generated::protocol::transaction::v1alpha1::IbcHeight { | ||
revision_number: 0, | ||
revision_height: u64::MAX, | ||
} | ||
} | ||
}; | ||
|
||
let msg = astria_core::generated::sequencer::v1::Ics20Withdrawal { | ||
let msg = astria_core::generated::protocol::transaction::v1alpha1::Ics20Withdrawal { | ||
source_channel: src_channel_id.to_string(), | ||
denom: denom, | ||
amount: Some( | ||
|
@@ -218,10 +226,12 @@ fn build_transfer_message_astria( | |
.into(), | ||
), | ||
destination_chain_address: receiver.to_string(), | ||
return_address: hex::decode(sender.to_string()).expect("sender address is hex"), | ||
return_address: Some(sender.to_raw()), | ||
timeout_height: Some(timeout_height), | ||
timeout_time: timeout_timestamp.nanoseconds(), | ||
fee_asset_id: default_native_asset_id().as_ref().to_vec(), | ||
fee_asset: "nria".to_string(), // TODO: make this configurable | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. IMO use fee_asset: "nria".parse::<Denom>().expect("nria is a valid denom").to_string(), |
||
memo: String::new(), | ||
bridge_address: None, | ||
}; | ||
|
||
Any { | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You could provide a unit test to ensure that this will keep on working.