@metadaoproject/futarchy 0.7.4-alpha.1 → 0.7.4-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/v0.6/FutarchyClient.d.ts +12 -0
- package/dist/v0.6/types/futarchy.d.ts +528 -0
- package/dist/v0.6/types/futarchy.js +528 -0
- package/dist/v0.6/types/futarchy.js.map +1 -1
- package/dist/v0.7/FutarchyClient.d.ts +110 -0
- package/dist/v0.7/FutarchyClient.js +76 -1
- package/dist/v0.7/FutarchyClient.js.map +1 -1
- package/dist/v0.7/types/futarchy.d.ts +447 -0
- package/dist/v0.7/types/futarchy.js +447 -0
- package/dist/v0.7/types/futarchy.js.map +1 -1
- package/package.json +1 -1
|
@@ -582,6 +582,27 @@ export type Futarchy = {
|
|
|
582
582
|
}
|
|
583
583
|
];
|
|
584
584
|
},
|
|
585
|
+
{
|
|
586
|
+
name: "resizeDao";
|
|
587
|
+
accounts: [
|
|
588
|
+
{
|
|
589
|
+
name: "dao";
|
|
590
|
+
isMut: true;
|
|
591
|
+
isSigner: false;
|
|
592
|
+
},
|
|
593
|
+
{
|
|
594
|
+
name: "payer";
|
|
595
|
+
isMut: true;
|
|
596
|
+
isSigner: true;
|
|
597
|
+
},
|
|
598
|
+
{
|
|
599
|
+
name: "systemProgram";
|
|
600
|
+
isMut: false;
|
|
601
|
+
isSigner: false;
|
|
602
|
+
}
|
|
603
|
+
];
|
|
604
|
+
args: [];
|
|
605
|
+
},
|
|
585
606
|
{
|
|
586
607
|
name: "spotSwap";
|
|
587
608
|
accounts: [
|
|
@@ -1180,6 +1201,125 @@ export type Futarchy = {
|
|
|
1180
1201
|
];
|
|
1181
1202
|
args: [];
|
|
1182
1203
|
},
|
|
1204
|
+
{
|
|
1205
|
+
name: "initiateVaultSpendOptimisticProposal";
|
|
1206
|
+
accounts: [
|
|
1207
|
+
{
|
|
1208
|
+
name: "squadsMultisig";
|
|
1209
|
+
isMut: false;
|
|
1210
|
+
isSigner: false;
|
|
1211
|
+
},
|
|
1212
|
+
{
|
|
1213
|
+
name: "squadsMultisigVault";
|
|
1214
|
+
isMut: false;
|
|
1215
|
+
isSigner: false;
|
|
1216
|
+
},
|
|
1217
|
+
{
|
|
1218
|
+
name: "squadsSpendingLimit";
|
|
1219
|
+
isMut: false;
|
|
1220
|
+
isSigner: false;
|
|
1221
|
+
},
|
|
1222
|
+
{
|
|
1223
|
+
name: "squadsProposal";
|
|
1224
|
+
isMut: false;
|
|
1225
|
+
isSigner: false;
|
|
1226
|
+
},
|
|
1227
|
+
{
|
|
1228
|
+
name: "squadsVaultTransaction";
|
|
1229
|
+
isMut: false;
|
|
1230
|
+
isSigner: false;
|
|
1231
|
+
},
|
|
1232
|
+
{
|
|
1233
|
+
name: "dao";
|
|
1234
|
+
isMut: true;
|
|
1235
|
+
isSigner: false;
|
|
1236
|
+
},
|
|
1237
|
+
{
|
|
1238
|
+
name: "daoQuoteVaultAccount";
|
|
1239
|
+
isMut: false;
|
|
1240
|
+
isSigner: false;
|
|
1241
|
+
},
|
|
1242
|
+
{
|
|
1243
|
+
name: "proposer";
|
|
1244
|
+
isMut: false;
|
|
1245
|
+
isSigner: true;
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
name: "recipient";
|
|
1249
|
+
isMut: false;
|
|
1250
|
+
isSigner: false;
|
|
1251
|
+
},
|
|
1252
|
+
{
|
|
1253
|
+
name: "recipientQuoteAccount";
|
|
1254
|
+
isMut: false;
|
|
1255
|
+
isSigner: false;
|
|
1256
|
+
},
|
|
1257
|
+
{
|
|
1258
|
+
name: "squadsProgram";
|
|
1259
|
+
isMut: false;
|
|
1260
|
+
isSigner: false;
|
|
1261
|
+
},
|
|
1262
|
+
{
|
|
1263
|
+
name: "tokenProgram";
|
|
1264
|
+
isMut: false;
|
|
1265
|
+
isSigner: false;
|
|
1266
|
+
},
|
|
1267
|
+
{
|
|
1268
|
+
name: "eventAuthority";
|
|
1269
|
+
isMut: false;
|
|
1270
|
+
isSigner: false;
|
|
1271
|
+
},
|
|
1272
|
+
{
|
|
1273
|
+
name: "program";
|
|
1274
|
+
isMut: false;
|
|
1275
|
+
isSigner: false;
|
|
1276
|
+
}
|
|
1277
|
+
];
|
|
1278
|
+
args: [
|
|
1279
|
+
{
|
|
1280
|
+
name: "params";
|
|
1281
|
+
type: {
|
|
1282
|
+
defined: "InitiateVaultSpendOptimisticProposalParams";
|
|
1283
|
+
};
|
|
1284
|
+
}
|
|
1285
|
+
];
|
|
1286
|
+
},
|
|
1287
|
+
{
|
|
1288
|
+
name: "finalizeOptimisticProposal";
|
|
1289
|
+
accounts: [
|
|
1290
|
+
{
|
|
1291
|
+
name: "squadsMultisig";
|
|
1292
|
+
isMut: true;
|
|
1293
|
+
isSigner: false;
|
|
1294
|
+
},
|
|
1295
|
+
{
|
|
1296
|
+
name: "squadsProposal";
|
|
1297
|
+
isMut: true;
|
|
1298
|
+
isSigner: false;
|
|
1299
|
+
},
|
|
1300
|
+
{
|
|
1301
|
+
name: "dao";
|
|
1302
|
+
isMut: true;
|
|
1303
|
+
isSigner: false;
|
|
1304
|
+
},
|
|
1305
|
+
{
|
|
1306
|
+
name: "squadsProgram";
|
|
1307
|
+
isMut: false;
|
|
1308
|
+
isSigner: false;
|
|
1309
|
+
},
|
|
1310
|
+
{
|
|
1311
|
+
name: "eventAuthority";
|
|
1312
|
+
isMut: false;
|
|
1313
|
+
isSigner: false;
|
|
1314
|
+
},
|
|
1315
|
+
{
|
|
1316
|
+
name: "program";
|
|
1317
|
+
isMut: false;
|
|
1318
|
+
isSigner: false;
|
|
1319
|
+
}
|
|
1320
|
+
];
|
|
1321
|
+
args: [];
|
|
1322
|
+
},
|
|
1183
1323
|
{
|
|
1184
1324
|
name: "adminApproveMultisigProposal";
|
|
1185
1325
|
accounts: [
|
|
@@ -1572,6 +1712,154 @@ export type Futarchy = {
|
|
|
1572
1712
|
];
|
|
1573
1713
|
type: "i16";
|
|
1574
1714
|
},
|
|
1715
|
+
{
|
|
1716
|
+
name: "teamAddress";
|
|
1717
|
+
type: "publicKey";
|
|
1718
|
+
},
|
|
1719
|
+
{
|
|
1720
|
+
name: "optimisticProposal";
|
|
1721
|
+
type: {
|
|
1722
|
+
option: {
|
|
1723
|
+
defined: "OptimisticProposal";
|
|
1724
|
+
};
|
|
1725
|
+
};
|
|
1726
|
+
},
|
|
1727
|
+
{
|
|
1728
|
+
name: "isOptimisticGovernanceEnabled";
|
|
1729
|
+
type: "bool";
|
|
1730
|
+
}
|
|
1731
|
+
];
|
|
1732
|
+
};
|
|
1733
|
+
},
|
|
1734
|
+
{
|
|
1735
|
+
name: "oldDao";
|
|
1736
|
+
type: {
|
|
1737
|
+
kind: "struct";
|
|
1738
|
+
fields: [
|
|
1739
|
+
{
|
|
1740
|
+
name: "amm";
|
|
1741
|
+
docs: ["Embedded FutarchyAmm - 1:1 relationship"];
|
|
1742
|
+
type: {
|
|
1743
|
+
defined: "FutarchyAmm";
|
|
1744
|
+
};
|
|
1745
|
+
},
|
|
1746
|
+
{
|
|
1747
|
+
name: "nonce";
|
|
1748
|
+
docs: ["`nonce` + `dao_creator` are PDA seeds"];
|
|
1749
|
+
type: "u64";
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
name: "daoCreator";
|
|
1753
|
+
type: "publicKey";
|
|
1754
|
+
},
|
|
1755
|
+
{
|
|
1756
|
+
name: "pdaBump";
|
|
1757
|
+
type: "u8";
|
|
1758
|
+
},
|
|
1759
|
+
{
|
|
1760
|
+
name: "squadsMultisig";
|
|
1761
|
+
type: "publicKey";
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
name: "squadsMultisigVault";
|
|
1765
|
+
type: "publicKey";
|
|
1766
|
+
},
|
|
1767
|
+
{
|
|
1768
|
+
name: "baseMint";
|
|
1769
|
+
type: "publicKey";
|
|
1770
|
+
},
|
|
1771
|
+
{
|
|
1772
|
+
name: "quoteMint";
|
|
1773
|
+
type: "publicKey";
|
|
1774
|
+
},
|
|
1775
|
+
{
|
|
1776
|
+
name: "proposalCount";
|
|
1777
|
+
type: "u32";
|
|
1778
|
+
},
|
|
1779
|
+
{
|
|
1780
|
+
name: "passThresholdBps";
|
|
1781
|
+
type: "u16";
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
name: "secondsPerProposal";
|
|
1785
|
+
type: "u32";
|
|
1786
|
+
},
|
|
1787
|
+
{
|
|
1788
|
+
name: "twapInitialObservation";
|
|
1789
|
+
docs: [
|
|
1790
|
+
"For manipulation-resistance the TWAP is a time-weighted average observation,",
|
|
1791
|
+
"where observation tries to approximate price but can only move by",
|
|
1792
|
+
"`twap_max_observation_change_per_update` per update. Because it can only move",
|
|
1793
|
+
"a little bit per update, you need to check that it has a good initial observation.",
|
|
1794
|
+
"Otherwise, an attacker could create a very high initial observation in the pass",
|
|
1795
|
+
"market and a very low one in the fail market to force the proposal to pass.",
|
|
1796
|
+
"",
|
|
1797
|
+
"We recommend setting an initial observation around the spot price of the token,",
|
|
1798
|
+
"and max observation change per update around 2% the spot price of the token.",
|
|
1799
|
+
"For example, if the spot price of META is $400, we'd recommend setting an initial",
|
|
1800
|
+
"observation of 400 (converted into the AMM prices) and a max observation change per",
|
|
1801
|
+
"update of 8 (also converted into the AMM prices). Observations can be updated once",
|
|
1802
|
+
"a minute, so 2% allows the proposal market to reach double the spot price or 0",
|
|
1803
|
+
"in 50 minutes."
|
|
1804
|
+
];
|
|
1805
|
+
type: "u128";
|
|
1806
|
+
},
|
|
1807
|
+
{
|
|
1808
|
+
name: "twapMaxObservationChangePerUpdate";
|
|
1809
|
+
type: "u128";
|
|
1810
|
+
},
|
|
1811
|
+
{
|
|
1812
|
+
name: "twapStartDelaySeconds";
|
|
1813
|
+
docs: [
|
|
1814
|
+
"Forces TWAP calculation to start after `twap_start_delay_seconds` seconds"
|
|
1815
|
+
];
|
|
1816
|
+
type: "u32";
|
|
1817
|
+
},
|
|
1818
|
+
{
|
|
1819
|
+
name: "minQuoteFutarchicLiquidity";
|
|
1820
|
+
docs: [
|
|
1821
|
+
"As an anti-spam measure and to help liquidity, you need to lock up some liquidity",
|
|
1822
|
+
"in both futarchic markets in order to create a proposal.",
|
|
1823
|
+
"",
|
|
1824
|
+
"For example, for META, we can use a `min_quote_futarchic_liquidity` of",
|
|
1825
|
+
"5000 * 1_000_000 (5000 USDC) and a `min_base_futarchic_liquidity` of",
|
|
1826
|
+
"10 * 1_000_000_000 (10 META)."
|
|
1827
|
+
];
|
|
1828
|
+
type: "u64";
|
|
1829
|
+
},
|
|
1830
|
+
{
|
|
1831
|
+
name: "minBaseFutarchicLiquidity";
|
|
1832
|
+
type: "u64";
|
|
1833
|
+
},
|
|
1834
|
+
{
|
|
1835
|
+
name: "baseToStake";
|
|
1836
|
+
docs: [
|
|
1837
|
+
"Minimum amount of base tokens that must be staked to launch a proposal"
|
|
1838
|
+
];
|
|
1839
|
+
type: "u64";
|
|
1840
|
+
},
|
|
1841
|
+
{
|
|
1842
|
+
name: "seqNum";
|
|
1843
|
+
type: "u64";
|
|
1844
|
+
},
|
|
1845
|
+
{
|
|
1846
|
+
name: "initialSpendingLimit";
|
|
1847
|
+
type: {
|
|
1848
|
+
option: {
|
|
1849
|
+
defined: "InitialSpendingLimit";
|
|
1850
|
+
};
|
|
1851
|
+
};
|
|
1852
|
+
},
|
|
1853
|
+
{
|
|
1854
|
+
name: "teamSponsoredPassThresholdBps";
|
|
1855
|
+
docs: [
|
|
1856
|
+
"The percentage, in basis points, the pass price needs to be above the",
|
|
1857
|
+
"fail price in order for the proposal to pass for team-sponsored proposals.",
|
|
1858
|
+
"",
|
|
1859
|
+
"Can be negative to allow for team-sponsored proposals to pass by default."
|
|
1860
|
+
];
|
|
1861
|
+
type: "i16";
|
|
1862
|
+
},
|
|
1575
1863
|
{
|
|
1576
1864
|
name: "teamAddress";
|
|
1577
1865
|
type: "publicKey";
|
|
@@ -1799,6 +2087,18 @@ export type Futarchy = {
|
|
|
1799
2087
|
];
|
|
1800
2088
|
};
|
|
1801
2089
|
},
|
|
2090
|
+
{
|
|
2091
|
+
name: "InitiateVaultSpendOptimisticProposalParams";
|
|
2092
|
+
type: {
|
|
2093
|
+
kind: "struct";
|
|
2094
|
+
fields: [
|
|
2095
|
+
{
|
|
2096
|
+
name: "amount";
|
|
2097
|
+
type: "u64";
|
|
2098
|
+
}
|
|
2099
|
+
];
|
|
2100
|
+
};
|
|
2101
|
+
},
|
|
1802
2102
|
{
|
|
1803
2103
|
name: "ProvideLiquidityParams";
|
|
1804
2104
|
type: {
|
|
@@ -1940,6 +2240,12 @@ export type Futarchy = {
|
|
|
1940
2240
|
type: {
|
|
1941
2241
|
option: "publicKey";
|
|
1942
2242
|
};
|
|
2243
|
+
},
|
|
2244
|
+
{
|
|
2245
|
+
name: "isOptimisticGovernanceEnabled";
|
|
2246
|
+
type: {
|
|
2247
|
+
option: "bool";
|
|
2248
|
+
};
|
|
1943
2249
|
}
|
|
1944
2250
|
];
|
|
1945
2251
|
};
|
|
@@ -1967,6 +2273,28 @@ export type Futarchy = {
|
|
|
1967
2273
|
];
|
|
1968
2274
|
};
|
|
1969
2275
|
},
|
|
2276
|
+
{
|
|
2277
|
+
name: "OptimisticProposal";
|
|
2278
|
+
type: {
|
|
2279
|
+
kind: "struct";
|
|
2280
|
+
fields: [
|
|
2281
|
+
{
|
|
2282
|
+
name: "squadsProposal";
|
|
2283
|
+
docs: [
|
|
2284
|
+
"The squads proposal currently enqueued for execution if not challenged by a new proposal."
|
|
2285
|
+
];
|
|
2286
|
+
type: "publicKey";
|
|
2287
|
+
},
|
|
2288
|
+
{
|
|
2289
|
+
name: "enqueuedTimestamp";
|
|
2290
|
+
docs: [
|
|
2291
|
+
"The timestamp when the active optimistic squads proposal was enqueued."
|
|
2292
|
+
];
|
|
2293
|
+
type: "i64";
|
|
2294
|
+
}
|
|
2295
|
+
];
|
|
2296
|
+
};
|
|
2297
|
+
},
|
|
1970
2298
|
{
|
|
1971
2299
|
name: "InitialSpendingLimit";
|
|
1972
2300
|
type: {
|
|
@@ -2463,6 +2791,11 @@ export type Futarchy = {
|
|
|
2463
2791
|
name: "teamAddress";
|
|
2464
2792
|
type: "publicKey";
|
|
2465
2793
|
index: false;
|
|
2794
|
+
},
|
|
2795
|
+
{
|
|
2796
|
+
name: "isOptimisticGovernanceEnabled";
|
|
2797
|
+
type: "bool";
|
|
2798
|
+
index: false;
|
|
2466
2799
|
}
|
|
2467
2800
|
];
|
|
2468
2801
|
},
|
|
@@ -3105,6 +3438,90 @@ export type Futarchy = {
|
|
|
3105
3438
|
index: false;
|
|
3106
3439
|
}
|
|
3107
3440
|
];
|
|
3441
|
+
},
|
|
3442
|
+
{
|
|
3443
|
+
name: "InitiateVaultSpendOptimisticProposalEvent";
|
|
3444
|
+
fields: [
|
|
3445
|
+
{
|
|
3446
|
+
name: "common";
|
|
3447
|
+
type: {
|
|
3448
|
+
defined: "CommonFields";
|
|
3449
|
+
};
|
|
3450
|
+
index: false;
|
|
3451
|
+
},
|
|
3452
|
+
{
|
|
3453
|
+
name: "dao";
|
|
3454
|
+
type: "publicKey";
|
|
3455
|
+
index: false;
|
|
3456
|
+
},
|
|
3457
|
+
{
|
|
3458
|
+
name: "proposer";
|
|
3459
|
+
type: "publicKey";
|
|
3460
|
+
index: false;
|
|
3461
|
+
},
|
|
3462
|
+
{
|
|
3463
|
+
name: "squadsProposal";
|
|
3464
|
+
type: "publicKey";
|
|
3465
|
+
index: false;
|
|
3466
|
+
},
|
|
3467
|
+
{
|
|
3468
|
+
name: "squadsMultisig";
|
|
3469
|
+
type: "publicKey";
|
|
3470
|
+
index: false;
|
|
3471
|
+
},
|
|
3472
|
+
{
|
|
3473
|
+
name: "squadsMultisigVault";
|
|
3474
|
+
type: "publicKey";
|
|
3475
|
+
index: false;
|
|
3476
|
+
},
|
|
3477
|
+
{
|
|
3478
|
+
name: "amount";
|
|
3479
|
+
type: "u64";
|
|
3480
|
+
index: false;
|
|
3481
|
+
},
|
|
3482
|
+
{
|
|
3483
|
+
name: "recipient";
|
|
3484
|
+
type: "publicKey";
|
|
3485
|
+
index: false;
|
|
3486
|
+
},
|
|
3487
|
+
{
|
|
3488
|
+
name: "daoQuoteVaultAccount";
|
|
3489
|
+
type: "publicKey";
|
|
3490
|
+
index: false;
|
|
3491
|
+
},
|
|
3492
|
+
{
|
|
3493
|
+
name: "recipientQuoteAccount";
|
|
3494
|
+
type: "publicKey";
|
|
3495
|
+
index: false;
|
|
3496
|
+
},
|
|
3497
|
+
{
|
|
3498
|
+
name: "enqueuedTimestamp";
|
|
3499
|
+
type: "i64";
|
|
3500
|
+
index: false;
|
|
3501
|
+
}
|
|
3502
|
+
];
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
name: "FinalizeOptimisticProposalEvent";
|
|
3506
|
+
fields: [
|
|
3507
|
+
{
|
|
3508
|
+
name: "common";
|
|
3509
|
+
type: {
|
|
3510
|
+
defined: "CommonFields";
|
|
3511
|
+
};
|
|
3512
|
+
index: false;
|
|
3513
|
+
},
|
|
3514
|
+
{
|
|
3515
|
+
name: "dao";
|
|
3516
|
+
type: "publicKey";
|
|
3517
|
+
index: false;
|
|
3518
|
+
},
|
|
3519
|
+
{
|
|
3520
|
+
name: "squadsProposal";
|
|
3521
|
+
type: "publicKey";
|
|
3522
|
+
index: false;
|
|
3523
|
+
}
|
|
3524
|
+
];
|
|
3108
3525
|
}
|
|
3109
3526
|
];
|
|
3110
3527
|
errors: [
|
|
@@ -3292,6 +3709,36 @@ export type Futarchy = {
|
|
|
3292
3709
|
code: 6036;
|
|
3293
3710
|
name: "InvalidMint";
|
|
3294
3711
|
msg: "Base mint and quote mint must be different";
|
|
3712
|
+
},
|
|
3713
|
+
{
|
|
3714
|
+
code: 6037;
|
|
3715
|
+
name: "ProposalNotReadyToUnstake";
|
|
3716
|
+
msg: "Proposal is not ready to be unstaked";
|
|
3717
|
+
},
|
|
3718
|
+
{
|
|
3719
|
+
code: 6038;
|
|
3720
|
+
name: "OptimisticGovernanceDisabled";
|
|
3721
|
+
msg: "Optimistic governance is disabled";
|
|
3722
|
+
},
|
|
3723
|
+
{
|
|
3724
|
+
code: 6039;
|
|
3725
|
+
name: "ActiveOptimisticProposalAlreadyEnqueued";
|
|
3726
|
+
msg: "An active optimistic proposal is already enqueued";
|
|
3727
|
+
},
|
|
3728
|
+
{
|
|
3729
|
+
code: 6040;
|
|
3730
|
+
name: "OptimisticProposalAlreadyPassed";
|
|
3731
|
+
msg: "Optimistic proposal has already passed";
|
|
3732
|
+
},
|
|
3733
|
+
{
|
|
3734
|
+
code: 6041;
|
|
3735
|
+
name: "InvalidSpendingLimitMint";
|
|
3736
|
+
msg: "Invalid spending limit mint. Must be the same as the DAO's quote mint";
|
|
3737
|
+
},
|
|
3738
|
+
{
|
|
3739
|
+
code: 6042;
|
|
3740
|
+
name: "NoActiveOptimisticProposal";
|
|
3741
|
+
msg: "No active optimistic proposal";
|
|
3295
3742
|
}
|
|
3296
3743
|
];
|
|
3297
3744
|
};
|