Skip to content

Commit a298864

Browse files
committed
update idl, reduce cycles in tests
1 parent a8110ca commit a298864

7 files changed

Lines changed: 21 additions & 36 deletions

File tree

sdk/src/futarchy/v0.6/types/futarchy.ts

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2360,10 +2360,7 @@ export type Futarchy = {
23602360
},
23612361
{
23622362
name: "lastFailedTakeoverAt";
2363-
docs: [
2364-
"Unix time of the last failed hostile takeover. 0 = never.",
2365-
"Stamped by `finalize_proposal`, checked by `launch_proposal`.",
2366-
];
2363+
docs: ["Unix time of the last failed hostile takeover. 0 = never."];
23672364
type: "i64";
23682365
},
23692366
{
@@ -2625,28 +2622,17 @@ export type Futarchy = {
26252622
},
26262623
{
26272624
name: "passThresholdBps";
2628-
docs: [
2629-
"Snapshot of the kind's threshold at create. Only `finalize_proposal`",
2630-
"reads it.",
2631-
];
2625+
docs: ["Snapshot of the kind's threshold at create."];
26322626
type: "i16";
26332627
},
26342628
{
26352629
name: "councilCanBlock";
2636-
docs: [
2637-
"Snapshot of the kind's blockable flag at create. Only",
2638-
"`admin_cancel_proposal` reads it.",
2639-
];
2630+
docs: ["Snapshot of the kind's blockable flag at create."];
26402631
type: "bool";
26412632
},
26422633
{
26432634
name: "action";
2644-
docs: [
2645-
"The typed action parameters; the variant is the proposal's kind, and",
2646-
"`ProposalAction::params()` resolves its per-kind constants.",
2647-
"`apply_liquidation` reads the liquidator from here; clients read the",
2648-
"rest.",
2649-
];
2635+
docs: ["The typed action parameters."];
26502636
type: {
26512637
defined: "ProposalAction";
26522638
};
@@ -7187,10 +7173,7 @@ export const IDL: Futarchy = {
71877173
},
71887174
{
71897175
name: "lastFailedTakeoverAt",
7190-
docs: [
7191-
"Unix time of the last failed hostile takeover. 0 = never.",
7192-
"Stamped by `finalize_proposal`, checked by `launch_proposal`.",
7193-
],
7176+
docs: ["Unix time of the last failed hostile takeover. 0 = never."],
71947177
type: "i64",
71957178
},
71967179
{
@@ -7452,28 +7435,17 @@ export const IDL: Futarchy = {
74527435
},
74537436
{
74547437
name: "passThresholdBps",
7455-
docs: [
7456-
"Snapshot of the kind's threshold at create. Only `finalize_proposal`",
7457-
"reads it.",
7458-
],
7438+
docs: ["Snapshot of the kind's threshold at create."],
74597439
type: "i16",
74607440
},
74617441
{
74627442
name: "councilCanBlock",
7463-
docs: [
7464-
"Snapshot of the kind's blockable flag at create. Only",
7465-
"`admin_cancel_proposal` reads it.",
7466-
],
7443+
docs: ["Snapshot of the kind's blockable flag at create."],
74677444
type: "bool",
74687445
},
74697446
{
74707447
name: "action",
7471-
docs: [
7472-
"The typed action parameters; the variant is the proposal's kind, and",
7473-
"`ProposalAction::params()` resolves its per-kind constants.",
7474-
"`apply_liquidation` reads the liquidator from here; clients read the",
7475-
"rest.",
7476-
],
7448+
docs: ["The typed action parameters."],
74777449
type: {
74787450
defined: "ProposalAction",
74797451
},

tests/futarchy/integration/liquidationEndToEnd.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ export default function suite() {
158158
proposal,
159159
baseMint: META,
160160
quoteMint: USDC,
161+
cranks: 50,
161162
});
162163

163164
// finalize + execute + sync packed in ONE transaction: the DAO never

tests/futarchy/integration/takeoverEndToEnd.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -164,6 +164,7 @@ export default function suite() {
164164
proposal,
165165
baseMint: META,
166166
quoteMint: USDC,
167+
cranks: 90,
167168
});
168169

169170
// Packed execute + sync: the declared regime is live on Squads the moment

tests/futarchy/unit/applyLiquidation.test.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,7 @@ export default function suite() {
181181
proposal,
182182
baseMint: META,
183183
quoteMint: USDC,
184+
cranks: 50,
184185
});
185186

186187
// The expected sweep, computed from the live pre-execution reserves
@@ -287,6 +288,7 @@ export default function suite() {
287288
proposal,
288289
baseMint: META,
289290
quoteMint: USDC,
291+
cranks: 50,
290292
});
291293

292294
try {
@@ -341,6 +343,7 @@ export default function suite() {
341343
proposal: a.proposal,
342344
baseMint: META,
343345
quoteMint: USDC,
346+
cranks: 50,
344347
});
345348

346349
await this.futarchy
@@ -357,6 +360,7 @@ export default function suite() {
357360
proposal: b.proposal,
358361
baseMint: META,
359362
quoteMint: USDC,
363+
cranks: 50,
360364
});
361365

362366
await executeVaultTransaction(this, dao, a.squadsTransaction);
@@ -404,6 +408,7 @@ export default function suite() {
404408
proposal,
405409
baseMint: META,
406410
quoteMint: USDC,
411+
cranks: 50,
407412
});
408413

409414
const preDao = await this.futarchy.getDao(dao);
@@ -457,6 +462,7 @@ export default function suite() {
457462
proposal,
458463
baseMint: META,
459464
quoteMint: USDC,
465+
cranks: 50,
460466
});
461467

462468
// Manufacture an existing-but-empty position at the treasury's PDA
@@ -513,6 +519,7 @@ export default function suite() {
513519
proposal,
514520
baseMint: META,
515521
quoteMint: USDC,
522+
cranks: 50,
516523
});
517524

518525
// A proposal launched in the finalize→execute gap puts the pool

tests/futarchy/unit/liquidatedGuards.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,7 @@ export default function suite() {
184184
proposal,
185185
baseMint: META,
186186
quoteMint: USDC,
187+
cranks: 50,
187188
});
188189

189190
await executeVaultTransaction(this, dao, squadsTransaction);

tests/futarchy/unit/liquidatorPath.test.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,7 @@ export default function suite() {
136136
proposal,
137137
baseMint: META,
138138
quoteMint: USDC,
139+
cranks: 50,
139140
});
140141

141142
await executeVaultTransaction(this, dao, squadsTransaction);

tests/utils.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,8 @@ export async function passProposal(
163163
proposal: PublicKey;
164164
baseMint: PublicKey;
165165
quoteMint: PublicKey;
166+
buyAmount?: typeof BN.prototype;
167+
cranks?: number;
166168
},
167169
) {
168170
await pumpPassMarket(context, args);

0 commit comments

Comments
 (0)