@stabbleorg/mclmm-sdk 0.1.10 → 0.1.12

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.
@@ -117,7 +117,7 @@
117
117
  "name": "admin",
118
118
  "writable": true,
119
119
  "signer": true,
120
- "address": "AMeGg9qpzv1geQpiEWzhgXempJTuYYZeuLLKX1cYbmaw"
120
+ "address": "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"
121
121
  },
122
122
  {
123
123
  "name": "protocol_position",
@@ -432,7 +432,7 @@
432
432
  "# Arguments",
433
433
  "",
434
434
  "* `ctx`- The accounts needed by instruction.",
435
- "* `index` - The index of amm config, there may be multiple config.",
435
+ "* `index` - The index of clmm config, there may be multiple config.",
436
436
  "* `tick_spacing` - The tickspacing binding with config, cannot be changed.",
437
437
  "* `trade_fee_rate` - Trade fee rate, can be changed.",
438
438
  "* `protocol_fee_rate` - The rate of protocol fee within trade fee.",
@@ -457,7 +457,7 @@
457
457
  ],
458
458
  "writable": true,
459
459
  "signer": true,
460
- "address": "AMeGg9qpzv1geQpiEWzhgXempJTuYYZeuLLKX1cYbmaw"
460
+ "address": "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"
461
461
  },
462
462
  {
463
463
  "name": "amm_config",
@@ -545,7 +545,7 @@
545
545
  ],
546
546
  "writable": true,
547
547
  "signer": true,
548
- "address": "AMeGg9qpzv1geQpiEWzhgXempJTuYYZeuLLKX1cYbmaw"
548
+ "address": "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"
549
549
  },
550
550
  {
551
551
  "name": "operation_state",
@@ -911,123 +911,6 @@
911
911
  ],
912
912
  "args": []
913
913
  },
914
- {
915
- "name": "decrease_liquidity",
916
- "docs": [
917
- "#[deprecated(note = \"Use `decrease_liquidity_v2` instead.\")]",
918
- "Decreases liquidity for an existing position",
919
- "",
920
- "# Arguments",
921
- "",
922
- "* `ctx` - The context of accounts",
923
- "* `liquidity` - The amount by which liquidity will be decreased",
924
- "* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity",
925
- "* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",
926
- ""
927
- ],
928
- "discriminator": [
929
- 160,
930
- 38,
931
- 208,
932
- 111,
933
- 104,
934
- 91,
935
- 44,
936
- 1
937
- ],
938
- "accounts": [
939
- {
940
- "name": "nft_owner",
941
- "docs": [
942
- "The position owner or delegated authority"
943
- ],
944
- "signer": true
945
- },
946
- {
947
- "name": "nft_account",
948
- "docs": [
949
- "The token account for the tokenized position"
950
- ]
951
- },
952
- {
953
- "name": "personal_position",
954
- "docs": [
955
- "Decrease liquidity for this position"
956
- ],
957
- "writable": true
958
- },
959
- {
960
- "name": "pool_state",
961
- "writable": true
962
- },
963
- {
964
- "name": "protocol_position"
965
- },
966
- {
967
- "name": "token_vault_0",
968
- "docs": [
969
- "Token_0 vault"
970
- ],
971
- "writable": true
972
- },
973
- {
974
- "name": "token_vault_1",
975
- "docs": [
976
- "Token_1 vault"
977
- ],
978
- "writable": true
979
- },
980
- {
981
- "name": "tick_array_lower",
982
- "docs": [
983
- "Stores init state for the lower tick"
984
- ],
985
- "writable": true
986
- },
987
- {
988
- "name": "tick_array_upper",
989
- "docs": [
990
- "Stores init state for the upper tick"
991
- ],
992
- "writable": true
993
- },
994
- {
995
- "name": "recipient_token_account_0",
996
- "docs": [
997
- "The destination token account for receive amount_0"
998
- ],
999
- "writable": true
1000
- },
1001
- {
1002
- "name": "recipient_token_account_1",
1003
- "docs": [
1004
- "The destination token account for receive amount_1"
1005
- ],
1006
- "writable": true
1007
- },
1008
- {
1009
- "name": "token_program",
1010
- "docs": [
1011
- "SPL program to transfer out tokens"
1012
- ],
1013
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1014
- }
1015
- ],
1016
- "args": [
1017
- {
1018
- "name": "liquidity",
1019
- "type": "u128"
1020
- },
1021
- {
1022
- "name": "amount_0_min",
1023
- "type": "u64"
1024
- },
1025
- {
1026
- "name": "amount_1_min",
1027
- "type": "u64"
1028
- }
1029
- ]
1030
- },
1031
914
  {
1032
915
  "name": "decrease_liquidity_v2",
1033
916
  "docs": [
@@ -1170,123 +1053,6 @@
1170
1053
  }
1171
1054
  ]
1172
1055
  },
