-
Notifications
You must be signed in to change notification settings - Fork 293
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
move Ics20Withdrawal and Ics20Transfer to shielded-pool crate
- Loading branch information
Showing
28 changed files
with
1,368 additions
and
642 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
mod ibc_action; | ||
mod ics20_withdrawal; | ||
//mod ics20_withdrawal; |
46 changes: 23 additions & 23 deletions
46
crates/core/component/ibc/src/component/action_handler/ics20_withdrawal.rs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
use std::sync::Arc; | ||
// use std::sync::Arc; | ||
|
||
use anyhow::Result; | ||
use async_trait::async_trait; | ||
use penumbra_component::ActionHandler; | ||
use penumbra_storage::{StateRead, StateWrite}; | ||
// use anyhow::Result; | ||
// use async_trait::async_trait; | ||
// use penumbra_component::ActionHandler; | ||
// use penumbra_storage::{StateRead, StateWrite}; | ||
|
||
use crate::{ | ||
component::transfer::{Ics20TransferReadExt as _, Ics20TransferWriteExt as _}, | ||
Ics20Withdrawal, | ||
}; | ||
// use crate::{ | ||
// component::transfer::{Ics20TransferReadExt as _, Ics20TransferWriteExt as _}, | ||
// Ics20Withdrawal, | ||
// }; | ||
|
||
#[async_trait] | ||
impl ActionHandler for Ics20Withdrawal { | ||
type CheckStatelessContext = (); | ||
async fn check_stateless(&self, _context: ()) -> Result<()> { | ||
self.validate() | ||
} | ||
// #[async_trait] | ||
// impl ActionHandler for Ics20Withdrawal { | ||
// type CheckStatelessContext = (); | ||
// async fn check_stateless(&self, _context: ()) -> Result<()> { | ||
// self.validate() | ||
// } | ||
|
||
async fn check_stateful<S: StateRead + 'static>(&self, state: Arc<S>) -> Result<()> { | ||
state.withdrawal_check(self).await | ||
} | ||
// async fn check_stateful<S: StateRead + 'static>(&self, state: Arc<S>) -> Result<()> { | ||
// state.withdrawal_check(self).await | ||
// } | ||
|
||
async fn execute<S: StateWrite>(&self, mut state: S) -> Result<()> { | ||
state.withdrawal_execute(self).await; | ||
// async fn execute<S: StateWrite>(&self, mut state: S) -> Result<()> { | ||
// state.withdrawal_execute(self).await; | ||
|
||
Ok(()) | ||
} | ||
} | ||
// Ok(()) | ||
// } | ||
// } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.