-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3bc234
commit c3dd528
Showing
4 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 |
---|---|---|
@@ -0,0 +1,27 @@ | ||
//! AAA, collateral(stake)<->order, CVM route validation | ||
|
||
use cosmwasm_std::{Addr, StdResult}; | ||
|
||
use crate::{OrderItem, SolvedOrder}; | ||
|
||
/// Validate solver can solve order he tells. | ||
/// Minimal requirement is that CVM salt is unique to solver | ||
pub fn validate_solver(as_ref: cosmwasm_std::Deps<'_>, sender: &Addr, order: &OrderItem) -> StdResult<()> { | ||
Ok(()) | ||
} | ||
|
||
/// Validate program is sane | ||
pub(crate) fn validate_program(as_ref: cosmwasm_std::Deps<'_>, cvm_program: &cvm_runtime::Program<Vec<cvm_runtime::Instruction<Vec<u8>, cvm_runtime::shared::XcAddr, cvm_runtime::Funds>>>, order: &OrderItem) -> StdResult<()> { | ||
Ok(()) | ||
} | ||
|
||
/// Validate solver can solver amount he claimed | ||
pub(crate) fn validate_solvers(deps: &cosmwasm_std::DepsMut<'_>, solution: &crate::SolutionItem, all_orders: &[SolvedOrder]) -> StdResult<()> { | ||
Ok(()) | ||
} | ||
|
||
/// Validate solver program is sane | ||
/// Minimal requirement is that CVM salt is unique to solver | ||
pub(crate) fn validate_routes(deps: &cosmwasm_std::DepsMut<'_>, solution: &crate::SolutionItem, all_orders: &[SolvedOrder]) -> StdResult<()> { | ||
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