Skip to content

Commit

Permalink
feat(voyager): legacy transactions on scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
benluelo committed Apr 25, 2024
1 parent f92cc97 commit da04e46
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/relay-message/src/chain_impls/ethereum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,13 +98,14 @@ where
Tr::StateProof: Encode<EthAbi>,
{
async fn msg(&self, msg: Effect<Self, Tr>) -> Result<(), Self::MsgError> {
do_msg(&self.ibc_handlers, msg).await
do_msg(&self.ibc_handlers, msg, false).await
}
}

pub async fn do_msg<Hc: ChainExt<Config = EthereumConfig> + EthereumChain, Tr: ChainExt>(
ibc_handlers: &Pool<IBCHandler<EthereumSignerMiddleware>>,
msg: Effect<Hc, Tr>,
legacy: bool,
) -> Result<(), TxSubmitError>
where
ConsensusStateOf<Tr>: Encode<EthAbi>,
Expand Down Expand Up @@ -303,6 +304,8 @@ where
),
};

let msg = if legacy { msg.legacy() } else { msg };

tracing::debug!(?msg, "submitting evm tx");

match msg.estimate_gas().await {
Expand Down
2 changes: 1 addition & 1 deletion lib/relay-message/src/chain_impls/scroll.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ where
Tr::StateProof: Encode<EthAbi>,
{
async fn msg(&self, msg: Effect<Self, Tr>) -> Result<(), Self::MsgError> {
do_msg(&self.ibc_handlers, msg).await
do_msg(&self.ibc_handlers, msg, true).await
}
}

Expand Down

0 comments on commit da04e46

Please sign in to comment.