From 65cb4023c2804af2a8f555739f006667f2c9e2b2 Mon Sep 17 00:00:00 2001 From: benesjan Date: Fri, 17 Jan 2025 15:33:34 +0000 Subject: [PATCH] fix --- yarn-project/cli/src/utils/encoding.ts | 2 +- .../sequencer-client/src/tx_validator/gas_validator.test.ts | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/yarn-project/cli/src/utils/encoding.ts b/yarn-project/cli/src/utils/encoding.ts index 8c8f1afc587c..af5cdd9012ee 100644 --- a/yarn-project/cli/src/utils/encoding.ts +++ b/yarn-project/cli/src/utils/encoding.ts @@ -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'; /** diff --git a/yarn-project/sequencer-client/src/tx_validator/gas_validator.test.ts b/yarn-project/sequencer-client/src/tx_validator/gas_validator.test.ts index cdbf52460c49..c0421ac4183e 100644 --- a/yarn-project/sequencer-client/src/tx_validator/gas_validator.test.ts +++ b/yarn-project/sequencer-client/src/tx_validator/gas_validator.test.ts @@ -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'; @@ -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); @@ -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'); });