1173
- {
1174
- "name": "increase_liquidity",
1175
- "docs": [
1176
- "#[deprecated(note = \"Use `increase_liquidity_v2` instead.\")]",
1177
- "Increases liquidity for an existing position, with amount paid by `payer`",
1178
- "",
1179
- "# Arguments",
1180
- "",
1181
- "* `ctx` - The context of accounts",
1182
- "* `liquidity` - The desired liquidity to be added, can't be zero",
1183
- "* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check",
1184
- "* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",
1185
- ""
1186
- ],
1187
- "discriminator": [
1188
- 46,
1189
- 156,
1190
- 243,
1191
- 118,
1192
- 13,
1193
- 205,
1194
- 251,
1195
- 178
1196
- ],
1197
- "accounts": [
1198
- {
1199
- "name": "nft_owner",
1200
- "docs": [
1201
- "Pays to mint the position"
1202
- ],
1203
- "signer": true
1204
- },
1205
- {
1206
- "name": "nft_account",
1207
- "docs": [
1208
- "The token account for nft"
1209
- ]
1210
- },
1211
- {
1212
- "name": "pool_state",
1213
- "writable": true
1214
- },
1215
- {
1216
- "name": "protocol_position"
1217
- },
1218
- {
1219
- "name": "personal_position",
1220
- "docs": [
1221
- "Increase liquidity for this position"
1222
- ],
1223
- "writable": true
1224
- },
1225
- {
1226
- "name": "tick_array_lower",
1227
- "docs": [
1228
- "Stores init state for the lower tick"
1229
- ],
1230
- "writable": true
1231
- },
1232
- {
1233
- "name": "tick_array_upper",
1234
- "docs": [
1235
- "Stores init state for the upper tick"
1236
- ],
1237
- "writable": true
1238
- },
1239
- {
1240
- "name": "token_account_0",
1241
- "docs": [
1242
- "The payer's token account for token_0"
1243
- ],
1244
- "writable": true
1245
- },
1246
- {
1247
- "name": "token_account_1",
1248
- "docs": [
1249
- "The token account spending token_1 to mint the position"
1250
- ],
1251
- "writable": true
1252
- },
1253
- {
1254
- "name": "token_vault_0",
1255
- "docs": [
1256
- "The address that holds pool tokens for token_0"
1257
- ],
1258
- "writable": true
1259
- },
1260
- {
1261
- "name": "token_vault_1",
1262
- "docs": [
1263
- "The address that holds pool tokens for token_1"
1264
- ],
1265
- "writable": true
1266
- },
1267
- {
1268
- "name": "token_program",
1269
- "docs": [
1270
- "Program to create mint account and mint tokens"
1271
- ],
1272
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1273
- }
1274
- ],
1275
- "args": [
1276
- {
1277
- "name": "liquidity",
1278
- "type": "u128"
1279
- },
1280
- {
1281
- "name": "amount_0_max",
1282
- "type": "u64"
1283
- },
1284
- {
1285
- "name": "amount_1_max",
1286
- "type": "u64"
1287
- }
1288
- ]
1289
- },
1290
1056
  {
1291
1057
  "name": "increase_liquidity_v2",
1292
1058
  "docs": [
@@ -1450,840 +1216,122 @@
1450
1216
  196,
1451
1217
  242,
1452
1218
  129,
1453
- 230,
1454
- 68
1455
- ],
1456
- "accounts": [
1457
- {
1458
- "name": "reward_funder",
1459
- "docs": [
1460
- "The founder deposit reward token to vault"
1461
- ],
1462
- "writable": true,
1463
- "signer": true
1464
- },
1465
- {
1466
- "name": "funder_token_account",
1467
- "writable": true
1468
- },
1469
- {
1470
- "name": "amm_config",
1471
- "docs": [
1472
- "For check the reward_funder authority"
1473
- ]
1474
- },
1475
- {
1476
- "name": "pool_state",
1477
- "docs": [
1478
- "Set reward for this pool"
1479
- ],
1480
- "writable": true
1481
- },
1482
- {
1483
- "name": "operation_state",
1484
- "docs": [
1485
- "load info from the account to judge reward permission"
1486
- ],
1487
- "pda": {
1488
- "seeds": [
1489
- {
1490
- "kind": "const",
1491
- "value": [
1492
- 111,
1493
- 112,
1494
- 101,
1495
- 114,
1496
- 97,
1497
- 116,
1498
- 105,
1499
- 111,
1500
- 110
1501
- ]
1502
- }
1503
- ]
1504
- }
1505
- },
1506
- {
1507
- "name": "reward_token_mint",
1508
- "docs": [
1509
- "Reward mint"
1510
- ]
1511
- },
1512
- {
1513
- "name": "reward_token_vault",
1514
- "writable": true,
1515
- "pda": {
1516
- "seeds": [
1517
- {
1518
- "kind": "const",
1519
- "value": [
1520
- 112,
1521
- 111,
1522
- 111,
1523
- 108,
1524
- 95,
1525
- 114,
1526
- 101,
1527
- 119,
1528
- 97,
1529
- 114,
1530
- 100,
1531
- 95,
1532
- 118,
1533
- 97,
1534
- 117,
1535
- 108,
1536
- 116
1537
- ]
1538
- },
1539
- {
1540
- "kind": "account",
1541
- "path": "pool_state"
1542
- },
1543
- {
1544
- "kind": "account",
1545
- "path": "reward_token_mint"
1546
- }
1547
- ]
1548
- }
1549
- },
1550
- {
1551
- "name": "reward_token_program"
1552
- },
1553
- {
1554
- "name": "system_program",
1555
- "address": "11111111111111111111111111111111"
1556
- },
1557
- {
1558
- "name": "rent",
1559
- "address": "SysvarRent111111111111111111111111111111111"
1560
- }
1561
- ],
1562
- "args": [
1563
- {
1564
- "name": "param",
1565
- "type": {
1566
- "defined": {
1567
- "name": "InitializeRewardParam"
1568
- }
1569
- }
1570
- }
1571
- ]
1572
- },
1573
- {
1574
- "name": "open_position",
1575
- "docs": [
1576
- "#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]",
1577
- "Creates a new position wrapped in a NFT",
1578
- "",
1579
- "# Arguments",
1580
- "",
1581
- "* `ctx` - The context of accounts",
1582
- "* `tick_lower_index` - The low boundary of market",
1583
- "* `tick_upper_index` - The upper boundary of market",
1584
- "* `tick_array_lower_start_index` - The start index of tick array which include tick low",
1585
- "* `tick_array_upper_start_index` - The start index of tick array which include tick upper",
1586
- "* `liquidity` - The liquidity to be added",
1587
- "* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check",
1588
- "* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",
1589
- ""
1590
- ],
1591
- "discriminator": [
1592
- 135,
1593
- 128,
1594
- 47,
1595
- 77,
1596
- 15,
1597
- 152,
1598
- 240,
1599
- 49
1600
- ],
1601
- "accounts": [
1602
- {
1603
- "name": "payer",
1604
- "docs": [
1605
- "Pays to mint the position"
1606
- ],
1607
- "writable": true,
1608
- "signer": true
1609
- },
1610
- {
1611
- "name": "position_nft_owner"
1612
- },
1613
- {
1614
- "name": "position_nft_mint",
1615
- "docs": [
1616
- "Unique token mint address"
1617
- ],
1618
- "writable": true,
1619
- "signer": true
1620
- },
1621
- {
1622
- "name": "position_nft_account",
1623
- "docs": [
1624
- "Token account where position NFT will be minted",
1625
- "This account created in the contract by cpi to avoid large stack variables"
1626
- ],
1627
- "writable": true,
1628
- "pda": {
1629
- "seeds": [
1630
- {
1631
- "kind": "account",
1632
- "path": "position_nft_owner"
1633
- },
1634
- {
1635
- "kind": "const",
1636
- "value": [
1637
- 6,
1638
- 221,
1639
- 246,
1640
- 225,
1641
- 215,
1642
- 101,
1643
- 161,
1644
- 147,
1645
- 217,
1646
- 203,
1647
- 225,
1648
- 70,
1649
- 206,
1650
- 235,
1651
- 121,
1652
- 172,
1653
- 28,
1654
- 180,
1655
- 133,
1656
- 237,
1657
- 95,
1658
- 91,
1659
- 55,
1660
- 145,
1661
- 58,
1662
- 140,
1663
- 245,
1664
- 133,
1665
- 126,
1666
- 255,
1667
- 0,
1668
- 169
1669
- ]
1670
- },
1671
- {
1672
- "kind": "account",
1673
- "path": "position_nft_mint"
1674
- }
1675
- ],
1676
- "program": {
1677
- "kind": "const",
1678
- "value": [
1679
- 140,
1680
- 151,
1681
- 37,
1682
- 143,
1683
- 78,
1684
- 36,
1685
- 137,
1686
- 241,
1687
- 187,
1688
- 61,
1689
- 16,
1690
- 41,
1691
- 20,
1692
- 142,
1693
- 13,
1694
- 131,
1695
- 11,
1696
- 90,
1697
- 19,
1698
- 153,
1699
- 218,
1700
- 255,
1701
- 16,
1702
- 132,
1703
- 4,
1704
- 142,
1705
- 123,
1706
- 216,
1707
- 219,
1708
- 233,
1709
- 248,
1710
- 89
1711
- ]
1712
- }
1713
- }
1714
- },
1715
- {
1716
- "name": "metadata_account",
1717
- "docs": [
1718
- "To store metaplex metadata"
1719
- ],
1720
- "writable": true
1721
- },
1722
- {
1723
- "name": "pool_state",
1724
- "docs": [
1725
- "Add liquidity for this pool"
1726
- ],
1727
- "writable": true
1728
- },
1729
- {
1730
- "name": "protocol_position"
1731
- },
1732
- {
1733
- "name": "tick_array_lower",
1734
- "writable": true,
1735
- "pda": {
1736
- "seeds": [
1737
- {
1738
- "kind": "const",
1739
- "value": [
1740
- 116,
1741
- 105,
1742
- 99,
1743
- 107,
1744
- 95,
1745
- 97,
1746
- 114,
1747
- 114,
1748
- 97,
1749
- 121
1750
- ]
1751
- },
1752
- {
1753
- "kind": "account",
1754
- "path": "pool_state"
1755
- },
1756
- {
1757
- "kind": "arg",
1758
- "path": "tick_array_lower_start_index"
1759
- }
1760
- ]
1761
- }
1762
- },
1763
- {
1764
- "name": "tick_array_upper",
1765
- "writable": true,
1766
- "pda": {
1767
- "seeds": [
1768
- {
1769
- "kind": "const",
1770
- "value": [
1771
- 116,
1772
- 105,
1773
- 99,
1774
- 107,
1775
- 95,
1776
- 97,
1777
- 114,
1778
- 114,
1779
- 97,
1780
- 121
1781
- ]
1782
- },
1783
- {
1784
- "kind": "account",
1785
- "path": "pool_state"
1786
- },
1787
- {
1788
- "kind": "arg",
1789
- "path": "tick_array_upper_start_index"
1790
- }
1791
- ]
1792
- }
1793
- },
1794
- {
1795
- "name": "personal_position",
1796
- "docs": [
1797
- "personal position state"
1798
- ],
1799
- "writable": true,
1800
- "pda": {
1801
- "seeds": [
1802
- {
1803
- "kind": "const",
1804
- "value": [
1805
- 112,
1806
- 111,
1807
- 115,
1808
- 105,
1809
- 116,
1810
- 105,
1811
- 111,
1812
- 110
1813
- ]
1814
- },
1815
- {
1816
- "kind": "account",
1817
- "path": "position_nft_mint"
1818
- }
1819
- ]
1820
- }
1821
- },
1822
- {
1823
- "name": "token_account_0",
1824
- "docs": [
1825
- "The token_0 account deposit token to the pool"
1826
- ],
1827
- "writable": true
1828
- },
1829
- {
1830
- "name": "token_account_1",
1831
- "docs": [
1832
- "The token_1 account deposit token to the pool"
1833
- ],
1834
- "writable": true
1835
- },
1836
- {
1837
- "name": "token_vault_0",
1838
- "docs": [
1839
- "The address that holds pool tokens for token_0"
1840
- ],
1841
- "writable": true
1842
- },
1843
- {
1844
- "name": "token_vault_1",
1845
- "docs": [
1846
- "The address that holds pool tokens for token_1"
1847
- ],
1848
- "writable": true
1849
- },
1850
- {
1851
- "name": "rent",
1852
- "docs": [
1853
- "Sysvar for token mint and ATA creation"
1854
- ],
1855
- "address": "SysvarRent111111111111111111111111111111111"
1856
- },
1857
- {
1858
- "name": "system_program",
1859
- "docs": [
1860
- "Program to create the position manager state account"
1861
- ],
1862
- "address": "11111111111111111111111111111111"
1863
- },
1864
- {
1865
- "name": "token_program",
1866
- "docs": [
1867
- "Program to create mint account and mint tokens"
1868
- ],
1869
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1870
- },
1871
- {
1872
- "name": "associated_token_program",
1873
- "docs": [
1874
- "Program to create an ATA for receiving position NFT"
1875
- ],
1876
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1877
- },
1878
- {
1879
- "name": "metadata_program",
1880
- "docs": [
1881
- "Program to create NFT metadata"
1882
- ],
1883
- "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
1884
- }
1885
- ],
1886
- "args": [
1887
- {
1888
- "name": "tick_lower_index",
1889
- "type": "i32"
1890
- },
1891
- {
1892
- "name": "tick_upper_index",
1893
- "type": "i32"
1894
- },
1895
- {
1896
- "name": "tick_array_lower_start_index",
1897
- "type": "i32"
1898
- },
1899
- {
1900
- "name": "tick_array_upper_start_index",
1901
- "type": "i32"
1902
- },
1903
- {
1904
- "name": "liquidity",
1905
- "type": "u128"
1906
- },
1907
- {
1908
- "name": "amount_0_max",
1909
- "type": "u64"
1910
- },
1911
- {
1912
- "name": "amount_1_max",
1913
- "type": "u64"
1914
- }
1915
- ]
1916
- },
1917
- {
1918
- "name": "open_position_v2",
1919
- "docs": [
1920
- "#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]",
1921
- "Creates a new position wrapped in a NFT, support Token2022",
1922
- "",
1923
- "# Arguments",
1924
- "",
1925
- "* `ctx` - The context of accounts",
1926
- "* `tick_lower_index` - The low boundary of market",
1927
- "* `tick_upper_index` - The upper boundary of market",
1928
- "* `tick_array_lower_start_index` - The start index of tick array which include tick low",
1929
- "* `tick_array_upper_start_index` - The start index of tick array which include tick upper",
1930
- "* `liquidity` - The liquidity to be added, if zero, and the base_flag is specified, calculate liquidity base amount_0_max or amount_1_max according base_flag, otherwise open position with zero liquidity",
1931
- "* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check",
1932
- "* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",
1933
- "* `with_metadata` - The flag indicating whether to create NFT mint metadata",
1934
- "* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",
1935
- ""
1936
- ],
1937
- "discriminator": [
1938
- 77,
1939
- 184,
1940
- 74,
1941
- 214,
1942
- 112,
1943
- 86,
1944
- 241,
1945
- 199
1946
- ],
1947
- "accounts": [
1948
- {
1949
- "name": "payer",
1950
- "docs": [
1951
- "Pays to mint the position"
1952
- ],
1953
- "writable": true,
1954
- "signer": true
1955
- },
1956
- {
1957
- "name": "position_nft_owner"
1958
- },
1959
- {
1960
- "name": "position_nft_mint",
1961
- "docs": [
1962
- "Unique token mint address"
1963
- ],
1964
- "writable": true,
1965
- "signer": true
1966
- },
1967
- {
1968
- "name": "position_nft_account",
1969
- "docs": [
1970
- "Token account where position NFT will be minted"
1971
- ],
1972
- "writable": true,
1973
- "pda": {
1974
- "seeds": [
1975
- {
1976
- "kind": "account",
1977
- "path": "position_nft_owner"
1978
- },
1979
- {
1980
- "kind": "const",
1981
- "value": [
1982
- 6,
1983
- 221,
1984
- 246,
1985
- 225,
1986
- 215,
1987
- 101,
1988
- 161,
1989
- 147,
1990
- 217,
1991
- 203,
1992
- 225,
1993
- 70,
1994
- 206,
1995
- 235,
1996
- 121,
1997
- 172,
1998
- 28,
1999
- 180,
2000
- 133,
2001
- 237,
2002
- 95,
2003
- 91,
2004
- 55,
2005
- 145,
2006
- 58,
2007
- 140,
2008
- 245,
2009
- 133,
2010
- 126,
2011
- 255,
2012
- 0,
2013
- 169
2014
- ]
2015
- },
2016
- {
2017
- "kind": "account",
2018
- "path": "position_nft_mint"
2019
- }
2020
- ],
2021
- "program": {
2022
- "kind": "const",
2023
- "value": [
2024
- 140,
2025
- 151,
2026
- 37,
2027
- 143,
2028
- 78,
2029
- 36,
2030
- 137,
2031
- 241,
2032
- 187,
2033
- 61,
2034
- 16,
2035
- 41,
2036
- 20,
2037
- 142,
2038
- 13,
2039
- 131,
2040
- 11,
2041
- 90,
2042
- 19,
2043
- 153,
2044
- 218,
2045
- 255,
2046
- 16,
2047
- 132,
2048
- 4,
2049
- 142,
2050
- 123,
2051
- 216,
2052
- 219,
2053
- 233,
2054
- 248,
2055
- 89
2056
- ]
2057
- }
2058
- }
2059
- },
2060
- {
2061
- "name": "metadata_account",
2062
- "docs": [
2063
- "To store metaplex metadata"
2064
- ],
2065
- "writable": true
2066
- },
2067
- {
2068
- "name": "pool_state",
2069
- "docs": [
2070
- "Add liquidity for this pool"
2071
- ],
2072
- "writable": true
2073
- },
2074
- {
2075
- "name": "protocol_position"
2076
- },
2077
- {
2078
- "name": "tick_array_lower",
2079
- "writable": true,
2080
- "pda": {
2081
- "seeds": [
2082
- {
2083
- "kind": "const",
2084
- "value": [
2085
- 116,
2086
- 105,
2087
- 99,
2088
- 107,
2089
- 95,
2090
- 97,
2091
- 114,
2092
- 114,
2093
- 97,
2094
- 121
2095
- ]
2096
- },
2097
- {
2098
- "kind": "account",
2099
- "path": "pool_state"
2100
- },
2101
- {
2102
- "kind": "arg",
2103
- "path": "tick_array_lower_start_index"
2104
- }
2105
- ]
2106
- }
2107
- },
2108
- {
2109
- "name": "tick_array_upper",
2110
- "writable": true,
2111
- "pda": {
2112
- "seeds": [
2113
- {
2114
- "kind": "const",
2115
- "value": [
2116
- 116,
2117
- 105,
2118
- 99,
2119
- 107,
2120
- 95,
2121
- 97,
2122
- 114,
2123
- 114,
2124
- 97,
2125
- 121
2126
- ]
2127
- },
2128
- {
2129
- "kind": "account",
2130
- "path": "pool_state"
2131
- },
2132
- {
2133
- "kind": "arg",
2134
- "path": "tick_array_upper_start_index"
2135
- }
2136
- ]
2137
- }
2138
- },
2139
- {
2140
- "name": "personal_position",
2141
- "docs": [
2142
- "personal position state"
2143
- ],
2144
- "writable": true,
2145
- "pda": {
2146
- "seeds": [
2147
- {
2148
- "kind": "const",
2149
- "value": [
2150
- 112,
2151
- 111,
2152
- 115,
2153
- 105,
2154
- 116,
2155
- 105,
2156
- 111,
2157
- 110
2158
- ]
2159
- },
2160
- {
2161
- "kind": "account",
2162
- "path": "position_nft_mint"
2163
- }
2164
- ]
2165
- }
2166
- },
2167
- {
2168
- "name": "token_account_0",
2169
- "docs": [
2170
- "The token_0 account deposit token to the pool"
2171
- ],
2172
- "writable": true
2173
- },
2174
- {
2175
- "name": "token_account_1",
2176
- "docs": [
2177
- "The token_1 account deposit token to the pool"
2178
- ],
2179
- "writable": true
2180
- },
2181
- {
2182
- "name": "token_vault_0",
2183
- "docs": [
2184
- "The address that holds pool tokens for token_0"
2185
- ],
2186
- "writable": true
2187
- },
2188
- {
2189
- "name": "token_vault_1",
2190
- "docs": [
2191
- "The address that holds pool tokens for token_1"
2192
- ],
2193
- "writable": true
2194
- },
2195
- {
2196
- "name": "rent",
2197
- "docs": [
2198
- "Sysvar for token mint and ATA creation"
2199
- ],
2200
- "address": "SysvarRent111111111111111111111111111111111"
2201
- },
2202
- {
2203
- "name": "system_program",
2204
- "docs": [
2205
- "Program to create the position manager state account"
2206
- ],
2207
- "address": "11111111111111111111111111111111"
2208
- },
1219
+ 230,
1220
+ 68
1221
+ ],
1222
+ "accounts": [
2209
1223
  {
2210
- "name": "token_program",
1224
+ "name": "reward_funder",
2211
1225
  "docs": [
2212
- "Program to create mint account and mint tokens"
1226
+ "The founder deposit reward token to vault"
2213
1227
  ],
2214
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
1228
+ "writable": true,
1229
+ "signer": true
2215
1230
  },
2216
1231
  {
2217
- "name": "associated_token_program",
2218
- "docs": [
2219
- "Program to create an ATA for receiving position NFT"
2220
- ],
2221
- "address": "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
1232
+ "name": "funder_token_account",
1233
+ "writable": true
2222
1234
  },
2223
1235
  {
2224
- "name": "metadata_program",
1236
+ "name": "amm_config",
2225
1237
  "docs": [
2226
- "Program to create NFT metadata"
2227
- ],
2228
- "address": "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"
1238
+ "For check the reward_funder authority"
1239
+ ]
2229
1240
  },
2230
1241
  {
2231
- "name": "token_program_2022",
1242
+ "name": "pool_state",
2232
1243
  "docs": [
2233
- "Program to create mint account and mint tokens"
1244
+ "Set reward for this pool"
2234
1245
  ],
2235
- "address": "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
1246
+ "writable": true
2236
1247
  },
2237
1248
  {
2238
- "name": "vault_0_mint",
1249
+ "name": "operation_state",
2239
1250
  "docs": [
2240
- "The mint of token vault 0"
2241
- ]
1251
+ "load info from the account to judge reward permission"
1252
+ ],
1253
+ "pda": {
1254
+ "seeds": [
1255
+ {
1256
+ "kind": "const",
1257
+ "value": [
1258
+ 111,
1259
+ 112,
1260
+ 101,
1261
+ 114,
1262
+ 97,
1263
+ 116,
1264
+ 105,
1265
+ 111,
1266
+ 110
1267
+ ]
1268
+ }
1269
+ ]
1270
+ }
2242
1271
  },
