Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
benesjan committed Jan 17, 2025
1 parent 7df588e commit 65cb402
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion yarn-project/cli/src/utils/encoding.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { type ABIParameter, type AbiType, type StructType, U128, isU128Struct } from '@aztec/foundation/abi';
import { type ABIParameter, type AbiType, type StructType, isU128Struct } from '@aztec/foundation/abi';
import { Fr } from '@aztec/foundation/fields';

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { type Tx, mockTx } from '@aztec/circuit-types';
import { AztecAddress, Fr, FunctionSelector, GasFees, GasSettings, PUBLIC_DISPATCH_SELECTOR } from '@aztec/circuits.js';
import { U128 } from '@aztec/foundation/abi';
import { poseidon2Hash } from '@aztec/foundation/crypto';
import { type Writeable } from '@aztec/foundation/types';
import { FeeJuiceContract } from '@aztec/noir-contracts.js/FeeJuice';
Expand Down Expand Up @@ -72,7 +73,7 @@ describe('GasTxValidator', () => {
patchNonRevertibleFn(tx, 0, {
address: ProtocolContractAddress.FeeJuice,
selector: FunctionSelector.fromField(new Fr(PUBLIC_DISPATCH_SELECTOR)),
args: [selector.toField(), payer.toField(), new Fr(1n)],
args: [selector.toField(), payer.toField(), ...new U128(1n).toFields()],
msgSender: ProtocolContractAddress.FeeJuice,
});
await expectValid(tx);
Expand All @@ -91,7 +92,7 @@ describe('GasTxValidator', () => {
mockBalance(feeLimit - 1n);
patchRevertibleFn(tx, 0, {
selector: FunctionSelector.fromSignature('_increase_public_balance((Field),(Field,Field))'),
args: [payer.toField(), new Fr(1n)],
args: [payer.toField(), ...new U128(1n).toFields()],
});
await expectInvalid(tx, 'Insufficient fee payer balance');
});
Expand Down

0 comments on commit 65cb402

Please sign in to comment.