-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
This could be more idiomatic in Rust by:
- creating a type encompassing the data necessary for the transformation:
pub struct TransferHoprTokenPayload {
token_address: Address,
address: Address,
amount: U256,
}- creating a
TryFromimplementation for theTransactionRequestfor this:
impl TryFrom<TransferHoprTokenPayload> for TransactionRequest {
}Objects from 1. could be exported for public use, and used, e.g. in edgli to easily create a hidden transformation inside the library code, e.g. implementing the hopli library calls in terms of convertability, e.g.:
pub fn execute_payload_against(v: TryInto<TransactionRequest>)...Originally posted by @Teebor-Choka in #15 (comment)
Metadata
Metadata
Assignees
Labels
No labels