2243
1272
  {
2244
- "name": "vault_1_mint",
1273
+ "name": "reward_token_mint",
2245
1274
  "docs": [
2246
- "The mint of token vault 1"
1275
+ "Reward mint"
2247
1276
  ]
2248
- }
2249
- ],
2250
- "args": [
2251
- {
2252
- "name": "tick_lower_index",
2253
- "type": "i32"
2254
- },
2255
- {
2256
- "name": "tick_upper_index",
2257
- "type": "i32"
2258
- },
2259
- {
2260
- "name": "tick_array_lower_start_index",
2261
- "type": "i32"
2262
- },
2263
- {
2264
- "name": "tick_array_upper_start_index",
2265
- "type": "i32"
2266
1277
  },
2267
1278
  {
2268
- "name": "liquidity",
2269
- "type": "u128"
1279
+ "name": "reward_token_vault",
1280
+ "writable": true,
1281
+ "pda": {
1282
+ "seeds": [
1283
+ {
1284
+ "kind": "const",
1285
+ "value": [
1286
+ 112,
1287
+ 111,
1288
+ 111,
1289
+ 108,
1290
+ 95,
1291
+ 114,
1292
+ 101,
1293
+ 119,
1294
+ 97,
1295
+ 114,
1296
+ 100,
1297
+ 95,
1298
+ 118,
1299
+ 97,
1300
+ 117,
1301
+ 108,
1302
+ 116
1303
+ ]
1304
+ },
1305
+ {
1306
+ "kind": "account",
1307
+ "path": "pool_state"
1308
+ },
1309
+ {
1310
+ "kind": "account",
1311
+ "path": "reward_token_mint"
1312
+ }
1313
+ ]
1314
+ }
2270
1315
  },
2271
1316
  {
2272
- "name": "amount_0_max",
2273
- "type": "u64"
1317
+ "name": "reward_token_program"
2274
1318
  },
2275
1319
  {
2276
- "name": "amount_1_max",
2277
- "type": "u64"
1320
+ "name": "system_program",
1321
+ "address": "11111111111111111111111111111111"
2278
1322
  },
2279
1323
  {
2280
- "name": "with_metadata",
2281
- "type": "bool"
2282
- },
1324
+ "name": "rent",
1325
+ "address": "SysvarRent111111111111111111111111111111111"
1326
+ }
1327
+ ],
1328
+ "args": [
2283
1329
  {
2284
- "name": "base_flag",
1330
+ "name": "param",
2285
1331
  "type": {
2286
- "option": "bool"
1332
+ "defined": {
1333
+ "name": "InitializeRewardParam"
1334
+ }
2287
1335
  }
2288
1336
  }
2289
1337
  ]
