Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
sklppy88 committed Dec 12, 2024
1 parent 5f7d7a0 commit b5ca51b
Show file tree
Hide file tree
Showing 5 changed files with 214 additions and 137 deletions.
4 changes: 2 additions & 2 deletions noir-projects/aztec-nr/authwit/src/cheatcodes.nr
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ where
C: CallInterface<M>,
{
let target = call_interface.get_contract_address();
let inputs = cheatcodes::get_private_context_inputs(get_block_number());
let inputs = cheatcodes::get_private_context_inputs(get_block_number() - 1);
let chain_id = inputs.tx_context.chain_id;
let version = inputs.tx_context.version;
let args_hash = hash_args(call_interface.get_args());
Expand All @@ -39,7 +39,7 @@ where
let current_contract = get_contract_address();
cheatcodes::set_contract_address(on_behalf_of);
let target = call_interface.get_contract_address();
let inputs = cheatcodes::get_private_context_inputs(get_block_number());
let inputs = cheatcodes::get_private_context_inputs(get_block_number() - 1);
let chain_id = inputs.tx_context.chain_id;
let version = inputs.tx_context.version;
let args_hash = hash_args(call_interface.get_args());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ unconstrained fn test_check_block_number() {
let router_contract_address = router_contract.to_address();
let router = Router::at(router_contract_address);

env.advance_block_by(9);
env.advance_block_by(8);

// First we sanity-check that current block number is as expected
let current_block_number = env.block_number();
Expand All @@ -28,7 +28,7 @@ unconstrained fn test_fail_check_block_number() {
let router_contract_address = router_contract.to_address();
let router = Router::at(router_contract_address);

env.advance_block_by(9);
env.advance_block_by(8);

// First we sanity-check that current block number is as expected
let current_block_number = env.block_number();
Expand Down
Loading

0 comments on commit b5ca51b

Please sign in to comment.