@metadaoproject/futarchy 0.6.0-alpha.0 → 0.6.0-alpha.10
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.3/utils/metadata.js +1 -5
- package/dist/v0.3/utils/metadata.js.map +1 -1
- package/dist/v0.4/utils/metadata.js +1 -5
- package/dist/v0.4/utils/metadata.js.map +1 -1
- package/dist/v0.5/LaunchpadClient.js +5 -2
- package/dist/v0.5/LaunchpadClient.js.map +1 -1
- package/dist/v0.5/constants.d.ts +1 -0
- package/dist/v0.5/constants.js +1 -0
- package/dist/v0.5/constants.js.map +1 -1
- package/dist/v0.5/utils/metadata.js +1 -5
- package/dist/v0.5/utils/metadata.js.map +1 -1
- package/dist/v0.6/FutarchyClient.d.ts +157 -13
- package/dist/v0.6/FutarchyClient.js +50 -50
- package/dist/v0.6/FutarchyClient.js.map +1 -1
- package/dist/v0.6/LaunchpadClient.d.ts +153 -17
- package/dist/v0.6/LaunchpadClient.js +103 -43
- package/dist/v0.6/LaunchpadClient.js.map +1 -1
- package/dist/v0.6/PriceBasedPerformancePackageClient.d.ts +345 -0
- package/dist/v0.6/PriceBasedPerformancePackageClient.js +116 -0
- package/dist/v0.6/PriceBasedPerformancePackageClient.js.map +1 -0
- package/dist/v0.6/constants.d.ts +4 -1
- package/dist/v0.6/constants.js +5 -2
- package/dist/v0.6/constants.js.map +1 -1
- package/dist/v0.6/index.d.ts +1 -0
- package/dist/v0.6/index.js +1 -0
- package/dist/v0.6/index.js.map +1 -1
- package/dist/v0.6/types/futarchy.d.ts +420 -102
- package/dist/v0.6/types/futarchy.js +420 -102
- package/dist/v0.6/types/futarchy.js.map +1 -1
- package/dist/v0.6/types/index.d.ts +7 -4
- package/dist/v0.6/types/index.js +12 -2
- package/dist/v0.6/types/index.js.map +1 -1
- package/dist/v0.6/types/launchpad.d.ts +263 -14
- package/dist/v0.6/types/launchpad.js +263 -14
- package/dist/v0.6/types/launchpad.js.map +1 -1
- package/dist/v0.6/types/price_based_performance_package.d.ts +871 -0
- package/dist/v0.6/types/price_based_performance_package.js +871 -0
- package/dist/v0.6/types/price_based_performance_package.js.map +1 -0
- package/dist/v0.6/utils/metadata.js +1 -5
- package/dist/v0.6/utils/metadata.js.map +1 -1
- package/dist/v0.6/utils/pda.d.ts +11 -0
- package/dist/v0.6/utils/pda.js +12 -3
- package/dist/v0.6/utils/pda.js.map +1 -1
- package/package.json +23 -2
- package/dist/v0.6/types/shared_liquidity_manager.d.ts +0 -89
- package/dist/v0.6/types/shared_liquidity_manager.js +0 -89
- package/dist/v0.6/types/shared_liquidity_manager.js.map +0 -1
|
@@ -164,14 +164,7 @@ export type Futarchy = {
|
|
|
164
164
|
isSigner: false;
|
|
165
165
|
}
|
|
166
166
|
];
|
|
167
|
-
args: [
|
|
168
|
-
{
|
|
169
|
-
name: "params";
|
|
170
|
-
type: {
|
|
171
|
-
defined: "InitializeProposalParams";
|
|
172
|
-
};
|
|
173
|
-
}
|
|
174
|
-
];
|
|
167
|
+
args: [];
|
|
175
168
|
},
|
|
176
169
|
{
|
|
177
170
|
name: "stakeToProposal";
|
|
@@ -744,6 +737,16 @@ export type Futarchy = {
|
|
|
744
737
|
name: "tokenProgram";
|
|
745
738
|
isMut: false;
|
|
746
739
|
isSigner: false;
|
|
740
|
+
},
|
|
741
|
+
{
|
|
742
|
+
name: "eventAuthority";
|
|
743
|
+
isMut: false;
|
|
744
|
+
isSigner: false;
|
|
745
|
+
},
|
|
746
|
+
{
|
|
747
|
+
name: "program";
|
|
748
|
+
isMut: false;
|
|
749
|
+
isSigner: false;
|
|
747
750
|
}
|
|
748
751
|
];
|
|
749
752
|
args: [
|
|
@@ -807,6 +810,16 @@ export type Futarchy = {
|
|
|
807
810
|
name: "tokenProgram";
|
|
808
811
|
isMut: false;
|
|
809
812
|
isSigner: false;
|
|
813
|
+
},
|
|
814
|
+
{
|
|
815
|
+
name: "eventAuthority";
|
|
816
|
+
isMut: false;
|
|
817
|
+
isSigner: false;
|
|
818
|
+
},
|
|
819
|
+
{
|
|
820
|
+
name: "program";
|
|
821
|
+
isMut: false;
|
|
822
|
+
isSigner: false;
|
|
810
823
|
}
|
|
811
824
|
];
|
|
812
825
|
args: [
|
|
@@ -860,6 +873,16 @@ export type Futarchy = {
|
|
|
860
873
|
name: "tokenProgram";
|
|
861
874
|
isMut: false;
|
|
862
875
|
isSigner: false;
|
|
876
|
+
},
|
|
877
|
+
{
|
|
878
|
+
name: "eventAuthority";
|
|
879
|
+
isMut: false;
|
|
880
|
+
isSigner: false;
|
|
881
|
+
},
|
|
882
|
+
{
|
|
883
|
+
name: "program";
|
|
884
|
+
isMut: false;
|
|
885
|
+
isSigner: false;
|
|
863
886
|
}
|
|
864
887
|
];
|
|
865
888
|
args: [
|
|
@@ -908,6 +931,62 @@ export type Futarchy = {
|
|
|
908
931
|
name: "tokenProgram";
|
|
909
932
|
isMut: false;
|
|
910
933
|
isSigner: false;
|
|
934
|
+
},
|
|
935
|
+
{
|
|
936
|
+
name: "eventAuthority";
|
|
937
|
+
isMut: false;
|
|
938
|
+
isSigner: false;
|
|
939
|
+
},
|
|
940
|
+
{
|
|
941
|
+
name: "program";
|
|
942
|
+
isMut: false;
|
|
943
|
+
isSigner: false;
|
|
944
|
+
}
|
|
945
|
+
];
|
|
946
|
+
args: [];
|
|
947
|
+
},
|
|
948
|
+
{
|
|
949
|
+
name: "executeSpendingLimitChange";
|
|
950
|
+
accounts: [
|
|
951
|
+
{
|
|
952
|
+
name: "proposal";
|
|
953
|
+
isMut: true;
|
|
954
|
+
isSigner: false;
|
|
955
|
+
},
|
|
956
|
+
{
|
|
957
|
+
name: "dao";
|
|
958
|
+
isMut: true;
|
|
959
|
+
isSigner: false;
|
|
960
|
+
},
|
|
961
|
+
{
|
|
962
|
+
name: "squadsProposal";
|
|
963
|
+
isMut: true;
|
|
964
|
+
isSigner: false;
|
|
965
|
+
},
|
|
966
|
+
{
|
|
967
|
+
name: "squadsMultisig";
|
|
968
|
+
isMut: false;
|
|
969
|
+
isSigner: false;
|
|
970
|
+
},
|
|
971
|
+
{
|
|
972
|
+
name: "squadsMultisigProgram";
|
|
973
|
+
isMut: false;
|
|
974
|
+
isSigner: false;
|
|
975
|
+
},
|
|
976
|
+
{
|
|
977
|
+
name: "vaultTransaction";
|
|
978
|
+
isMut: false;
|
|
979
|
+
isSigner: false;
|
|
980
|
+
},
|
|
981
|
+
{
|
|
982
|
+
name: "eventAuthority";
|
|
983
|
+
isMut: false;
|
|
984
|
+
isSigner: false;
|
|
985
|
+
},
|
|
986
|
+
{
|
|
987
|
+
name: "program";
|
|
988
|
+
isMut: false;
|
|
989
|
+
isSigner: false;
|
|
911
990
|
}
|
|
912
991
|
];
|
|
913
992
|
args: [];
|
|
@@ -939,6 +1018,13 @@ export type Futarchy = {
|
|
|
939
1018
|
type: {
|
|
940
1019
|
kind: "struct";
|
|
941
1020
|
fields: [
|
|
1021
|
+
{
|
|
1022
|
+
name: "amm";
|
|
1023
|
+
docs: ["Embedded FutarchyAmm - 1:1 relationship"];
|
|
1024
|
+
type: {
|
|
1025
|
+
defined: "FutarchyAmm";
|
|
1026
|
+
};
|
|
1027
|
+
},
|
|
942
1028
|
{
|
|
943
1029
|
name: "nonce";
|
|
944
1030
|
docs: ["`nonce` + `dao_creator` are PDA seeds"];
|
|
@@ -977,8 +1063,8 @@ export type Futarchy = {
|
|
|
977
1063
|
type: "u16";
|
|
978
1064
|
},
|
|
979
1065
|
{
|
|
980
|
-
name: "
|
|
981
|
-
type: "
|
|
1066
|
+
name: "secondsPerProposal";
|
|
1067
|
+
type: "u32";
|
|
982
1068
|
},
|
|
983
1069
|
{
|
|
984
1070
|
name: "twapInitialObservation";
|
|
@@ -1005,11 +1091,11 @@ export type Futarchy = {
|
|
|
1005
1091
|
type: "u128";
|
|
1006
1092
|
},
|
|
1007
1093
|
{
|
|
1008
|
-
name: "
|
|
1094
|
+
name: "twapStartDelaySeconds";
|
|
1009
1095
|
docs: [
|
|
1010
|
-
"Forces TWAP calculation to start after
|
|
1096
|
+
"Forces TWAP calculation to start after `twap_start_delay_seconds` seconds"
|
|
1011
1097
|
];
|
|
1012
|
-
type: "
|
|
1098
|
+
type: "u32";
|
|
1013
1099
|
},
|
|
1014
1100
|
{
|
|
1015
1101
|
name: "minQuoteFutarchicLiquidity";
|
|
@@ -1045,13 +1131,6 @@ export type Futarchy = {
|
|
|
1045
1131
|
defined: "InitialSpendingLimit";
|
|
1046
1132
|
};
|
|
1047
1133
|
};
|
|
1048
|
-
},
|
|
1049
|
-
{
|
|
1050
|
-
name: "amm";
|
|
1051
|
-
docs: ["Embedded FutarchyAmm - 1:1 relationship"];
|
|
1052
|
-
type: {
|
|
1053
|
-
defined: "FutarchyAmm";
|
|
1054
|
-
};
|
|
1055
1134
|
}
|
|
1056
1135
|
];
|
|
1057
1136
|
};
|
|
@@ -1070,12 +1149,8 @@ export type Futarchy = {
|
|
|
1070
1149
|
type: "publicKey";
|
|
1071
1150
|
},
|
|
1072
1151
|
{
|
|
1073
|
-
name: "
|
|
1074
|
-
type: "
|
|
1075
|
-
},
|
|
1076
|
-
{
|
|
1077
|
-
name: "slotEnqueued";
|
|
1078
|
-
type: "u64";
|
|
1152
|
+
name: "timestampEnqueued";
|
|
1153
|
+
type: "i64";
|
|
1079
1154
|
},
|
|
1080
1155
|
{
|
|
1081
1156
|
name: "state";
|
|
@@ -1104,8 +1179,8 @@ export type Futarchy = {
|
|
|
1104
1179
|
type: "publicKey";
|
|
1105
1180
|
},
|
|
1106
1181
|
{
|
|
1107
|
-
name: "
|
|
1108
|
-
type: "
|
|
1182
|
+
name: "durationInSeconds";
|
|
1183
|
+
type: "u32";
|
|
1109
1184
|
},
|
|
1110
1185
|
{
|
|
1111
1186
|
name: "squadsProposal";
|
|
@@ -1168,6 +1243,10 @@ export type Futarchy = {
|
|
|
1168
1243
|
{
|
|
1169
1244
|
name: "unixTimestamp";
|
|
1170
1245
|
type: "i64";
|
|
1246
|
+
},
|
|
1247
|
+
{
|
|
1248
|
+
name: "daoSeqNum";
|
|
1249
|
+
type: "u64";
|
|
1171
1250
|
}
|
|
1172
1251
|
];
|
|
1173
1252
|
};
|
|
@@ -1214,8 +1293,8 @@ export type Futarchy = {
|
|
|
1214
1293
|
type: "u128";
|
|
1215
1294
|
},
|
|
1216
1295
|
{
|
|
1217
|
-
name: "
|
|
1218
|
-
type: "
|
|
1296
|
+
name: "twapStartDelaySeconds";
|
|
1297
|
+
type: "u32";
|
|
1219
1298
|
},
|
|
1220
1299
|
{
|
|
1221
1300
|
name: "minQuoteFutarchicLiquidity";
|
|
@@ -1234,8 +1313,8 @@ export type Futarchy = {
|
|
|
1234
1313
|
type: "u16";
|
|
1235
1314
|
},
|
|
1236
1315
|
{
|
|
1237
|
-
name: "
|
|
1238
|
-
type: "
|
|
1316
|
+
name: "secondsPerProposal";
|
|
1317
|
+
type: "u32";
|
|
1239
1318
|
},
|
|
1240
1319
|
{
|
|
1241
1320
|
name: "nonce";
|
|
@@ -1252,18 +1331,6 @@ export type Futarchy = {
|
|
|
1252
1331
|
];
|
|
1253
1332
|
};
|
|
1254
1333
|
},
|
|
1255
|
-
{
|
|
1256
|
-
name: "InitializeProposalParams";
|
|
1257
|
-
type: {
|
|
1258
|
-
kind: "struct";
|
|
1259
|
-
fields: [
|
|
1260
|
-
{
|
|
1261
|
-
name: "descriptionUrl";
|
|
1262
|
-
type: "string";
|
|
1263
|
-
}
|
|
1264
|
-
];
|
|
1265
|
-
};
|
|
1266
|
-
},
|
|
1267
1334
|
{
|
|
1268
1335
|
name: "ProvideLiquidityParams";
|
|
1269
1336
|
type: {
|
|
@@ -1353,9 +1420,9 @@ export type Futarchy = {
|
|
|
1353
1420
|
};
|
|
1354
1421
|
},
|
|
1355
1422
|
{
|
|
1356
|
-
name: "
|
|
1423
|
+
name: "secondsPerProposal";
|
|
1357
1424
|
type: {
|
|
1358
|
-
option: "
|
|
1425
|
+
option: "u32";
|
|
1359
1426
|
};
|
|
1360
1427
|
},
|
|
1361
1428
|
{
|
|
@@ -1472,12 +1539,32 @@ export type Futarchy = {
|
|
|
1472
1539
|
kind: "struct";
|
|
1473
1540
|
fields: [
|
|
1474
1541
|
{
|
|
1475
|
-
name: "
|
|
1476
|
-
|
|
1542
|
+
name: "aggregator";
|
|
1543
|
+
docs: [
|
|
1544
|
+
"Running sum of slots_per_last_update * last_observation.",
|
|
1545
|
+
"",
|
|
1546
|
+
"Assuming latest observations are as big as possible (u64::MAX * 1e12),",
|
|
1547
|
+
"we can store 18 million slots worth of observations, which turns out to",
|
|
1548
|
+
"be ~85 days worth of slots.",
|
|
1549
|
+
"",
|
|
1550
|
+
"Assuming that latest observations are 100x smaller than they could theoretically",
|
|
1551
|
+
"be, we can store 8500 days (23 years) worth of them. Even this is a very",
|
|
1552
|
+
"very conservative assumption - META/USDC prices should be between 1e9 and",
|
|
1553
|
+
"1e15, which would overflow after 1e15 years worth of slots.",
|
|
1554
|
+
"",
|
|
1555
|
+
"So in the case of an overflow, the aggregator rolls back to 0. It's the",
|
|
1556
|
+
"client's responsibility to sanity check the assets or to handle an",
|
|
1557
|
+
"aggregator at T2 being smaller than an aggregator at T1."
|
|
1558
|
+
];
|
|
1559
|
+
type: "u128";
|
|
1477
1560
|
},
|
|
1478
1561
|
{
|
|
1479
|
-
name: "
|
|
1480
|
-
type: "
|
|
1562
|
+
name: "lastUpdatedTimestamp";
|
|
1563
|
+
type: "i64";
|
|
1564
|
+
},
|
|
1565
|
+
{
|
|
1566
|
+
name: "createdAtTimestamp";
|
|
1567
|
+
type: "i64";
|
|
1481
1568
|
},
|
|
1482
1569
|
{
|
|
1483
1570
|
name: "lastPrice";
|
|
@@ -1498,26 +1585,6 @@ export type Futarchy = {
|
|
|
1498
1585
|
];
|
|
1499
1586
|
type: "u128";
|
|
1500
1587
|
},
|
|
1501
|
-
{
|
|
1502
|
-
name: "aggregator";
|
|
1503
|
-
docs: [
|
|
1504
|
-
"Running sum of slots_per_last_update * last_observation.",
|
|
1505
|
-
"",
|
|
1506
|
-
"Assuming latest observations are as big as possible (u64::MAX * 1e12),",
|
|
1507
|
-
"we can store 18 million slots worth of observations, which turns out to",
|
|
1508
|
-
"be ~85 days worth of slots.",
|
|
1509
|
-
"",
|
|
1510
|
-
"Assuming that latest observations are 100x smaller than they could theoretically",
|
|
1511
|
-
"be, we can store 8500 days (23 years) worth of them. Even this is a very",
|
|
1512
|
-
"very conservative assumption - META/USDC prices should be between 1e9 and",
|
|
1513
|
-
"1e15, which would overflow after 1e15 years worth of slots.",
|
|
1514
|
-
"",
|
|
1515
|
-
"So in the case of an overflow, the aggregator rolls back to 0. It's the",
|
|
1516
|
-
"client's responsibility to sanity check the assets or to handle an",
|
|
1517
|
-
"aggregator at T2 being smaller than an aggregator at T1."
|
|
1518
|
-
];
|
|
1519
|
-
type: "u128";
|
|
1520
|
-
},
|
|
1521
1588
|
{
|
|
1522
1589
|
name: "maxObservationChangePerUpdate";
|
|
1523
1590
|
docs: ["The most that an observation can change per update."];
|
|
@@ -1529,11 +1596,11 @@ export type Futarchy = {
|
|
|
1529
1596
|
type: "u128";
|
|
1530
1597
|
},
|
|
1531
1598
|
{
|
|
1532
|
-
name: "
|
|
1599
|
+
name: "startDelaySeconds";
|
|
1533
1600
|
docs: [
|
|
1534
|
-
"Number of
|
|
1601
|
+
"Number of seconds after amm.created_at_slot to start recording TWAP"
|
|
1535
1602
|
];
|
|
1536
|
-
type: "
|
|
1603
|
+
type: "u32";
|
|
1537
1604
|
}
|
|
1538
1605
|
];
|
|
1539
1606
|
};
|
|
@@ -1543,6 +1610,12 @@ export type Futarchy = {
|
|
|
1543
1610
|
type: {
|
|
1544
1611
|
kind: "struct";
|
|
1545
1612
|
fields: [
|
|
1613
|
+
{
|
|
1614
|
+
name: "oracle";
|
|
1615
|
+
type: {
|
|
1616
|
+
defined: "TwapOracle";
|
|
1617
|
+
};
|
|
1618
|
+
},
|
|
1546
1619
|
{
|
|
1547
1620
|
name: "quoteReserves";
|
|
1548
1621
|
type: "u64";
|
|
@@ -1558,12 +1631,6 @@ export type Futarchy = {
|
|
|
1558
1631
|
{
|
|
1559
1632
|
name: "baseProtocolFeeBalance";
|
|
1560
1633
|
type: "u64";
|
|
1561
|
-
},
|
|
1562
|
-
{
|
|
1563
|
-
name: "oracle";
|
|
1564
|
-
type: {
|
|
1565
|
-
defined: "TwapOracle";
|
|
1566
|
-
};
|
|
1567
1634
|
}
|
|
1568
1635
|
];
|
|
1569
1636
|
};
|
|
@@ -1683,6 +1750,70 @@ export type Futarchy = {
|
|
|
1683
1750
|
}
|
|
1684
1751
|
];
|
|
1685
1752
|
events: [
|
|
1753
|
+
{
|
|
1754
|
+
name: "CollectFeesEvent";
|
|
1755
|
+
fields: [
|
|
1756
|
+
{
|
|
1757
|
+
name: "common";
|
|
1758
|
+
type: {
|
|
1759
|
+
defined: "CommonFields";
|
|
1760
|
+
};
|
|
1761
|
+
index: false;
|
|
1762
|
+
},
|
|
1763
|
+
{
|
|
1764
|
+
name: "dao";
|
|
1765
|
+
type: "publicKey";
|
|
1766
|
+
index: false;
|
|
1767
|
+
},
|
|
1768
|
+
{
|
|
1769
|
+
name: "baseTokenAccount";
|
|
1770
|
+
type: "publicKey";
|
|
1771
|
+
index: false;
|
|
1772
|
+
},
|
|
1773
|
+
{
|
|
1774
|
+
name: "quoteTokenAccount";
|
|
1775
|
+
type: "publicKey";
|
|
1776
|
+
index: false;
|
|
1777
|
+
},
|
|
1778
|
+
{
|
|
1779
|
+
name: "ammBaseVault";
|
|
1780
|
+
type: "publicKey";
|
|
1781
|
+
index: false;
|
|
1782
|
+
},
|
|
1783
|
+
{
|
|
1784
|
+
name: "ammQuoteVault";
|
|
1785
|
+
type: "publicKey";
|
|
1786
|
+
index: false;
|
|
1787
|
+
},
|
|
1788
|
+
{
|
|
1789
|
+
name: "quoteMint";
|
|
1790
|
+
type: "publicKey";
|
|
1791
|
+
index: false;
|
|
1792
|
+
},
|
|
1793
|
+
{
|
|
1794
|
+
name: "baseMint";
|
|
1795
|
+
type: "publicKey";
|
|
1796
|
+
index: false;
|
|
1797
|
+
},
|
|
1798
|
+
{
|
|
1799
|
+
name: "quoteFeesCollected";
|
|
1800
|
+
type: "u64";
|
|
1801
|
+
index: false;
|
|
1802
|
+
},
|
|
1803
|
+
{
|
|
1804
|
+
name: "baseFeesCollected";
|
|
1805
|
+
type: "u64";
|
|
1806
|
+
index: false;
|
|
1807
|
+
},
|
|
1808
|
+
{
|
|
1809
|
+
name: "postAmmState";
|
|
1810
|
+
type: {
|
|
1811
|
+
defined: "FutarchyAmm";
|
|
1812
|
+
};
|
|
1813
|
+
index: false;
|
|
1814
|
+
}
|
|
1815
|
+
];
|
|
1816
|
+
},
|
|
1686
1817
|
{
|
|
1687
1818
|
name: "InitializeDaoEvent";
|
|
1688
1819
|
fields: [
|
|
@@ -1714,8 +1845,8 @@ export type Futarchy = {
|
|
|
1714
1845
|
index: false;
|
|
1715
1846
|
},
|
|
1716
1847
|
{
|
|
1717
|
-
name: "
|
|
1718
|
-
type: "
|
|
1848
|
+
name: "secondsPerProposal";
|
|
1849
|
+
type: "u32";
|
|
1719
1850
|
index: false;
|
|
1720
1851
|
},
|
|
1721
1852
|
{
|
|
@@ -1785,8 +1916,8 @@ export type Futarchy = {
|
|
|
1785
1916
|
index: false;
|
|
1786
1917
|
},
|
|
1787
1918
|
{
|
|
1788
|
-
name: "
|
|
1789
|
-
type: "
|
|
1919
|
+
name: "secondsPerProposal";
|
|
1920
|
+
type: "u32";
|
|
1790
1921
|
index: false;
|
|
1791
1922
|
},
|
|
1792
1923
|
{
|
|
@@ -1867,8 +1998,8 @@ export type Futarchy = {
|
|
|
1867
1998
|
index: false;
|
|
1868
1999
|
},
|
|
1869
2000
|
{
|
|
1870
|
-
name: "
|
|
1871
|
-
type: "
|
|
2001
|
+
name: "durationInSeconds";
|
|
2002
|
+
type: "u32";
|
|
1872
2003
|
index: false;
|
|
1873
2004
|
},
|
|
1874
2005
|
{
|
|
@@ -1976,6 +2107,13 @@ export type Futarchy = {
|
|
|
1976
2107
|
name: "totalStaked";
|
|
1977
2108
|
type: "u64";
|
|
1978
2109
|
index: false;
|
|
2110
|
+
},
|
|
2111
|
+
{
|
|
2112
|
+
name: "postAmmState";
|
|
2113
|
+
type: {
|
|
2114
|
+
defined: "FutarchyAmm";
|
|
2115
|
+
};
|
|
2116
|
+
index: false;
|
|
1979
2117
|
}
|
|
1980
2118
|
];
|
|
1981
2119
|
},
|
|
@@ -2030,11 +2168,69 @@ export type Futarchy = {
|
|
|
2030
2168
|
name: "squadsMultisig";
|
|
2031
2169
|
type: "publicKey";
|
|
2032
2170
|
index: false;
|
|
2171
|
+
},
|
|
2172
|
+
{
|
|
2173
|
+
name: "postAmmState";
|
|
2174
|
+
type: {
|
|
2175
|
+
defined: "FutarchyAmm";
|
|
2176
|
+
};
|
|
2177
|
+
index: false;
|
|
2178
|
+
}
|
|
2179
|
+
];
|
|
2180
|
+
},
|
|
2181
|
+
{
|
|
2182
|
+
name: "SpotSwapEvent";
|
|
2183
|
+
fields: [
|
|
2184
|
+
{
|
|
2185
|
+
name: "common";
|
|
2186
|
+
type: {
|
|
2187
|
+
defined: "CommonFields";
|
|
2188
|
+
};
|
|
2189
|
+
index: false;
|
|
2190
|
+
},
|
|
2191
|
+
{
|
|
2192
|
+
name: "dao";
|
|
2193
|
+
type: "publicKey";
|
|
2194
|
+
index: false;
|
|
2195
|
+
},
|
|
2196
|
+
{
|
|
2197
|
+
name: "user";
|
|
2198
|
+
type: "publicKey";
|
|
2199
|
+
index: false;
|
|
2200
|
+
},
|
|
2201
|
+
{
|
|
2202
|
+
name: "swapType";
|
|
2203
|
+
type: {
|
|
2204
|
+
defined: "SwapType";
|
|
2205
|
+
};
|
|
2206
|
+
index: false;
|
|
2207
|
+
},
|
|
2208
|
+
{
|
|
2209
|
+
name: "inputAmount";
|
|
2210
|
+
type: "u64";
|
|
2211
|
+
index: false;
|
|
2212
|
+
},
|
|
2213
|
+
{
|
|
2214
|
+
name: "outputAmount";
|
|
2215
|
+
type: "u64";
|
|
2216
|
+
index: false;
|
|
2217
|
+
},
|
|
2218
|
+
{
|
|
2219
|
+
name: "minOutputAmount";
|
|
2220
|
+
type: "u64";
|
|
2221
|
+
index: false;
|
|
2222
|
+
},
|
|
2223
|
+
{
|
|
2224
|
+
name: "postAmmState";
|
|
2225
|
+
type: {
|
|
2226
|
+
defined: "FutarchyAmm";
|
|
2227
|
+
};
|
|
2228
|
+
index: false;
|
|
2033
2229
|
}
|
|
2034
2230
|
];
|
|
2035
2231
|
},
|
|
2036
2232
|
{
|
|
2037
|
-
name: "
|
|
2233
|
+
name: "ConditionalSwapEvent";
|
|
2038
2234
|
fields: [
|
|
2039
2235
|
{
|
|
2040
2236
|
name: "common";
|
|
@@ -2043,15 +2239,110 @@ export type Futarchy = {
|
|
|
2043
2239
|
};
|
|
2044
2240
|
index: false;
|
|
2045
2241
|
},
|
|
2242
|
+
{
|
|
2243
|
+
name: "dao";
|
|
2244
|
+
type: "publicKey";
|
|
2245
|
+
index: false;
|
|
2246
|
+
},
|
|
2046
2247
|
{
|
|
2047
2248
|
name: "proposal";
|
|
2048
2249
|
type: "publicKey";
|
|
2049
2250
|
index: false;
|
|
2050
2251
|
},
|
|
2252
|
+
{
|
|
2253
|
+
name: "trader";
|
|
2254
|
+
type: "publicKey";
|
|
2255
|
+
index: false;
|
|
2256
|
+
},
|
|
2257
|
+
{
|
|
2258
|
+
name: "market";
|
|
2259
|
+
type: {
|
|
2260
|
+
defined: "Market";
|
|
2261
|
+
};
|
|
2262
|
+
index: false;
|
|
2263
|
+
},
|
|
2264
|
+
{
|
|
2265
|
+
name: "swapType";
|
|
2266
|
+
type: {
|
|
2267
|
+
defined: "SwapType";
|
|
2268
|
+
};
|
|
2269
|
+
index: false;
|
|
2270
|
+
},
|
|
2271
|
+
{
|
|
2272
|
+
name: "inputAmount";
|
|
2273
|
+
type: "u64";
|
|
2274
|
+
index: false;
|
|
2275
|
+
},
|
|
2276
|
+
{
|
|
2277
|
+
name: "outputAmount";
|
|
2278
|
+
type: "u64";
|
|
2279
|
+
index: false;
|
|
2280
|
+
},
|
|
2281
|
+
{
|
|
2282
|
+
name: "minOutputAmount";
|
|
2283
|
+
type: "u64";
|
|
2284
|
+
index: false;
|
|
2285
|
+
},
|
|
2286
|
+
{
|
|
2287
|
+
name: "postAmmState";
|
|
2288
|
+
type: {
|
|
2289
|
+
defined: "FutarchyAmm";
|
|
2290
|
+
};
|
|
2291
|
+
index: false;
|
|
2292
|
+
}
|
|
2293
|
+
];
|
|
2294
|
+
},
|
|
2295
|
+
{
|
|
2296
|
+
name: "ProvideLiquidityEvent";
|
|
2297
|
+
fields: [
|
|
2298
|
+
{
|
|
2299
|
+
name: "common";
|
|
2300
|
+
type: {
|
|
2301
|
+
defined: "CommonFields";
|
|
2302
|
+
};
|
|
2303
|
+
index: false;
|
|
2304
|
+
},
|
|
2051
2305
|
{
|
|
2052
2306
|
name: "dao";
|
|
2053
2307
|
type: "publicKey";
|
|
2054
2308
|
index: false;
|
|
2309
|
+
},
|
|
2310
|
+
{
|
|
2311
|
+
name: "liquidityProvider";
|
|
2312
|
+
type: "publicKey";
|
|
2313
|
+
index: false;
|
|
2314
|
+
},
|
|
2315
|
+
{
|
|
2316
|
+
name: "positionAuthority";
|
|
2317
|
+
type: "publicKey";
|
|
2318
|
+
index: false;
|
|
2319
|
+
},
|
|
2320
|
+
{
|
|
2321
|
+
name: "quoteAmount";
|
|
2322
|
+
type: "u64";
|
|
2323
|
+
index: false;
|
|
2324
|
+
},
|
|
2325
|
+
{
|
|
2326
|
+
name: "baseAmount";
|
|
2327
|
+
type: "u64";
|
|
2328
|
+
index: false;
|
|
2329
|
+
},
|
|
2330
|
+
{
|
|
2331
|
+
name: "liquidityMinted";
|
|
2332
|
+
type: "u128";
|
|
2333
|
+
index: false;
|
|
2334
|
+
},
|
|
2335
|
+
{
|
|
2336
|
+
name: "minLiquidity";
|
|
2337
|
+
type: "u128";
|
|
2338
|
+
index: false;
|
|
2339
|
+
},
|
|
2340
|
+
{
|
|
2341
|
+
name: "postAmmState";
|
|
2342
|
+
type: {
|
|
2343
|
+
defined: "FutarchyAmm";
|
|
2344
|
+
};
|
|
2345
|
+
index: false;
|
|
2055
2346
|
}
|
|
2056
2347
|
];
|
|
2057
2348
|
},
|
|
@@ -2099,6 +2390,13 @@ export type Futarchy = {
|
|
|
2099
2390
|
name: "quoteAmount";
|
|
2100
2391
|
type: "u64";
|
|
2101
2392
|
index: false;
|
|
2393
|
+
},
|
|
2394
|
+
{
|
|
2395
|
+
name: "postAmmState";
|
|
2396
|
+
type: {
|
|
2397
|
+
defined: "FutarchyAmm";
|
|
2398
|
+
};
|
|
2399
|
+
index: false;
|
|
2102
2400
|
}
|
|
2103
2401
|
];
|
|
2104
2402
|
}
|
|
@@ -2162,87 +2460,107 @@ export type Futarchy = {
|
|
|
2162
2460
|
{
|
|
2163
2461
|
code: 6011;
|
|
2164
2462
|
name: "ProposalDurationTooShort";
|
|
2165
|
-
msg: "Proposal duration must be longer than TWAP start delay";
|
|
2463
|
+
msg: "Proposal duration must be longer 1 day and longer than 2 times the TWAP start delay";
|
|
2166
2464
|
},
|
|
2167
2465
|
{
|
|
2168
2466
|
code: 6012;
|
|
2467
|
+
name: "PassThresholdTooHigh";
|
|
2468
|
+
msg: "Pass threshold must be less than 10%";
|
|
2469
|
+
},
|
|
2470
|
+
{
|
|
2471
|
+
code: 6013;
|
|
2169
2472
|
name: "QuestionMustBeBinary";
|
|
2170
2473
|
msg: "Question must have exactly 2 outcomes for binary futarchy";
|
|
2171
2474
|
},
|
|
2172
2475
|
{
|
|
2173
|
-
code:
|
|
2476
|
+
code: 6014;
|
|
2174
2477
|
name: "InvalidSquadsProposalStatus";
|
|
2175
2478
|
msg: "Squads proposal must be in Draft status";
|
|
2176
2479
|
},
|
|
2177
2480
|
{
|
|
2178
|
-
code:
|
|
2481
|
+
code: 6015;
|
|
2179
2482
|
name: "CastingOverflow";
|
|
2180
2483
|
msg: "Casting overflow. If you're seeing this, please report this";
|
|
2181
2484
|
},
|
|
2182
2485
|
{
|
|
2183
|
-
code:
|
|
2486
|
+
code: 6016;
|
|
2184
2487
|
name: "InsufficientBalance";
|
|
2185
2488
|
msg: "Insufficient balance";
|
|
2186
2489
|
},
|
|
2187
2490
|
{
|
|
2188
|
-
code:
|
|
2491
|
+
code: 6017;
|
|
2189
2492
|
name: "ZeroLiquidityRemove";
|
|
2190
2493
|
msg: "Cannot remove zero liquidity";
|
|
2191
2494
|
},
|
|
2192
2495
|
{
|
|
2193
|
-
code:
|
|
2496
|
+
code: 6018;
|
|
2194
2497
|
name: "SwapSlippageExceeded";
|
|
2195
2498
|
msg: "Swap slippage exceeded";
|
|
2196
2499
|
},
|
|
2197
2500
|
{
|
|
2198
|
-
code:
|
|
2501
|
+
code: 6019;
|
|
2199
2502
|
name: "AssertFailed";
|
|
2200
2503
|
msg: "Assert failed";
|
|
2201
2504
|
},
|
|
2202
2505
|
{
|
|
2203
|
-
code:
|
|
2506
|
+
code: 6020;
|
|
2204
2507
|
name: "InvalidAdmin";
|
|
2205
2508
|
msg: "Invalid admin";
|
|
2206
2509
|
},
|
|
2207
2510
|
{
|
|
2208
|
-
code:
|
|
2511
|
+
code: 6021;
|
|
2209
2512
|
name: "ProposalNotInDraftState";
|
|
2210
2513
|
msg: "Proposal is not in draft state";
|
|
2211
2514
|
},
|
|
2212
2515
|
{
|
|
2213
|
-
code:
|
|
2516
|
+
code: 6022;
|
|
2214
2517
|
name: "InsufficientTokenBalance";
|
|
2215
2518
|
msg: "Insufficient token balance";
|
|
2216
2519
|
},
|
|
2217
2520
|
{
|
|
2218
|
-
code:
|
|
2521
|
+
code: 6023;
|
|
2219
2522
|
name: "InvalidAmount";
|
|
2220
2523
|
msg: "Invalid amount";
|
|
2221
2524
|
},
|
|
2222
2525
|
{
|
|
2223
|
-
code:
|
|
2526
|
+
code: 6024;
|
|
2224
2527
|
name: "InsufficientStakeToLaunch";
|
|
2225
2528
|
msg: "Insufficient stake to launch proposal";
|
|
2226
2529
|
},
|
|
2227
2530
|
{
|
|
2228
|
-
code:
|
|
2531
|
+
code: 6025;
|
|
2229
2532
|
name: "StakerNotFound";
|
|
2230
2533
|
msg: "Staker not found in proposal";
|
|
2231
2534
|
},
|
|
2232
2535
|
{
|
|
2233
|
-
code:
|
|
2536
|
+
code: 6026;
|
|
2234
2537
|
name: "PoolNotInSpotState";
|
|
2235
2538
|
msg: "Pool must be in spot state";
|
|
2236
2539
|
},
|
|
2237
2540
|
{
|
|
2238
|
-
code:
|
|
2541
|
+
code: 6027;
|
|
2239
2542
|
name: "InvalidDaoCreateLiquidity";
|
|
2240
2543
|
msg: "If you're providing liquidity, you must provide both base and quote token accounts";
|
|
2241
2544
|
},
|
|
2242
2545
|
{
|
|
2243
|
-
code:
|
|
2546
|
+
code: 6028;
|
|
2244
2547
|
name: "InvalidStakeAccount";
|
|
2245
2548
|
msg: "Invalid stake account";
|
|
2549
|
+
},
|
|
2550
|
+
{
|
|
2551
|
+
code: 6029;
|
|
2552
|
+
name: "InvariantViolated";
|
|
2553
|
+
msg: "An invariant was violated. You should get in contact with the MetaDAO team if you see this";
|
|
2554
|
+
},
|
|
2555
|
+
{
|
|
2556
|
+
code: 6030;
|
|
2557
|
+
name: "ProposalNotActive";
|
|
2558
|
+
msg: "Proposal needs to be active to perform a conditional swap";
|
|
2559
|
+
},
|
|
2560
|
+
{
|
|
2561
|
+
code: 6031;
|
|
2562
|
+
name: "InvalidTransaction";
|
|
2563
|
+
msg: "This Squads transaction should only contain calls to update spending limits";
|
|
2246
2564
|
}
|
|
2247
2565
|
];
|
|
2248
2566
|
};
|