Skip to content

Commit bd18a31

Browse files
committed
add default inputs to templates
1 parent 90bcafd commit bd18a31

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/entities/MerkleProofManager.test.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,10 @@ describe('MerkleProofManager', () => {
496496
const template = {
497497
id: 'template-1',
498498
name: 'Default Template',
499-
actions: [{ policyIndex: 0 }, { policyIndex: 1 }],
499+
actions: [
500+
{ policyIndex: 0, defaultValues: ['0x', 987654321000] },
501+
{ policyIndex: 1, defaultValues: [987654321000, '0x'] },
502+
],
500503
createdAt: new Date().toISOString(),
501504
updatedAt: undefined,
502505
}

src/types/poolMetadata.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@ export type MerkleProofTemplate = {
1313
export type MerkleProofTemplateAction = {
1414
/** index of the policy in manager.policies[] */
1515
policyIndex: number
16+
/** possible inputs for the policy execution, matching input order from policy inputs */
17+
defaultValues: (HexString | string | number)[]
1618
}
1719

1820
export type MerkleProofPolicy = {

0 commit comments

Comments
 (0)