|
1 | | -import { AccountUpdate, Authorized, GenericData } from './account-update.js'; |
2 | | -import { AccountId, AccountTiming } from './account.js'; |
3 | | -import { AccountUpdateAuthorizationKind } from './authorization.js'; |
4 | | -import { TokenId, Update } from './core.js'; |
5 | | -import { Precondition } from './preconditions.js'; |
6 | | -import { GenericStatePreconditions, GenericStateUpdates } from './state.js'; |
7 | | -import { AccountUpdate as V1AccountUpdateImpl } from '../v1/account-update.js'; |
8 | | -import { VerificationKey } from '../../proof-system/verification-key.js'; |
9 | | -import { Bool } from '../../provable/bool.js'; |
10 | | -import { Field } from '../../provable/field.js'; |
11 | | -import { UInt32, UInt64, Int64, Sign } from '../../provable/int.js'; |
12 | | -import { PrivateKey } from '../../provable/crypto/signature.js'; |
| 1 | +import { expect } from 'expect'; |
| 2 | +import { jsLayout as layoutV1 } from '../../../bindings/mina-transaction/gen/v1/js-layout.js'; |
| 3 | +import * as ValuesV1 from '../../../bindings/mina-transaction/gen/v1/transaction-bigint.js'; |
| 4 | +import * as JsonV1 from '../../../bindings/mina-transaction/gen/v1/transaction-json.js'; |
| 5 | +import * as TypesV1 from '../../../bindings/mina-transaction/gen/v1/transaction.js'; |
13 | 6 | import { |
14 | 7 | Actions as V1Actions, |
15 | 8 | Events as V1Events, |
16 | 9 | Sign as V1Sign, |
17 | 10 | TokenSymbol as V1TokenSymbol, |
18 | 11 | ZkappUri as V1ZkappUri, |
19 | 12 | } from '../../../bindings/mina-transaction/v1/transaction-leaves.js'; |
20 | | -import * as TypesV1 from '../../../bindings/mina-transaction/gen/v1/transaction.js'; |
21 | | -import * as ValuesV1 from '../../../bindings/mina-transaction/gen/v1/transaction-bigint.js'; |
22 | | -import * as JsonV1 from '../../../bindings/mina-transaction/gen/v1/transaction-json.js'; |
23 | | -import { jsLayout as layoutV1 } from '../../../bindings/mina-transaction/gen/v1/js-layout.js'; |
24 | | -import { expect } from 'expect'; |
| 13 | +import { VerificationKey } from '../../proof-system/verification-key.js'; |
| 14 | +import { Bool } from '../../provable/bool.js'; |
| 15 | +import { PrivateKey } from '../../provable/crypto/signature.js'; |
| 16 | +import { Field } from '../../provable/field.js'; |
| 17 | +import { Int64, Sign, UInt32, UInt64 } from '../../provable/int.js'; |
| 18 | +import { AccountUpdate as V1AccountUpdateImpl } from '../v1/account-update.js'; |
| 19 | +import { AccountUpdate, Authorized, GenericData } from './account-update.js'; |
| 20 | +import { AccountId, AccountTiming } from './account.js'; |
| 21 | +import { AccountUpdateAuthorizationKind } from './authorization.js'; |
| 22 | +import { TokenId, Update } from './core.js'; |
| 23 | +import { Precondition } from './preconditions.js'; |
| 24 | +import { GenericStatePreconditions, GenericStateUpdates } from './state.js'; |
25 | 25 |
|
| 26 | +import { |
| 27 | + Signature, |
| 28 | + signFieldElement, |
| 29 | + zkAppBodyPrefix, |
| 30 | +} from '../../../mina-signer/src/signature.js'; |
26 | 31 | import { ZkappConstants } from '../v1/constants.js'; |
27 | 32 | import { |
28 | 33 | testV1V2ClassEquivalence, |
29 | 34 | testV1V2ValueEquivalence, |
30 | 35 | testV2Encoding, |
31 | 36 | } from './test/utils.js'; |
32 | | -import { |
33 | | - Signature, |
34 | | - signFieldElement, |
35 | | - zkAppBodyPrefix, |
36 | | -} from '../../../mina-signer/src/signature.js'; |
37 | 37 |
|
38 | 38 | import { Types } from '../../../bindings/mina-transaction/v1/types.js'; |
39 | | -import { packToFields, hashWithPrefix } from '../../../lib/provable/crypto/poseidon.js'; |
| 39 | +import { hashWithPrefix, packToFields } from '../../../lib/provable/crypto/poseidon.js'; |
40 | 40 |
|
41 | 41 | function testHashEquality(v1: TypesV1.AccountUpdate, v2: Authorized) { |
42 | 42 | expect(TypesV1.AccountUpdate.toInput(v1)).toEqual(v2.toInput()); |
@@ -401,7 +401,9 @@ const v2AccountUpdate: Authorized = new Authorized( |
401 | 401 | pushEvents: events, |
402 | 402 | pushActions: actions, |
403 | 403 | setState: new GenericStateUpdates( |
404 | | - new Array(ZkappConstants.MAX_ZKAPP_STATE_FIELDS).fill(Update.set(new Field(8))) |
| 404 | + new Array(ZkappConstants.MAX_ZKAPP_STATE_FIELDS).fill( |
| 405 | + Update.set(new Field(ZkappConstants.MAX_ZKAPP_STATE_FIELDS)) |
| 406 | + ) |
405 | 407 | ), |
406 | 408 | setDelegate: publicKey, |
407 | 409 | setVerificationKey: verificationKey, |
|
0 commit comments