@@ -2656,118 +1704,6 @@
2656
1704
  }
2657
1705
  ]
2658
1706
  },
2659
- {
2660
- "name": "swap",
2661
- "docs": [
2662
- "#[deprecated(note = \"Use `swap_v2` instead.\")]",
2663
- "Swaps one token for as much as possible of another token across a single pool",
2664
- "",
2665
- "# Arguments",
2666
- "",
2667
- "* `ctx` - The context of accounts",
2668
- "* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)",
2669
- "* `other_amount_threshold` - For slippage check",
2670
- "* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot",
2671
- "* `is_base_input` - swap base input or swap base output",
2672
- ""
2673
- ],
2674
- "discriminator": [
2675
- 248,
2676
- 198,
2677
- 158,
2678
- 145,
2679
- 225,
2680
- 117,
2681
- 135,
2682
- 200
2683
- ],
2684
- "accounts": [
2685
- {
2686
- "name": "payer",
2687
- "docs": [
2688
- "The user performing the swap"
2689
- ],
2690
- "signer": true
2691
- },
2692
- {
2693
- "name": "amm_config",
2694
- "docs": [
2695
- "The factory state to read protocol fees"
2696
- ]
2697
- },
2698
- {
2699
- "name": "pool_state",
2700
- "docs": [
2701
- "The program account of the pool in which the swap will be performed"
2702
- ],
2703
- "writable": true
2704
- },
2705
- {
2706
- "name": "input_token_account",
2707
- "docs": [
2708
- "The user token account for input token"
2709
- ],
2710
- "writable": true
2711
- },
2712
- {
2713
- "name": "output_token_account",
2714
- "docs": [
2715
- "The user token account for output token"
2716
- ],
2717
- "writable": true
2718
- },
2719
- {
2720
- "name": "input_vault",
2721
- "docs": [
2722
- "The vault token account for input token"
2723
- ],
2724
- "writable": true
2725
- },
2726
- {
2727
- "name": "output_vault",
2728
- "docs": [
2729
- "The vault token account for output token"
2730
- ],
2731
- "writable": true
2732
- },
2733
- {
2734
- "name": "observation_state",
2735
- "docs": [
2736
- "The program account for the most recent oracle observation"
2737
- ],
2738
- "writable": true
2739
- },
2740
- {
2741
- "name": "token_program",
2742
- "docs": [
2743
- "SPL program for token transfers"
2744
- ],
2745
- "address": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"
2746
- },
2747
- {
2748
- "name": "tick_array",
2749
- "writable": true
2750
- }
2751
- ],
2752
- "args": [
2753
- {
2754
- "name": "amount",
2755
- "type": "u64"
2756
- },
2757
- {
2758
- "name": "other_amount_threshold",
2759
- "type": "u64"
2760
- },
2761
- {
2762
- "name": "sqrt_price_limit_x64",
2763
- "type": "u128"
2764
- },
2765
- {
2766
- "name": "is_base_input",
2767
- "type": "bool"
2768
- }
2769
- ]
2770
- },
2771
1707
  {
2772
1708
  "name": "swap_router_base_in",
2773
1709
  "docs": [
@@ -3006,7 +1942,7 @@
3006
1942
  "Address to be set as operation account owner."
3007
1943
  ],
3008
1944
  "signer": true,
3009
- "address": "AMeGg9qpzv1geQpiEWzhgXempJTuYYZeuLLKX1cYbmaw"
1945
+ "address": "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"
3010
1946
  },
