Skip to content

Commit

Permalink
refactor: use the AccountUpdate type in the ZkappCommand type
Browse files Browse the repository at this point in the history
  • Loading branch information
DeMonkeyCoder committed Jan 11, 2025
1 parent bcfcaef commit 89ed9b0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 335 deletions.
140 changes: 1 addition & 139 deletions mina-transaction/gen/transaction-json.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,145 +38,7 @@ type ZkappCommand = {
};
authorization: string;
};
accountUpdates: {
body: {
publicKey: PublicKey;
tokenId: TokenId;
update: {
appState: (Field | null)[];
delegate: PublicKey | null;
verificationKey: {
data: string;
hash: Field;
} | null;
permissions: {
editState: AuthRequired;
access: AuthRequired;
send: AuthRequired;
receive: AuthRequired;
setDelegate: AuthRequired;
setPermissions: AuthRequired;
setVerificationKey: {
auth: AuthRequired;
txnVersion: UInt32;
};
setZkappUri: AuthRequired;
editActionState: AuthRequired;
setTokenSymbol: AuthRequired;
incrementNonce: AuthRequired;
setVotingFor: AuthRequired;
setTiming: AuthRequired;
} | null;
zkappUri: string | null;
tokenSymbol: string | null;
timing: {
initialMinimumBalance: UInt64;
cliffTime: UInt32;
cliffAmount: UInt64;
vestingPeriod: UInt32;
vestingIncrement: UInt64;
} | null;
votingFor: Field | null;
};
balanceChange: {
magnitude: UInt64;
sgn: Sign;
};
incrementNonce: Bool;
events: Field[][];
actions: Field[][];
callData: Field;
callDepth: number;
preconditions: {
network: {
snarkedLedgerHash: Field | null;
blockchainLength: {
lower: UInt32;
upper: UInt32;
} | null;
minWindowDensity: {
lower: UInt32;
upper: UInt32;
} | null;
totalCurrency: {
lower: UInt64;
upper: UInt64;
} | null;
globalSlotSinceGenesis: {
lower: UInt32;
upper: UInt32;
} | null;
stakingEpochData: {
ledger: {
hash: Field | null;
totalCurrency: {
lower: UInt64;
upper: UInt64;
} | null;
};
seed: Field | null;
startCheckpoint: Field | null;
lockCheckpoint: Field | null;
epochLength: {
lower: UInt32;
upper: UInt32;
} | null;
};
nextEpochData: {
ledger: {
hash: Field | null;
totalCurrency: {
lower: UInt64;
upper: UInt64;
} | null;
};
seed: Field | null;
startCheckpoint: Field | null;
lockCheckpoint: Field | null;
epochLength: {
lower: UInt32;
upper: UInt32;
} | null;
};
};
account: {
balance: {
lower: UInt64;
upper: UInt64;
} | null;
nonce: {
lower: UInt32;
upper: UInt32;
} | null;
receiptChainHash: Field | null;
delegate: PublicKey | null;
state: (Field | null)[];
actionState: Field | null;
provedState: Bool | null;
isNew: Bool | null;
};
validWhile: {
lower: UInt32;
upper: UInt32;
} | null;
};
useFullCommitment: Bool;
implicitAccountCreationFee: Bool;
mayUseToken: {
parentsOwnToken: Bool;
inheritFromParent: Bool;
};
authorizationKind: {
isSigned: Bool;
isProved: Bool;
verificationKeyHash: Field;
};
};
authorization: {
proof: string | null;
signature: string | null;
};
}[];
accountUpdates: AccountUpdate[];
memo: string;
};

