Skip to content

Commit

Permalink
feat: Create pox_4.rs from pox_3.rs and remove `#[allow(clippy::n…
Browse files Browse the repository at this point in the history
…eedless_return)]`
  • Loading branch information
jbencin committed Nov 29, 2023
1 parent 3169ae1 commit b838908
Show file tree
Hide file tree
Showing 2 changed files with 406 additions and 0 deletions.
11 changes: 11 additions & 0 deletions pox-locking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ mod events;
mod pox_1;
mod pox_2;
mod pox_3;
mod pox_4;

#[derive(Debug)]
pub enum LockingError {
Expand All @@ -52,6 +53,7 @@ pub enum LockingError {
pub const POX_1_NAME: &str = "pox";
pub const POX_2_NAME: &str = "pox-2";
pub const POX_3_NAME: &str = "pox-3";
pub const POX_4_NAME: &str = "pox-4";

/// Handle special cases of contract-calls -- namely, those into PoX that should lock up STX
pub fn handle_contract_call_special_cases(
Expand Down Expand Up @@ -113,6 +115,15 @@ pub fn handle_contract_call_special_cases(
args,
result,
);
} else if *contract_id == boot_code_id(POX_4_NAME, global_context.mainnet) {
return pox_4::handle_contract_call(
global_context,
sender,
contract_id,
function_name,
args,
result,
);
}

Ok(())
Expand Down
Loading

0 comments on commit b838908

Please sign in to comment.