3011
1947
  {
3012
1948
  "name": "pool_state",
@@ -3023,15 +1959,15 @@
3023
1959
  {
3024
1960
  "name": "update_amm_config",
3025
1961
  "docs": [
3026
- "Updates the owner of the amm config",
1962
+ "Updates the owner of the clmm config",
3027
1963
  "Must be called by the current owner or admin",
3028
1964
  "",
3029
1965
  "# Arguments",
3030
1966
  "",
3031
1967
  "* `ctx`- The context of accounts",
3032
- "* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0",
3033
- "* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1",
3034
- "* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2",
1968
+ "* `trade_fee_rate`- The new trade fee rate of clmm config, be set when `param` is 0",
1969
+ "* `protocol_fee_rate`- The new protocol fee rate of clmm config, be set when `param` is 1",
1970
+ "* `fund_fee_rate`- The new fund fee rate of clmm config, be set when `param` is 2",
3035
1971
  "* `new_owner`- The config's new owner, be set when `param` is 3",
3036
1972
  "* `new_fund_owner`- The config's new fund owner, be set when `param` is 4",
3037
1973
  "* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",
@@ -3051,10 +1987,10 @@
3051
1987
  {
3052
1988
  "name": "owner",
3053
1989
  "docs": [
3054
- "The amm config owner or admin"
1990
+ "The clmm config owner or admin"
3055
1991
  ],
3056
1992
  "signer": true,
3057
- "address": "AMeGg9qpzv1geQpiEWzhgXempJTuYYZeuLLKX1cYbmaw"
1993
+ "address": "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"
3058
1994
  },
3059
1995
  {
3060
1996
  "name": "amm_config",
@@ -3107,7 +2043,7 @@
3107
2043
  "Address to be set as operation account owner."
3108
2044
  ],
3109
2045
  "signer": true,
3110
- "address": "AMeGg9qpzv1geQpiEWzhgXempJTuYYZeuLLKX1cYbmaw"
2046
+ "address": "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"
3111
2047
  },
3112
2048
  {
3113
2049
  "name": "operation_state",
@@ -3177,7 +2113,7 @@
3177
2113
  {
3178
2114
  "name": "authority",
3179
2115
  "signer": true,
3180
- "address": "AMeGg9qpzv1geQpiEWzhgXempJTuYYZeuLLKX1cYbmaw"
2116
+ "address": "3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"
3181
2117
  },
3182
2118
  {
3183
2119
  "name": "pool_state",
@@ -3501,7 +2437,7 @@
3501
2437
  {
3502
2438
  "code": 6002,
3503
2439
  "name": "InvalidUpdateConfigFlag",
3504
- "msg": "invalid update amm config flag"
2440
+ "msg": "invalid update clmm config flag"
3505
2441
  },
3506
2442
  {
3507
2443
  "code": 6003,
@@ -3935,6 +2871,20 @@
3935
2871
  ],
3936
2872
  "type": "pubkey"
3937
2873
  },
2874
+ {
2875
+ "name": "personal_position",
2876
+ "docs": [
2877
+ "The personal position"
2878
+ ],
2879
+ "type": "pubkey"
2880
+ },
2881
+ {
2882
+ "name": "nft_mint",
2883
+ "docs": [
2884
+ "The nft mint address for the position"
2885
+ ],
2886
+ "type": "pubkey"
2887
+ },
3938
2888
  {
3939
2889
  "name": "minter",
3940
2890
  "docs": [
@@ -4614,6 +3564,13 @@
4614
3564
  "Vault of token_1"
4615
3565
  ],
4616
3566
  "type": "pubkey"
3567
+ },
3568
+ {
3569
+ "name": "amm_config",
3570
+ "docs": [
3571
+ "The PublicKey of the config account with fee rates etc"
3572
+ ],
3573
+ "type": "pubkey"
4617
3574
  }
4618
3575
  ]
4619
3576
  }
@@ -5404,4 +4361,4 @@
5404
4361
  }
5405
4362
  }
5406
4363
  ]
5407
- }
4364
+ }