Expand Down
197 changes: 1 addition & 196 deletions mina-transaction/gen/transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -192,202 +192,7 @@ type ZkappCommand = {
};
authorization: string;
};
accountUpdates: {
body: {
publicKey: PublicKey;
tokenId: TokenId;
update: {
appState: { isSome: Bool; value: Field }[];
delegate: { isSome: Bool; value: PublicKey };
verificationKey: {
isSome: Bool;
value: {
data: string;
hash: Field;
};
};
permissions: {
isSome: Bool;
value: {
editState: AuthRequired;
access: AuthRequired;
send: AuthRequired;
receive: AuthRequired;
setDelegate: AuthRequired;
setPermissions: AuthRequired;
setVerificationKey: {
auth: AuthRequired;
txnVersion: UInt32;
};
setZkappUri: AuthRequired;
editActionState: AuthRequired;
setTokenSymbol: AuthRequired;
incrementNonce: AuthRequired;
setVotingFor: AuthRequired;
setTiming: AuthRequired;
};
};
zkappUri: {
isSome: Bool;
value: {
data: string;
hash: Field;
};
};
tokenSymbol: {
isSome: Bool;
value: {
symbol: string;
field: Field;
};
};
timing: {
isSome: Bool;
value: {
initialMinimumBalance: UInt64;
cliffTime: UInt32;
cliffAmount: UInt64;
vestingPeriod: UInt32;
vestingIncrement: UInt64;
};
};
votingFor: { isSome: Bool; value: Field };
};
balanceChange: BalanceChange;
incrementNonce: Bool;
events: {
data: Field[][];
hash: Field;
};
actions: {
data: Field[][];
hash: Field;
};
callData: Field;
callDepth: number;
preconditions: {
network: {
snarkedLedgerHash: { isSome: Bool; value: Field };
blockchainLength: {
isSome: Bool;
value: {
lower: UInt32;
upper: UInt32;
};
};
minWindowDensity: {
isSome: Bool;
value: {
lower: UInt32;
upper: UInt32;
};
};
totalCurrency: {
isSome: Bool;
value: {
lower: UInt64;
upper: UInt64;
};
};
globalSlotSinceGenesis: {
isSome: Bool;
value: {
lower: UInt32;
upper: UInt32;
};
};
stakingEpochData: {
ledger: {
hash: { isSome: Bool; value: Field };
totalCurrency: {
isSome: Bool;
value: {
lower: UInt64;
upper: UInt64;
};
};
};
seed: { isSome: Bool; value: Field };
startCheckpoint: { isSome: Bool; value: Field };
lockCheckpoint: { isSome: Bool; value: Field };
epochLength: {
isSome: Bool;
value: {
lower: UInt32;
upper: UInt32;
};
};
};
nextEpochData: {
ledger: {
hash: { isSome: Bool; value: Field };
totalCurrency: {
isSome: Bool;
value: {
lower: UInt64;
upper: UInt64;
};
};
};
seed: { isSome: Bool; value: Field };
startCheckpoint: { isSome: Bool; value: Field };
lockCheckpoint: { isSome: Bool; value: Field };
epochLength: {
isSome: Bool;
value: {
lower: UInt32;
upper: UInt32;
};
};
};
};
account: {
balance: {
isSome: Bool;
value: {
lower: UInt64;
upper: UInt64;
};
};
nonce: {
isSome: Bool;
value: {
lower: UInt32;
upper: UInt32;
};
};
receiptChainHash: { isSome: Bool; value: Field };
delegate: { isSome: Bool; value: PublicKey };
state: { isSome: Bool; value: Field }[];
actionState: { isSome: Bool; value: Field };
provedState: { isSome: Bool; value: Bool };
isNew: { isSome: Bool; value: Bool };
};
validWhile: {
isSome: Bool;
value: {
lower: UInt32;
upper: UInt32;
};
};
};
useFullCommitment: Bool;
implicitAccountCreationFee: Bool;
mayUseToken: {
parentsOwnToken: Bool;
inheritFromParent: Bool;
};
authorizationKind: {
isSigned: Bool;
isProved: Bool;
verificationKeyHash: Field;
};
};
authorization: {
proof?: string;
signature?: string;
};
}[];
accountUpdates: AccountUpdate[];
memo: string;
};

Expand Down

0 comments on commit 89ed9b0

Please sign in to comment.