Skip to content
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

Clean up deposit constructor #1448

Closed
ethanoroshiba opened this issue Sep 4, 2024 · 1 comment
Closed

Clean up deposit constructor #1448

ethanoroshiba opened this issue Sep 4, 2024 · 1 comment
Assignees

Comments

@ethanoroshiba
Copy link
Contributor

ethanoroshiba commented Sep 4, 2024

Currently, Deposit::new() as many arguments and is unwieldy. We should prefer try_from_raw where possible and look into a better way of constructing the object, potentially a builder.

#1410 (comment)

#[must_use]
pub fn new(
bridge_address: Address,
rollup_id: RollupId,
amount: u128,
asset: asset::Denom,
destination_chain_address: String,
id_of_source_transaction: TransactionId,
position_in_source_transaction: u64,
) -> Self {
Self {
bridge_address,
rollup_id,
amount,
asset,
destination_chain_address,
id_of_source_transaction,
position_in_source_transaction,
}

┆Issue Number: ENG-787

@ethanoroshiba
Copy link
Contributor Author

Completed in #1495

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant