@pump-fun/pump-sdk 1.20.0-devnet.1 → 1.20.0-devnet.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/esm/index.js CHANGED
@@ -3920,6 +3920,26 @@ var pump_default = {
3920
3920
  name: "associated_token_program",
3921
3921
  address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
3922
3922
  },
3923
+ {
3924
+ name: "mayhem_program_id",
3925
+ writable: true
3926
+ },
3927
+ {
3928
+ name: "global_params",
3929
+ writable: true
3930
+ },
3931
+ {
3932
+ name: "sol_vault",
3933
+ writable: true
3934
+ },
3935
+ {
3936
+ name: "mayhem_state",
3937
+ writable: true
3938
+ },
3939
+ {
3940
+ name: "mayhem_token_vault",
3941
+ writable: true
3942
+ },
3923
3943
  {
3924
3944
  name: "event_authority",
3925
3945
  pda: {
@@ -3969,6 +3989,10 @@ var pump_default = {
3969
3989
  {
3970
3990
  name: "creator",
3971
3991
  type: "pubkey"
3992
+ },
3993
+ {
3994
+ name: "is_mayhem_mode",
3995
+ type: "bool"
3972
3996
  }
3973
3997
  ]
3974
3998
  },
@@ -5466,6 +5490,90 @@ var pump_default = {
5466
5490
  }
5467
5491
  ]
5468
5492
  },
5493
+ {
5494
+ name: "set_reserved_fee_recipient",
5495
+ discriminator: [
5496
+ 207,
5497
+ 189,
5498
+ 178,
5499
+ 71,
5500
+ 167,
5501
+ 122,
5502
+ 68,
5503
+ 180
5504
+ ],
5505
+ accounts: [
5506
+ {
5507
+ name: "global",
5508
+ writable: true,
5509
+ pda: {
5510
+ seeds: [
5511
+ {
5512
+ kind: "const",
5513
+ value: [
5514
+ 103,
5515
+ 108,
5516
+ 111,
5517
+ 98,
5518
+ 97,
5519
+ 108
5520
+ ]
5521
+ }
5522
+ ]
5523
+ }
5524
+ },
5525
+ {
5526
+ name: "authority",
5527
+ writable: true,
5528
+ signer: true,
5529
+ relations: [
5530
+ "global"
5531
+ ]
5532
+ },
5533
+ {
5534
+ name: "event_authority",
5535
+ pda: {
5536
+ seeds: [
5537
+ {
5538
+ kind: "const",
5539
+ value: [
5540
+ 95,
5541
+ 95,
5542
+ 101,
5543
+ 118,
5544
+ 101,
5545
+ 110,
5546
+ 116,
5547
+ 95,
5548
+ 97,
5549
+ 117,
5550
+ 116,
5551
+ 104,
5552
+ 111,
5553
+ 114,
5554
+ 105,
5555
+ 116,
5556
+ 121
5557
+ ]
5558
+ }
5559
+ ]
5560
+ }
5561
+ },
5562
+ {
5563
+ name: "program"
5564
+ }
5565
+ ],
5566
+ args: [
5567
+ {
5568
+ name: "reserved_fee_recipient",
5569
+ type: "pubkey"
5570
+ },
5571
+ {
5572
+ name: "whitelist_pda",
5573
+ type: "pubkey"
5574
+ }
5575
+ ]
5576
+ },
5469
5577
  {
5470
5578
  name: "sync_user_volume_accumulator",
5471
5579
  discriminator: [
@@ -5674,6 +5782,86 @@ var pump_default = {
5674
5782
  }
5675
5783
  ]
5676
5784
  },
5785
+ {
5786
+ name: "toggle_mayhem_mode",
5787
+ discriminator: [
5788
+ 1,
5789
+ 9,
5790
+ 111,
5791
+ 208,
5792
+ 100,
5793
+ 31,
5794
+ 255,
5795
+ 163
5796
+ ],
5797
+ accounts: [
5798
+ {
5799
+ name: "global",
5800
+ writable: true,
5801
+ pda: {
5802
+ seeds: [
5803
+ {
5804
+ kind: "const",
5805
+ value: [
5806
+ 103,
5807
+ 108,
5808
+ 111,
5809
+ 98,
5810
+ 97,
5811
+ 108
5812
+ ]
5813
+ }
5814
+ ]
5815
+ }
5816
+ },
5817
+ {
5818
+ name: "authority",
5819
+ writable: true,
5820
+ signer: true,
5821
+ relations: [
5822
+ "global"
5823
+ ]
5824
+ },
5825
+ {
5826
+ name: "event_authority",
5827
+ pda: {
5828
+ seeds: [
5829
+ {
5830
+ kind: "const",
5831
+ value: [
5832
+ 95,
5833
+ 95,
5834
+ 101,
5835
+ 118,
5836
+ 101,
5837
+ 110,
5838
+ 116,
5839
+ 95,
5840
+ 97,
5841
+ 117,
5842
+ 116,
5843
+ 104,
5844
+ 111,
5845
+ 114,
5846
+ 105,
5847
+ 116,
5848
+ 121
5849
+ ]
5850
+ }
5851
+ ]
5852
+ }
5853
+ },
5854
+ {
5855
+ name: "program"
5856
+ }
5857
+ ],
5858
+ args: [
5859
+ {
5860
+ name: "enabled",
5861
+ type: "bool"
5862
+ }
5863
+ ]
5864
+ },
5677
5865
  {
5678
5866
  name: "update_global_authority",
5679
5867
  discriminator: [
@@ -6264,6 +6452,14 @@ var pump_default = {
6264
6452
  {
6265
6453
  code: 6046,
6266
6454
  name: "CreateV2Disabled"
6455
+ },
6456
+ {
6457
+ code: 6047,
6458
+ name: "CpitializeMayhemFailed"
6459
+ },
6460
+ {
6461
+ code: 6048,
6462
+ name: "MayhemModeDisabled"
6267
6463
  }
6268
6464
  ],
6269
6465
  types: [
@@ -6379,6 +6575,10 @@ var pump_default = {
6379
6575
  {
6380
6576
  name: "creator",
6381
6577
  type: "pubkey"
6578
+ },
6579
+ {
6580
+ name: "is_mayhem_mode",
6581
+ type: "bool"
6382
6582
  }
6383
6583
  ]
6384
6584
  }
@@ -6587,6 +6787,10 @@ var pump_default = {
6587
6787
  {
6588
6788
  name: "token_program",
6589
6789
  type: "pubkey"
6790
+ },
6791
+ {
6792
+ name: "is_mayhem_mode",
6793
+ type: "bool"
6590
6794
  }
6591
6795
  ]
6592
6796
  }
@@ -6772,6 +6976,18 @@ var pump_default = {
6772
6976
  {
6773
6977
  name: "create_v2_enabled",
6774
6978
  type: "bool"
6979
+ },
6980
+ {
6981
+ name: "whitelist_pda",
6982
+ type: "pubkey"
6983
+ },
6984
+ {
6985
+ name: "reserved_fee_recipient",
6986
+ type: "pubkey"
6987
+ },
6988
+ {
6989
+ name: "mayhem_mode_enabled",
6990
+ type: "bool"
6775
6991
  }
6776
6992
  ]
6777
6993
  }
@@ -7235,7 +7451,8 @@ function newBondingCurve(global) {
7235
7451
  realSolReserves: new BN2(0),
7236
7452
  tokenTotalSupply: global.tokenTotalSupply,
7237
7453
  complete: false,
7238
- creator: PublicKey2.default
7454
+ creator: PublicKey2.default,
7455
+ isMayhemMode: global.mayhemModeEnabled
7239
7456
  };
7240
7457
  }
7241
7458
  function getBuySolAmountFromTokenAmountQuote({
@@ -7389,11 +7606,11 @@ function bondingCurveMarketCap({
7389
7606
 
7390
7607
  // src/pda.ts
7391
7608
  import { PublicKey as PublicKey5 } from "@solana/web3.js";
7392
- import { NATIVE_MINT as NATIVE_MINT2 } from "@solana/spl-token";
7609
+ import { getAssociatedTokenAddressSync as getAssociatedTokenAddressSync3, NATIVE_MINT as NATIVE_MINT2, TOKEN_2022_PROGRAM_ID as TOKEN_2022_PROGRAM_ID3 } from "@solana/spl-token";
7393
7610
  import { poolPda, pumpFeePda, pumpPda } from "@pump-fun/pump-swap-sdk";
7394
7611
 
7395
7612
  // src/sdk.ts
7396
- import { AnchorProvider, Program } from "@coral-xyz/anchor";
7613
+ import { AnchorProvider as AnchorProvider2, Program as Program2 } from "@coral-xyz/anchor";
7397
7614
  import { PUMP_AMM_SDK as PUMP_AMM_SDK2 } from "@pump-fun/pump-swap-sdk";
7398
7615
  import {
7399
7616
  createAssociatedTokenAccountIdempotentInstruction,
@@ -7407,6 +7624,7 @@ import {
7407
7624
  import BN5 from "bn.js";
7408
7625
 
7409
7626
  // src/onlineSdk.ts
7627
+ import { AnchorProvider, Program } from "@coral-xyz/anchor";
7410
7628
  import {
7411
7629
  coinCreatorVaultAtaPda,
7412
7630
  coinCreatorVaultAuthorityPda,
@@ -7488,68 +7706,3215 @@ function currentDayTokens(globalVolumeAccumulator, userVolumeAccumulator, curren
7488
7706
  return currentSolVolume.mul(currentDayTokenSupply).div(currentDaySolVolume);
7489
7707
  }
7490
7708
 
7491
- // src/onlineSdk.ts
7492
- var OFFLINE_PUMP_PROGRAM = getPumpProgram(null);
7493
- var OnlinePumpSdk = class {
7494
- constructor(connection) {
7495
- this.connection = connection;
7496
- this.pumpProgram = getPumpProgram(connection);
7497
- this.offlinePumpProgram = OFFLINE_PUMP_PROGRAM;
7498
- this.pumpAmmSdk = new OnlinePumpAmmSdk(connection);
7499
- this.pumpAmmAdminSdk = new PumpAmmAdminSdk(connection);
7500
- }
7501
- async fetchGlobal() {
7502
- return await this.pumpProgram.account.global.fetch(GLOBAL_PDA);
7503
- }
7504
- async fetchFeeConfig() {
7505
- return await this.pumpProgram.account.feeConfig.fetch(PUMP_FEE_CONFIG_PDA);
7506
- }
7507
- async fetchBondingCurve(mint) {
7508
- return await this.pumpProgram.account.bondingCurve.fetch(
7509
- bondingCurvePda(mint)
7510
- );
7511
- }
7512
- async fetchBuyState(mint, user, tokenProgram = TOKEN_PROGRAM_ID) {
7513
- const [bondingCurveAccountInfo, associatedUserAccountInfo] = await this.connection.getMultipleAccountsInfo([
7514
- bondingCurvePda(mint),
7515
- getAssociatedTokenAddressSync(mint, user, true, tokenProgram)
7516
- ]);
7517
- if (!bondingCurveAccountInfo) {
7518
- throw new Error(
7519
- `Bonding curve account not found for mint: ${mint.toBase58()}`
7520
- );
7521
- }
7522
- const bondingCurve = PUMP_SDK.decodeBondingCurve(bondingCurveAccountInfo);
7523
- return { bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo };
7524
- }
7525
- async fetchSellState(mint, user, tokenProgram = TOKEN_PROGRAM_ID) {
7526
- const [bondingCurveAccountInfo, associatedUserAccountInfo] = await this.connection.getMultipleAccountsInfo([
7527
- bondingCurvePda(mint),
7528
- getAssociatedTokenAddressSync(mint, user, true, tokenProgram)
7529
- ]);
7530
- if (!bondingCurveAccountInfo) {
7531
- throw new Error(
7532
- `Bonding curve account not found for mint: ${mint.toBase58()}`
7533
- );
7534
- }
7535
- if (!associatedUserAccountInfo) {
7536
- throw new Error(
7537
- `Associated token account not found for mint: ${mint.toBase58()} and user: ${user.toBase58()}`
7538
- );
7539
- }
7540
- const bondingCurve = PUMP_SDK.decodeBondingCurve(bondingCurveAccountInfo);
7541
- return { bondingCurveAccountInfo, bondingCurve };
7542
- }
7543
- async fetchGlobalVolumeAccumulator() {
7544
- return await this.pumpProgram.account.globalVolumeAccumulator.fetch(
7545
- GLOBAL_VOLUME_ACCUMULATOR_PDA
7546
- );
7547
- }
7548
- async fetchUserVolumeAccumulator(user) {
7549
- return await this.pumpProgram.account.userVolumeAccumulator.fetchNullable(
7550
- userVolumeAccumulatorPda(user)
7551
- );
7552
- }
7709
+ // src/idl/mayhem_program.json
7710
+ var mayhem_program_default = {
7711
+ address: "MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e",
7712
+ metadata: {
7713
+ name: "mayhem_program",
7714
+ version: "0.1.0",
7715
+ spec: "0.1.0",
7716
+ description: "Created with Anchor"
7717
+ },
7718
+ instructions: [
7719
+ {
7720
+ name: "burn_tokens",
7721
+ discriminator: [
7722
+ 76,
7723
+ 15,
7724
+ 51,
7725
+ 254,
7726
+ 229,
7727
+ 215,
7728
+ 121,
7729
+ 66
7730
+ ],
7731
+ accounts: [
7732
+ {
7733
+ name: "mayhem_state",
7734
+ writable: true,
7735
+ pda: {
7736
+ seeds: [
7737
+ {
7738
+ kind: "const",
7739
+ value: [
7740
+ 109,
7741
+ 97,
7742
+ 121,
7743
+ 104,
7744
+ 101,
7745
+ 109,
7746
+ 45,
7747
+ 115,
7748
+ 116,
7749
+ 97,
7750
+ 116,
7751
+ 101
7752
+ ]
7753
+ },
7754
+ {
7755
+ kind: "account",
7756
+ path: "mint"
7757
+ }
7758
+ ]
7759
+ }
7760
+ },
7761
+ {
7762
+ name: "mint"
7763
+ },
7764
+ {
7765
+ name: "mayhem_token_vault",
7766
+ writable: true,
7767
+ pda: {
7768
+ seeds: [
7769
+ {
7770
+ kind: "account",
7771
+ path: "sol_vault"
7772
+ },
7773
+ {
7774
+ kind: "account",
7775
+ path: "mint"
7776
+ },
7777
+ {
7778
+ kind: "account",
7779
+ path: "mint"
7780
+ }
7781
+ ],
7782
+ program: {
7783
+ kind: "const",
7784
+ value: [
7785
+ 140,
7786
+ 151,
7787
+ 37,
7788
+ 143,
7789
+ 78,
7790
+ 36,
7791
+ 137,
7792
+ 241,
7793
+ 187,
7794
+ 61,
7795
+ 16,
7796
+ 41,
7797
+ 20,
7798
+ 142,
7799
+ 13,
7800
+ 131,
7801
+ 11,
7802
+ 90,
7803
+ 19,
7804
+ 153,
7805
+ 218,
7806
+ 255,
7807
+ 16,
7808
+ 132,
7809
+ 4,
7810
+ 142,
7811
+ 123,
7812
+ 216,
7813
+ 219,
7814
+ 233,
7815
+ 248,
7816
+ 89
7817
+ ]
7818
+ }
7819
+ }
7820
+ },
7821
+ {
7822
+ name: "sol_vault",
7823
+ writable: true,
7824
+ pda: {
7825
+ seeds: [
7826
+ {
7827
+ kind: "const",
7828
+ value: [
7829
+ 115,
7830
+ 111,
7831
+ 108,
7832
+ 45,
7833
+ 118,
7834
+ 97,
7835
+ 117,
7836
+ 108,
7837
+ 116
7838
+ ]
7839
+ }
7840
+ ]
7841
+ }
7842
+ },
7843
+ {
7844
+ name: "system_program",
7845
+ address: "11111111111111111111111111111111"
7846
+ },
7847
+ {
7848
+ name: "token_program"
7849
+ },
7850
+ {
7851
+ name: "event_authority",
7852
+ pda: {
7853
+ seeds: [
7854
+ {
7855
+ kind: "const",
7856
+ value: [
7857
+ 95,
7858
+ 95,
7859
+ 101,
7860
+ 118,
7861
+ 101,
7862
+ 110,
7863
+ 116,
7864
+ 95,
7865
+ 97,
7866
+ 117,
7867
+ 116,
7868
+ 104,
7869
+ 111,
7870
+ 114,
7871
+ 105,
7872
+ 116,
7873
+ 121
7874
+ ]
7875
+ }
7876
+ ]
7877
+ }
7878
+ },
7879
+ {
7880
+ name: "program"
7881
+ }
7882
+ ],
7883
+ args: []
7884
+ },
7885
+ {
7886
+ name: "buy",
7887
+ discriminator: [
7888
+ 102,
7889
+ 6,
7890
+ 61,
7891
+ 18,
7892
+ 1,
7893
+ 218,
7894
+ 235,
7895
+ 234
7896
+ ],
7897
+ accounts: [
7898
+ {
7899
+ name: "trader",
7900
+ writable: true,
7901
+ signer: true,
7902
+ relations: [
7903
+ "global_params"
7904
+ ]
7905
+ },
7906
+ {
7907
+ name: "global_params",
7908
+ writable: true,
7909
+ pda: {
7910
+ seeds: [
7911
+ {
7912
+ kind: "const",
7913
+ value: [
7914
+ 103,
7915
+ 108,
7916
+ 111,
7917
+ 98,
7918
+ 97,
7919
+ 108,
7920
+ 45,
7921
+ 112,
7922
+ 97,
7923
+ 114,
7924
+ 97,
7925
+ 109,
7926
+ 115
7927
+ ]
7928
+ }
7929
+ ]
7930
+ }
7931
+ },
7932
+ {
7933
+ name: "mayhem_state",
7934
+ writable: true,
7935
+ pda: {
7936
+ seeds: [
7937
+ {
7938
+ kind: "const",
7939
+ value: [
7940
+ 109,
7941
+ 97,
7942
+ 121,
7943
+ 104,
7944
+ 101,
7945
+ 109,
7946
+ 45,
7947
+ 115,
7948
+ 116,
7949
+ 97,
7950
+ 116,
7951
+ 101
7952
+ ]
7953
+ },
7954
+ {
7955
+ kind: "account",
7956
+ path: "mint"
7957
+ }
7958
+ ]
7959
+ }
7960
+ },
7961
+ {
7962
+ name: "mint"
7963
+ },
7964
+ {
7965
+ name: "mayhem_token_vault",
7966
+ writable: true,
7967
+ pda: {
7968
+ seeds: [
7969
+ {
7970
+ kind: "account",
7971
+ path: "sol_vault"
7972
+ },
7973
+ {
7974
+ kind: "account",
7975
+ path: "mint"
7976
+ },
7977
+ {
7978
+ kind: "account",
7979
+ path: "mint"
7980
+ }
7981
+ ],
7982
+ program: {
7983
+ kind: "const",
7984
+ value: [
7985
+ 140,
7986
+ 151,
7987
+ 37,
7988
+ 143,
7989
+ 78,
7990
+ 36,
7991
+ 137,
7992
+ 241,
7993
+ 187,
7994
+ 61,
7995
+ 16,
7996
+ 41,
7997
+ 20,
7998
+ 142,
7999
+ 13,
8000
+ 131,
8001
+ 11,
8002
+ 90,
8003
+ 19,
8004
+ 153,
8005
+ 218,
8006
+ 255,
8007
+ 16,
8008
+ 132,
8009
+ 4,
8010
+ 142,
8011
+ 123,
8012
+ 216,
8013
+ 219,
8014
+ 233,
8015
+ 248,
8016
+ 89
8017
+ ]
8018
+ }
8019
+ }
8020
+ },
8021
+ {
8022
+ name: "sol_vault",
8023
+ writable: true,
8024
+ pda: {
8025
+ seeds: [
8026
+ {
8027
+ kind: "const",
8028
+ value: [
8029
+ 115,
8030
+ 111,
8031
+ 108,
8032
+ 45,
8033
+ 118,
8034
+ 97,
8035
+ 117,
8036
+ 108,
8037
+ 116
8038
+ ]
8039
+ }
8040
+ ]
8041
+ }
8042
+ },
8043
+ {
8044
+ name: "system_program",
8045
+ address: "11111111111111111111111111111111"
8046
+ },
8047
+ {
8048
+ name: "token_program"
8049
+ },
8050
+ {
8051
+ name: "global"
8052
+ },
8053
+ {
8054
+ name: "bonding_curve",
8055
+ writable: true,
8056
+ pda: {
8057
+ seeds: [
8058
+ {
8059
+ kind: "const",
8060
+ value: [
8061
+ 98,
8062
+ 111,
8063
+ 110,
8064
+ 100,
8065
+ 105,
8066
+ 110,
8067
+ 103,
8068
+ 45,
8069
+ 99,
8070
+ 117,
8071
+ 114,
8072
+ 118,
8073
+ 101
8074
+ ]
8075
+ },
8076
+ {
8077
+ kind: "account",
8078
+ path: "mint"
8079
+ }
8080
+ ],
8081
+ program: {
8082
+ kind: "const",
8083
+ value: [
8084
+ 1,
8085
+ 86,
8086
+ 224,
8087
+ 246,
8088
+ 147,
8089
+ 102,
8090
+ 90,
8091
+ 207,
8092
+ 68,
8093
+ 219,
8094
+ 21,
8095
+ 104,
8096
+ 191,
8097
+ 23,
8098
+ 91,
8099
+ 170,
8100
+ 81,
8101
+ 137,
8102
+ 203,
8103
+ 151,
8104
+ 245,
8105
+ 210,
8106
+ 255,
8107
+ 59,
8108
+ 101,
8109
+ 93,
8110
+ 43,
8111
+ 182,
8112
+ 253,
8113
+ 109,
8114
+ 24,
8115
+ 176
8116
+ ]
8117
+ }
8118
+ }
8119
+ },
8120
+ {
8121
+ name: "fee_recipient",
8122
+ writable: true
8123
+ },
8124
+ {
8125
+ name: "associated_bonding_curve",
8126
+ writable: true,
8127
+ pda: {
8128
+ seeds: [
8129
+ {
8130
+ kind: "account",
8131
+ path: "bonding_curve"
8132
+ },
8133
+ {
8134
+ kind: "account",
8135
+ path: "mint"
8136
+ },
8137
+ {
8138
+ kind: "account",
8139
+ path: "mint"
8140
+ }
8141
+ ],
8142
+ program: {
8143
+ kind: "const",
8144
+ value: [
8145
+ 140,
8146
+ 151,
8147
+ 37,
8148
+ 143,
8149
+ 78,
8150
+ 36,
8151
+ 137,
8152
+ 241,
8153
+ 187,
8154
+ 61,
8155
+ 16,
8156
+ 41,
8157
+ 20,
8158
+ 142,
8159
+ 13,
8160
+ 131,
8161
+ 11,
8162
+ 90,
8163
+ 19,
8164
+ 153,
8165
+ 218,
8166
+ 255,
8167
+ 16,
8168
+ 132,
8169
+ 4,
8170
+ 142,
8171
+ 123,
8172
+ 216,
8173
+ 219,
8174
+ 233,
8175
+ 248,
8176
+ 89
8177
+ ]
8178
+ }
8179
+ }
8180
+ },
8181
+ {
8182
+ name: "creator_vault",
8183
+ writable: true
8184
+ },
8185
+ {
8186
+ name: "pump_event_authority"
8187
+ },
8188
+ {
8189
+ name: "pump_program"
8190
+ },
8191
+ {
8192
+ name: "global_volume_accumulator",
8193
+ writable: true
8194
+ },
8195
+ {
8196
+ name: "user_volume_accumulator",
8197
+ writable: true
8198
+ },
8199
+ {
8200
+ name: "fee_config"
8201
+ },
8202
+ {
8203
+ name: "fee_program"
8204
+ },
8205
+ {
8206
+ name: "event_authority",
8207
+ pda: {
8208
+ seeds: [
8209
+ {
8210
+ kind: "const",
8211
+ value: [
8212
+ 95,
8213
+ 95,
8214
+ 101,
8215
+ 118,
8216
+ 101,
8217
+ 110,
8218
+ 116,
8219
+ 95,
8220
+ 97,
8221
+ 117,
8222
+ 116,
8223
+ 104,
8224
+ 111,
8225
+ 114,
8226
+ 105,
8227
+ 116,
8228
+ 121
8229
+ ]
8230
+ }
8231
+ ]
8232
+ }
8233
+ },
8234
+ {
8235
+ name: "program"
8236
+ }
8237
+ ],
8238
+ args: [
8239
+ {
8240
+ name: "market_cap",
8241
+ type: "u128"
8242
+ },
8243
+ {
8244
+ name: "slippage_bps",
8245
+ type: "u16"
8246
+ }
8247
+ ]
8248
+ },
8249
+ {
8250
+ name: "buy_pump_swap",
8251
+ discriminator: [
8252
+ 222,
8253
+ 147,
8254
+ 157,
8255
+ 7,
8256
+ 108,
8257
+ 8,
8258
+ 145,
8259
+ 81
8260
+ ],
8261
+ accounts: [
8262
+ {
8263
+ name: "trader",
8264
+ writable: true,
8265
+ signer: true,
8266
+ relations: [
8267
+ "global_params"
8268
+ ]
8269
+ },
8270
+ {
8271
+ name: "global_params",
8272
+ writable: true,
8273
+ pda: {
8274
+ seeds: [
8275
+ {
8276
+ kind: "const",
8277
+ value: [
8278
+ 103,
8279
+ 108,
8280
+ 111,
8281
+ 98,
8282
+ 97,
8283
+ 108,
8284
+ 45,
8285
+ 112,
8286
+ 97,
8287
+ 114,
8288
+ 97,
8289
+ 109,
8290
+ 115
8291
+ ]
8292
+ }
8293
+ ]
8294
+ }
8295
+ },
8296
+ {
8297
+ name: "mayhem_state",
8298
+ writable: true,
8299
+ pda: {
8300
+ seeds: [
8301
+ {
8302
+ kind: "const",
8303
+ value: [
8304
+ 109,
8305
+ 97,
8306
+ 121,
8307
+ 104,
8308
+ 101,
8309
+ 109,
8310
+ 45,
8311
+ 115,
8312
+ 116,
8313
+ 97,
8314
+ 116,
8315
+ 101
8316
+ ]
8317
+ },
8318
+ {
8319
+ kind: "account",
8320
+ path: "mint"
8321
+ }
8322
+ ]
8323
+ }
8324
+ },
8325
+ {
8326
+ name: "mint"
8327
+ },
8328
+ {
8329
+ name: "mayhem_token_vault",
8330
+ writable: true,
8331
+ pda: {
8332
+ seeds: [
8333
+ {
8334
+ kind: "account",
8335
+ path: "sol_vault"
8336
+ },
8337
+ {
8338
+ kind: "account",
8339
+ path: "mint"
8340
+ },
8341
+ {
8342
+ kind: "account",
8343
+ path: "mint"
8344
+ }
8345
+ ],
8346
+ program: {
8347
+ kind: "const",
8348
+ value: [
8349
+ 140,
8350
+ 151,
8351
+ 37,
8352
+ 143,
8353
+ 78,
8354
+ 36,
8355
+ 137,
8356
+ 241,
8357
+ 187,
8358
+ 61,
8359
+ 16,
8360
+ 41,
8361
+ 20,
8362
+ 142,
8363
+ 13,
8364
+ 131,
8365
+ 11,
8366
+ 90,
8367
+ 19,
8368
+ 153,
8369
+ 218,
8370
+ 255,
8371
+ 16,
8372
+ 132,
8373
+ 4,
8374
+ 142,
8375
+ 123,
8376
+ 216,
8377
+ 219,
8378
+ 233,
8379
+ 248,
8380
+ 89
8381
+ ]
8382
+ }
8383
+ }
8384
+ },
8385
+ {
8386
+ name: "mayhem_wsol_vault",
8387
+ writable: true,
8388
+ pda: {
8389
+ seeds: [
8390
+ {
8391
+ kind: "account",
8392
+ path: "sol_vault"
8393
+ },
8394
+ {
8395
+ kind: "account",
8396
+ path: "quote_token_program"
8397
+ },
8398
+ {
8399
+ kind: "account",
8400
+ path: "wsol_mint"
8401
+ }
8402
+ ],
8403
+ program: {
8404
+ kind: "const",
8405
+ value: [
8406
+ 140,
8407
+ 151,
8408
+ 37,
8409
+ 143,
8410
+ 78,
8411
+ 36,
8412
+ 137,
8413
+ 241,
8414
+ 187,
8415
+ 61,
8416
+ 16,
8417
+ 41,
8418
+ 20,
8419
+ 142,
8420
+ 13,
8421
+ 131,
8422
+ 11,
8423
+ 90,
8424
+ 19,
8425
+ 153,
8426
+ 218,
8427
+ 255,
8428
+ 16,
8429
+ 132,
8430
+ 4,
8431
+ 142,
8432
+ 123,
8433
+ 216,
8434
+ 219,
8435
+ 233,
8436
+ 248,
8437
+ 89
8438
+ ]
8439
+ }
8440
+ }
8441
+ },
8442
+ {
8443
+ name: "sol_vault",
8444
+ writable: true,
8445
+ pda: {
8446
+ seeds: [
8447
+ {
8448
+ kind: "const",
8449
+ value: [
8450
+ 115,
8451
+ 111,
8452
+ 108,
8453
+ 45,
8454
+ 118,
8455
+ 97,
8456
+ 117,
8457
+ 108,
8458
+ 116
8459
+ ]
8460
+ }
8461
+ ]
8462
+ }
8463
+ },
8464
+ {
8465
+ name: "system_program",
8466
+ address: "11111111111111111111111111111111"
8467
+ },
8468
+ {
8469
+ name: "quote_token_program"
8470
+ },
8471
+ {
8472
+ name: "base_token_program"
8473
+ },
8474
+ {
8475
+ name: "associated_token_program",
8476
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
8477
+ },
8478
+ {
8479
+ name: "pool",
8480
+ writable: true
8481
+ },
8482
+ {
8483
+ name: "global_config"
8484
+ },
8485
+ {
8486
+ name: "wsol_mint"
8487
+ },
8488
+ {
8489
+ name: "pool_base_token_account",
8490
+ writable: true
8491
+ },
8492
+ {
8493
+ name: "pool_quote_token_account",
8494
+ writable: true
8495
+ },
8496
+ {
8497
+ name: "protocol_fee_recipient",
8498
+ writable: true
8499
+ },
8500
+ {
8501
+ name: "protocol_fee_recipient_token_account",
8502
+ pda: {
8503
+ seeds: [
8504
+ {
8505
+ kind: "account",
8506
+ path: "protocol_fee_recipient"
8507
+ },
8508
+ {
8509
+ kind: "account",
8510
+ path: "quote_token_program"
8511
+ },
8512
+ {
8513
+ kind: "account",
8514
+ path: "wsol_mint"
8515
+ }
8516
+ ],
8517
+ program: {
8518
+ kind: "const",
8519
+ value: [
8520
+ 140,
8521
+ 151,
8522
+ 37,
8523
+ 143,
8524
+ 78,
8525
+ 36,
8526
+ 137,
8527
+ 241,
8528
+ 187,
8529
+ 61,
8530
+ 16,
8531
+ 41,
8532
+ 20,
8533
+ 142,
8534
+ 13,
8535
+ 131,
8536
+ 11,
8537
+ 90,
8538
+ 19,
8539
+ 153,
8540
+ 218,
8541
+ 255,
8542
+ 16,
8543
+ 132,
8544
+ 4,
8545
+ 142,
8546
+ 123,
8547
+ 216,
8548
+ 219,
8549
+ 233,
8550
+ 248,
8551
+ 89
8552
+ ]
8553
+ }
8554
+ }
8555
+ },
8556
+ {
8557
+ name: "creator_vault",
8558
+ writable: true
8559
+ },
8560
+ {
8561
+ name: "pump_swap_event_authority"
8562
+ },
8563
+ {
8564
+ name: "pump_swap_program"
8565
+ },
8566
+ {
8567
+ name: "coin_creator_vault_ata",
8568
+ pda: {
8569
+ seeds: [
8570
+ {
8571
+ kind: "account",
8572
+ path: "coin_creator_vault_authority"
8573
+ },
8574
+ {
8575
+ kind: "account",
8576
+ path: "quote_token_program"
8577
+ },
8578
+ {
8579
+ kind: "account",
8580
+ path: "wsol_mint"
8581
+ }
8582
+ ],
8583
+ program: {
8584
+ kind: "const",
8585
+ value: [
8586
+ 140,
8587
+ 151,
8588
+ 37,
8589
+ 143,
8590
+ 78,
8591
+ 36,
8592
+ 137,
8593
+ 241,
8594
+ 187,
8595
+ 61,
8596
+ 16,
8597
+ 41,
8598
+ 20,
8599
+ 142,
8600
+ 13,
8601
+ 131,
8602
+ 11,
8603
+ 90,
8604
+ 19,
8605
+ 153,
8606
+ 218,
8607
+ 255,
8608
+ 16,
8609
+ 132,
8610
+ 4,
8611
+ 142,
8612
+ 123,
8613
+ 216,
8614
+ 219,
8615
+ 233,
8616
+ 248,
8617
+ 89
8618
+ ]
8619
+ }
8620
+ }
8621
+ },
8622
+ {
8623
+ name: "coin_creator_vault_authority"
8624
+ },
8625
+ {
8626
+ name: "global_volume_accumulator",
8627
+ writable: true
8628
+ },
8629
+ {
8630
+ name: "user_volume_accumulator",
8631
+ writable: true
8632
+ },
8633
+ {
8634
+ name: "fee_config"
8635
+ },
8636
+ {
8637
+ name: "fee_program"
8638
+ },
8639
+ {
8640
+ name: "event_authority",
8641
+ pda: {
8642
+ seeds: [
8643
+ {
8644
+ kind: "const",
8645
+ value: [
8646
+ 95,
8647
+ 95,
8648
+ 101,
8649
+ 118,
8650
+ 101,
8651
+ 110,
8652
+ 116,
8653
+ 95,
8654
+ 97,
8655
+ 117,
8656
+ 116,
8657
+ 104,
8658
+ 111,
8659
+ 114,
8660
+ 105,
8661
+ 116,
8662
+ 121
8663
+ ]
8664
+ }
8665
+ ]
8666
+ }
8667
+ },
8668
+ {
8669
+ name: "program"
8670
+ }
8671
+ ],
8672
+ args: [
8673
+ {
8674
+ name: "market_cap",
8675
+ type: "u128"
8676
+ },
8677
+ {
8678
+ name: "slippage_bps",
8679
+ type: "u16"
8680
+ }
8681
+ ]
8682
+ },
8683
+ {
8684
+ name: "extend_account",
8685
+ discriminator: [
8686
+ 234,
8687
+ 102,
8688
+ 194,
8689
+ 203,
8690
+ 150,
8691
+ 72,
8692
+ 62,
8693
+ 229
8694
+ ],
8695
+ accounts: [
8696
+ {
8697
+ name: "account",
8698
+ writable: true
8699
+ },
8700
+ {
8701
+ name: "user",
8702
+ signer: true
8703
+ },
8704
+ {
8705
+ name: "system_program",
8706
+ address: "11111111111111111111111111111111"
8707
+ },
8708
+ {
8709
+ name: "event_authority",
8710
+ pda: {
8711
+ seeds: [
8712
+ {
8713
+ kind: "const",
8714
+ value: [
8715
+ 95,
8716
+ 95,
8717
+ 101,
8718
+ 118,
8719
+ 101,
8720
+ 110,
8721
+ 116,
8722
+ 95,
8723
+ 97,
8724
+ 117,
8725
+ 116,
8726
+ 104,
8727
+ 111,
8728
+ 114,
8729
+ 105,
8730
+ 116,
8731
+ 121
8732
+ ]
8733
+ }
8734
+ ]
8735
+ }
8736
+ },
8737
+ {
8738
+ name: "program"
8739
+ }
8740
+ ],
8741
+ args: []
8742
+ },
8743
+ {
8744
+ name: "initialize_global_params",
8745
+ discriminator: [
8746
+ 13,
8747
+ 18,
8748
+ 127,
8749
+ 234,
8750
+ 59,
8751
+ 40,
8752
+ 204,
8753
+ 218
8754
+ ],
8755
+ accounts: [
8756
+ {
8757
+ name: "admin",
8758
+ writable: true,
8759
+ signer: true
8760
+ },
8761
+ {
8762
+ name: "global_params",
8763
+ writable: true,
8764
+ pda: {
8765
+ seeds: [
8766
+ {
8767
+ kind: "const",
8768
+ value: [
8769
+ 103,
8770
+ 108,
8771
+ 111,
8772
+ 98,
8773
+ 97,
8774
+ 108,
8775
+ 45,
8776
+ 112,
8777
+ 97,
8778
+ 114,
8779
+ 97,
8780
+ 109,
8781
+ 115
8782
+ ]
8783
+ }
8784
+ ]
8785
+ }
8786
+ },
8787
+ {
8788
+ name: "system_program",
8789
+ address: "11111111111111111111111111111111"
8790
+ }
8791
+ ],
8792
+ args: []
8793
+ },
8794
+ {
8795
+ name: "initialize_mayhem_state",
8796
+ discriminator: [
8797
+ 157,
8798
+ 189,
8799
+ 94,
8800
+ 72,
8801
+ 85,
8802
+ 69,
8803
+ 204,
8804
+ 45
8805
+ ],
8806
+ accounts: [
8807
+ {
8808
+ name: "payer",
8809
+ writable: true,
8810
+ signer: true
8811
+ },
8812
+ {
8813
+ name: "global_params",
8814
+ pda: {
8815
+ seeds: [
8816
+ {
8817
+ kind: "const",
8818
+ value: [
8819
+ 103,
8820
+ 108,
8821
+ 111,
8822
+ 98,
8823
+ 97,
8824
+ 108,
8825
+ 45,
8826
+ 112,
8827
+ 97,
8828
+ 114,
8829
+ 97,
8830
+ 109,
8831
+ 115
8832
+ ]
8833
+ }
8834
+ ]
8835
+ }
8836
+ },
8837
+ {
8838
+ name: "mint_authority",
8839
+ pda: {
8840
+ seeds: [
8841
+ {
8842
+ kind: "const",
8843
+ value: [
8844
+ 109,
8845
+ 105,
8846
+ 110,
8847
+ 116,
8848
+ 45,
8849
+ 97,
8850
+ 117,
8851
+ 116,
8852
+ 104,
8853
+ 111,
8854
+ 114,
8855
+ 105,
8856
+ 116,
8857
+ 121
8858
+ ]
8859
+ }
8860
+ ],
8861
+ program: {
8862
+ kind: "const",
8863
+ value: [
8864
+ 1,
8865
+ 86,
8866
+ 224,
8867
+ 246,
8868
+ 147,
8869
+ 102,
8870
+ 90,
8871
+ 207,
8872
+ 68,
8873
+ 219,
8874
+ 21,
8875
+ 104,
8876
+ 191,
8877
+ 23,
8878
+ 91,
8879
+ 170,
8880
+ 81,
8881
+ 137,
8882
+ 203,
8883
+ 151,
8884
+ 245,
8885
+ 210,
8886
+ 255,
8887
+ 59,
8888
+ 101,
8889
+ 93,
8890
+ 43,
8891
+ 182,
8892
+ 253,
8893
+ 109,
8894
+ 24,
8895
+ 176
8896
+ ]
8897
+ }
8898
+ }
8899
+ },
8900
+ {
8901
+ name: "sol_vault",
8902
+ writable: true,
8903
+ pda: {
8904
+ seeds: [
8905
+ {
8906
+ kind: "const",
8907
+ value: [
8908
+ 115,
8909
+ 111,
8910
+ 108,
8911
+ 45,
8912
+ 118,
8913
+ 97,
8914
+ 117,
8915
+ 108,
8916
+ 116
8917
+ ]
8918
+ }
8919
+ ]
8920
+ }
8921
+ },
8922
+ {
8923
+ name: "mint"
8924
+ },
8925
+ {
8926
+ name: "mayhem_token_vault",
8927
+ writable: true,
8928
+ pda: {
8929
+ seeds: [
8930
+ {
8931
+ kind: "account",
8932
+ path: "sol_vault"
8933
+ },
8934
+ {
8935
+ kind: "account",
8936
+ path: "token_program"
8937
+ },
8938
+ {
8939
+ kind: "account",
8940
+ path: "mint"
8941
+ }
8942
+ ],
8943
+ program: {
8944
+ kind: "const",
8945
+ value: [
8946
+ 140,
8947
+ 151,
8948
+ 37,
8949
+ 143,
8950
+ 78,
8951
+ 36,
8952
+ 137,
8953
+ 241,
8954
+ 187,
8955
+ 61,
8956
+ 16,
8957
+ 41,
8958
+ 20,
8959
+ 142,
8960
+ 13,
8961
+ 131,
8962
+ 11,
8963
+ 90,
8964
+ 19,
8965
+ 153,
8966
+ 218,
8967
+ 255,
8968
+ 16,
8969
+ 132,
8970
+ 4,
8971
+ 142,
8972
+ 123,
8973
+ 216,
8974
+ 219,
8975
+ 233,
8976
+ 248,
8977
+ 89
8978
+ ]
8979
+ }
8980
+ }
8981
+ },
8982
+ {
8983
+ name: "mayhem_state",
8984
+ writable: true,
8985
+ pda: {
8986
+ seeds: [
8987
+ {
8988
+ kind: "const",
8989
+ value: [
8990
+ 109,
8991
+ 97,
8992
+ 121,
8993
+ 104,
8994
+ 101,
8995
+ 109,
8996
+ 45,
8997
+ 115,
8998
+ 116,
8999
+ 97,
9000
+ 116,
9001
+ 101
9002
+ ]
9003
+ },
9004
+ {
9005
+ kind: "account",
9006
+ path: "mint"
9007
+ }
9008
+ ]
9009
+ }
9010
+ },
9011
+ {
9012
+ name: "system_program",
9013
+ address: "11111111111111111111111111111111"
9014
+ },
9015
+ {
9016
+ name: "token_program",
9017
+ address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
9018
+ },
9019
+ {
9020
+ name: "associated_token_program",
9021
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
9022
+ }
9023
+ ],
9024
+ args: []
9025
+ },
9026
+ {
9027
+ name: "resume_trading",
9028
+ discriminator: [
9029
+ 146,
9030
+ 46,
9031
+ 212,
9032
+ 86,
9033
+ 69,
9034
+ 159,
9035
+ 30,
9036
+ 65
9037
+ ],
9038
+ accounts: [
9039
+ {
9040
+ name: "admin",
9041
+ writable: true,
9042
+ signer: true,
9043
+ relations: [
9044
+ "global_params"
9045
+ ]
9046
+ },
9047
+ {
9048
+ name: "global_params",
9049
+ writable: true,
9050
+ pda: {
9051
+ seeds: [
9052
+ {
9053
+ kind: "const",
9054
+ value: [
9055
+ 103,
9056
+ 108,
9057
+ 111,
9058
+ 98,
9059
+ 97,
9060
+ 108,
9061
+ 45,
9062
+ 112,
9063
+ 97,
9064
+ 114,
9065
+ 97,
9066
+ 109,
9067
+ 115
9068
+ ]
9069
+ }
9070
+ ]
9071
+ }
9072
+ },
9073
+ {
9074
+ name: "system_program",
9075
+ address: "11111111111111111111111111111111"
9076
+ }
9077
+ ],
9078
+ args: []
9079
+ },
9080
+ {
9081
+ name: "sell",
9082
+ discriminator: [
9083
+ 51,
9084
+ 230,
9085
+ 133,
9086
+ 164,
9087
+ 1,
9088
+ 127,
9089
+ 131,
9090
+ 173
9091
+ ],
9092
+ accounts: [
9093
+ {
9094
+ name: "trader",
9095
+ writable: true,
9096
+ signer: true,
9097
+ relations: [
9098
+ "global_params"
9099
+ ]
9100
+ },
9101
+ {
9102
+ name: "global_params",
9103
+ writable: true,
9104
+ pda: {
9105
+ seeds: [
9106
+ {
9107
+ kind: "const",
9108
+ value: [
9109
+ 103,
9110
+ 108,
9111
+ 111,
9112
+ 98,
9113
+ 97,
9114
+ 108,
9115
+ 45,
9116
+ 112,
9117
+ 97,
9118
+ 114,
9119
+ 97,
9120
+ 109,
9121
+ 115
9122
+ ]
9123
+ }
9124
+ ]
9125
+ }
9126
+ },
9127
+ {
9128
+ name: "mayhem_state",
9129
+ writable: true,
9130
+ pda: {
9131
+ seeds: [
9132
+ {
9133
+ kind: "const",
9134
+ value: [
9135
+ 109,
9136
+ 97,
9137
+ 121,
9138
+ 104,
9139
+ 101,
9140
+ 109,
9141
+ 45,
9142
+ 115,
9143
+ 116,
9144
+ 97,
9145
+ 116,
9146
+ 101
9147
+ ]
9148
+ },
9149
+ {
9150
+ kind: "account",
9151
+ path: "mint"
9152
+ }
9153
+ ]
9154
+ }
9155
+ },
9156
+ {
9157
+ name: "sol_vault",
9158
+ writable: true,
9159
+ pda: {
9160
+ seeds: [
9161
+ {
9162
+ kind: "const",
9163
+ value: [
9164
+ 115,
9165
+ 111,
9166
+ 108,
9167
+ 45,
9168
+ 118,
9169
+ 97,
9170
+ 117,
9171
+ 108,
9172
+ 116
9173
+ ]
9174
+ }
9175
+ ]
9176
+ }
9177
+ },
9178
+ {
9179
+ name: "mint"
9180
+ },
9181
+ {
9182
+ name: "mayhem_token_vault",
9183
+ writable: true,
9184
+ pda: {
9185
+ seeds: [
9186
+ {
9187
+ kind: "account",
9188
+ path: "sol_vault"
9189
+ },
9190
+ {
9191
+ kind: "account",
9192
+ path: "mint"
9193
+ },
9194
+ {
9195
+ kind: "account",
9196
+ path: "mint"
9197
+ }
9198
+ ],
9199
+ program: {
9200
+ kind: "const",
9201
+ value: [
9202
+ 140,
9203
+ 151,
9204
+ 37,
9205
+ 143,
9206
+ 78,
9207
+ 36,
9208
+ 137,
9209
+ 241,
9210
+ 187,
9211
+ 61,
9212
+ 16,
9213
+ 41,
9214
+ 20,
9215
+ 142,
9216
+ 13,
9217
+ 131,
9218
+ 11,
9219
+ 90,
9220
+ 19,
9221
+ 153,
9222
+ 218,
9223
+ 255,
9224
+ 16,
9225
+ 132,
9226
+ 4,
9227
+ 142,
9228
+ 123,
9229
+ 216,
9230
+ 219,
9231
+ 233,
9232
+ 248,
9233
+ 89
9234
+ ]
9235
+ }
9236
+ }
9237
+ },
9238
+ {
9239
+ name: "token_program",
9240
+ address: "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"
9241
+ },
9242
+ {
9243
+ name: "system_program",
9244
+ address: "11111111111111111111111111111111"
9245
+ },
9246
+ {
9247
+ name: "global"
9248
+ },
9249
+ {
9250
+ name: "bonding_curve",
9251
+ writable: true,
9252
+ pda: {
9253
+ seeds: [
9254
+ {
9255
+ kind: "const",
9256
+ value: [
9257
+ 98,
9258
+ 111,
9259
+ 110,
9260
+ 100,
9261
+ 105,
9262
+ 110,
9263
+ 103,
9264
+ 45,
9265
+ 99,
9266
+ 117,
9267
+ 114,
9268
+ 118,
9269
+ 101
9270
+ ]
9271
+ },
9272
+ {
9273
+ kind: "account",
9274
+ path: "mint"
9275
+ }
9276
+ ],
9277
+ program: {
9278
+ kind: "const",
9279
+ value: [
9280
+ 1,
9281
+ 86,
9282
+ 224,
9283
+ 246,
9284
+ 147,
9285
+ 102,
9286
+ 90,
9287
+ 207,
9288
+ 68,
9289
+ 219,
9290
+ 21,
9291
+ 104,
9292
+ 191,
9293
+ 23,
9294
+ 91,
9295
+ 170,
9296
+ 81,
9297
+ 137,
9298
+ 203,
9299
+ 151,
9300
+ 245,
9301
+ 210,
9302
+ 255,
9303
+ 59,
9304
+ 101,
9305
+ 93,
9306
+ 43,
9307
+ 182,
9308
+ 253,
9309
+ 109,
9310
+ 24,
9311
+ 176
9312
+ ]
9313
+ }
9314
+ }
9315
+ },
9316
+ {
9317
+ name: "fee_recipient",
9318
+ writable: true
9319
+ },
9320
+ {
9321
+ name: "associated_bonding_curve",
9322
+ writable: true,
9323
+ pda: {
9324
+ seeds: [
9325
+ {
9326
+ kind: "account",
9327
+ path: "bonding_curve"
9328
+ },
9329
+ {
9330
+ kind: "account",
9331
+ path: "mint"
9332
+ },
9333
+ {
9334
+ kind: "account",
9335
+ path: "mint"
9336
+ }
9337
+ ],
9338
+ program: {
9339
+ kind: "const",
9340
+ value: [
9341
+ 140,
9342
+ 151,
9343
+ 37,
9344
+ 143,
9345
+ 78,
9346
+ 36,
9347
+ 137,
9348
+ 241,
9349
+ 187,
9350
+ 61,
9351
+ 16,
9352
+ 41,
9353
+ 20,
9354
+ 142,
9355
+ 13,
9356
+ 131,
9357
+ 11,
9358
+ 90,
9359
+ 19,
9360
+ 153,
9361
+ 218,
9362
+ 255,
9363
+ 16,
9364
+ 132,
9365
+ 4,
9366
+ 142,
9367
+ 123,
9368
+ 216,
9369
+ 219,
9370
+ 233,
9371
+ 248,
9372
+ 89
9373
+ ]
9374
+ }
9375
+ }
9376
+ },
9377
+ {
9378
+ name: "creator_vault",
9379
+ writable: true
9380
+ },
9381
+ {
9382
+ name: "pump_event_authority"
9383
+ },
9384
+ {
9385
+ name: "pump_program",
9386
+ address: "6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"
9387
+ },
9388
+ {
9389
+ name: "fee_config"
9390
+ },
9391
+ {
9392
+ name: "fee_program"
9393
+ },
9394
+ {
9395
+ name: "event_authority",
9396
+ pda: {
9397
+ seeds: [
9398
+ {
9399
+ kind: "const",
9400
+ value: [
9401
+ 95,
9402
+ 95,
9403
+ 101,
9404
+ 118,
9405
+ 101,
9406
+ 110,
9407
+ 116,
9408
+ 95,
9409
+ 97,
9410
+ 117,
9411
+ 116,
9412
+ 104,
9413
+ 111,
9414
+ 114,
9415
+ 105,
9416
+ 116,
9417
+ 121
9418
+ ]
9419
+ }
9420
+ ]
9421
+ }
9422
+ },
9423
+ {
9424
+ name: "program"
9425
+ }
9426
+ ],
9427
+ args: [
9428
+ {
9429
+ name: "market_cap",
9430
+ type: "u128"
9431
+ },
9432
+ {
9433
+ name: "slippage_bps",
9434
+ type: "u16"
9435
+ }
9436
+ ]
9437
+ },
9438
+ {
9439
+ name: "sell_pump_swap",
9440
+ discriminator: [
9441
+ 16,
9442
+ 198,
9443
+ 145,
9444
+ 240,
9445
+ 238,
9446
+ 101,
9447
+ 137,
9448
+ 203
9449
+ ],
9450
+ accounts: [
9451
+ {
9452
+ name: "trader",
9453
+ writable: true,
9454
+ signer: true,
9455
+ relations: [
9456
+ "global_params"
9457
+ ]
9458
+ },
9459
+ {
9460
+ name: "global_params",
9461
+ writable: true,
9462
+ pda: {
9463
+ seeds: [
9464
+ {
9465
+ kind: "const",
9466
+ value: [
9467
+ 103,
9468
+ 108,
9469
+ 111,
9470
+ 98,
9471
+ 97,
9472
+ 108,
9473
+ 45,
9474
+ 112,
9475
+ 97,
9476
+ 114,
9477
+ 97,
9478
+ 109,
9479
+ 115
9480
+ ]
9481
+ }
9482
+ ]
9483
+ }
9484
+ },
9485
+ {
9486
+ name: "mayhem_state",
9487
+ writable: true,
9488
+ pda: {
9489
+ seeds: [
9490
+ {
9491
+ kind: "const",
9492
+ value: [
9493
+ 109,
9494
+ 97,
9495
+ 121,
9496
+ 104,
9497
+ 101,
9498
+ 109,
9499
+ 45,
9500
+ 115,
9501
+ 116,
9502
+ 97,
9503
+ 116,
9504
+ 101
9505
+ ]
9506
+ },
9507
+ {
9508
+ kind: "account",
9509
+ path: "mint"
9510
+ }
9511
+ ]
9512
+ }
9513
+ },
9514
+ {
9515
+ name: "mint"
9516
+ },
9517
+ {
9518
+ name: "mayhem_token_vault",
9519
+ writable: true,
9520
+ pda: {
9521
+ seeds: [
9522
+ {
9523
+ kind: "account",
9524
+ path: "sol_vault"
9525
+ },
9526
+ {
9527
+ kind: "account",
9528
+ path: "mint"
9529
+ },
9530
+ {
9531
+ kind: "account",
9532
+ path: "mint"
9533
+ }
9534
+ ],
9535
+ program: {
9536
+ kind: "const",
9537
+ value: [
9538
+ 140,
9539
+ 151,
9540
+ 37,
9541
+ 143,
9542
+ 78,
9543
+ 36,
9544
+ 137,
9545
+ 241,
9546
+ 187,
9547
+ 61,
9548
+ 16,
9549
+ 41,
9550
+ 20,
9551
+ 142,
9552
+ 13,
9553
+ 131,
9554
+ 11,
9555
+ 90,
9556
+ 19,
9557
+ 153,
9558
+ 218,
9559
+ 255,
9560
+ 16,
9561
+ 132,
9562
+ 4,
9563
+ 142,
9564
+ 123,
9565
+ 216,
9566
+ 219,
9567
+ 233,
9568
+ 248,
9569
+ 89
9570
+ ]
9571
+ }
9572
+ }
9573
+ },
9574
+ {
9575
+ name: "mayhem_wsol_vault",
9576
+ writable: true,
9577
+ pda: {
9578
+ seeds: [
9579
+ {
9580
+ kind: "account",
9581
+ path: "sol_vault"
9582
+ },
9583
+ {
9584
+ kind: "account",
9585
+ path: "quote_token_program"
9586
+ },
9587
+ {
9588
+ kind: "account",
9589
+ path: "wsol_mint"
9590
+ }
9591
+ ],
9592
+ program: {
9593
+ kind: "const",
9594
+ value: [
9595
+ 140,
9596
+ 151,
9597
+ 37,
9598
+ 143,
9599
+ 78,
9600
+ 36,
9601
+ 137,
9602
+ 241,
9603
+ 187,
9604
+ 61,
9605
+ 16,
9606
+ 41,
9607
+ 20,
9608
+ 142,
9609
+ 13,
9610
+ 131,
9611
+ 11,
9612
+ 90,
9613
+ 19,
9614
+ 153,
9615
+ 218,
9616
+ 255,
9617
+ 16,
9618
+ 132,
9619
+ 4,
9620
+ 142,
9621
+ 123,
9622
+ 216,
9623
+ 219,
9624
+ 233,
9625
+ 248,
9626
+ 89
9627
+ ]
9628
+ }
9629
+ }
9630
+ },
9631
+ {
9632
+ name: "sol_vault",
9633
+ writable: true,
9634
+ pda: {
9635
+ seeds: [
9636
+ {
9637
+ kind: "const",
9638
+ value: [
9639
+ 115,
9640
+ 111,
9641
+ 108,
9642
+ 45,
9643
+ 118,
9644
+ 97,
9645
+ 117,
9646
+ 108,
9647
+ 116
9648
+ ]
9649
+ }
9650
+ ]
9651
+ }
9652
+ },
9653
+ {
9654
+ name: "system_program",
9655
+ address: "11111111111111111111111111111111"
9656
+ },
9657
+ {
9658
+ name: "quote_token_program"
9659
+ },
9660
+ {
9661
+ name: "base_token_program"
9662
+ },
9663
+ {
9664
+ name: "associated_token_program",
9665
+ address: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"
9666
+ },
9667
+ {
9668
+ name: "pool",
9669
+ writable: true
9670
+ },
9671
+ {
9672
+ name: "global_config"
9673
+ },
9674
+ {
9675
+ name: "wsol_mint"
9676
+ },
9677
+ {
9678
+ name: "pool_base_token_account",
9679
+ writable: true
9680
+ },
9681
+ {
9682
+ name: "pool_quote_token_account",
9683
+ writable: true
9684
+ },
9685
+ {
9686
+ name: "protocol_fee_recipient",
9687
+ writable: true
9688
+ },
9689
+ {
9690
+ name: "protocol_fee_recipient_token_account",
9691
+ pda: {
9692
+ seeds: [
9693
+ {
9694
+ kind: "account",
9695
+ path: "protocol_fee_recipient"
9696
+ },
9697
+ {
9698
+ kind: "account",
9699
+ path: "quote_token_program"
9700
+ },
9701
+ {
9702
+ kind: "account",
9703
+ path: "wsol_mint"
9704
+ }
9705
+ ],
9706
+ program: {
9707
+ kind: "const",
9708
+ value: [
9709
+ 140,
9710
+ 151,
9711
+ 37,
9712
+ 143,
9713
+ 78,
9714
+ 36,
9715
+ 137,
9716
+ 241,
9717
+ 187,
9718
+ 61,
9719
+ 16,
9720
+ 41,
9721
+ 20,
9722
+ 142,
9723
+ 13,
9724
+ 131,
9725
+ 11,
9726
+ 90,
9727
+ 19,
9728
+ 153,
9729
+ 218,
9730
+ 255,
9731
+ 16,
9732
+ 132,
9733
+ 4,
9734
+ 142,
9735
+ 123,
9736
+ 216,
9737
+ 219,
9738
+ 233,
9739
+ 248,
9740
+ 89
9741
+ ]
9742
+ }
9743
+ }
9744
+ },
9745
+ {
9746
+ name: "creator_vault",
9747
+ writable: true
9748
+ },
9749
+ {
9750
+ name: "pump_swap_event_authority"
9751
+ },
9752
+ {
9753
+ name: "pump_swap_program",
9754
+ address: "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
9755
+ },
9756
+ {
9757
+ name: "coin_creator_vault_ata",
9758
+ pda: {
9759
+ seeds: [
9760
+ {
9761
+ kind: "account",
9762
+ path: "coin_creator_vault_authority"
9763
+ },
9764
+ {
9765
+ kind: "account",
9766
+ path: "quote_token_program"
9767
+ },
9768
+ {
9769
+ kind: "account",
9770
+ path: "wsol_mint"
9771
+ }
9772
+ ],
9773
+ program: {
9774
+ kind: "const",
9775
+ value: [
9776
+ 140,
9777
+ 151,
9778
+ 37,
9779
+ 143,
9780
+ 78,
9781
+ 36,
9782
+ 137,
9783
+ 241,
9784
+ 187,
9785
+ 61,
9786
+ 16,
9787
+ 41,
9788
+ 20,
9789
+ 142,
9790
+ 13,
9791
+ 131,
9792
+ 11,
9793
+ 90,
9794
+ 19,
9795
+ 153,
9796
+ 218,
9797
+ 255,
9798
+ 16,
9799
+ 132,
9800
+ 4,
9801
+ 142,
9802
+ 123,
9803
+ 216,
9804
+ 219,
9805
+ 233,
9806
+ 248,
9807
+ 89
9808
+ ]
9809
+ }
9810
+ }
9811
+ },
9812
+ {
9813
+ name: "coin_creator_vault_authority"
9814
+ },
9815
+ {
9816
+ name: "fee_config"
9817
+ },
9818
+ {
9819
+ name: "fee_program"
9820
+ },
9821
+ {
9822
+ name: "event_authority",
9823
+ pda: {
9824
+ seeds: [
9825
+ {
9826
+ kind: "const",
9827
+ value: [
9828
+ 95,
9829
+ 95,
9830
+ 101,
9831
+ 118,
9832
+ 101,
9833
+ 110,
9834
+ 116,
9835
+ 95,
9836
+ 97,
9837
+ 117,
9838
+ 116,
9839
+ 104,
9840
+ 111,
9841
+ 114,
9842
+ 105,
9843
+ 116,
9844
+ 121
9845
+ ]
9846
+ }
9847
+ ]
9848
+ }
9849
+ },
9850
+ {
9851
+ name: "program"
9852
+ }
9853
+ ],
9854
+ args: [
9855
+ {
9856
+ name: "market_cap",
9857
+ type: "u128"
9858
+ },
9859
+ {
9860
+ name: "slippage_bps",
9861
+ type: "u16"
9862
+ }
9863
+ ]
9864
+ },
9865
+ {
9866
+ name: "stop_trading",
9867
+ discriminator: [
9868
+ 127,
9869
+ 176,
9870
+ 106,
9871
+ 59,
9872
+ 242,
9873
+ 122,
9874
+ 114,
9875
+ 111
9876
+ ],
9877
+ accounts: [
9878
+ {
9879
+ name: "admin",
9880
+ writable: true,
9881
+ signer: true,
9882
+ relations: [
9883
+ "global_params"
9884
+ ]
9885
+ },
9886
+ {
9887
+ name: "global_params",
9888
+ writable: true,
9889
+ pda: {
9890
+ seeds: [
9891
+ {
9892
+ kind: "const",
9893
+ value: [
9894
+ 103,
9895
+ 108,
9896
+ 111,
9897
+ 98,
9898
+ 97,
9899
+ 108,
9900
+ 45,
9901
+ 112,
9902
+ 97,
9903
+ 114,
9904
+ 97,
9905
+ 109,
9906
+ 115
9907
+ ]
9908
+ }
9909
+ ]
9910
+ }
9911
+ },
9912
+ {
9913
+ name: "system_program",
9914
+ address: "11111111111111111111111111111111"
9915
+ }
9916
+ ],
9917
+ args: []
9918
+ },
9919
+ {
9920
+ name: "update_admin",
9921
+ discriminator: [
9922
+ 161,
9923
+ 176,
9924
+ 40,
9925
+ 213,
9926
+ 60,
9927
+ 184,
9928
+ 179,
9929
+ 228
9930
+ ],
9931
+ accounts: [
9932
+ {
9933
+ name: "admin",
9934
+ writable: true,
9935
+ signer: true,
9936
+ relations: [
9937
+ "global_params"
9938
+ ]
9939
+ },
9940
+ {
9941
+ name: "global_params",
9942
+ writable: true,
9943
+ pda: {
9944
+ seeds: [
9945
+ {
9946
+ kind: "const",
9947
+ value: [
9948
+ 103,
9949
+ 108,
9950
+ 111,
9951
+ 98,
9952
+ 97,
9953
+ 108,
9954
+ 45,
9955
+ 112,
9956
+ 97,
9957
+ 114,
9958
+ 97,
9959
+ 109,
9960
+ 115
9961
+ ]
9962
+ }
9963
+ ]
9964
+ }
9965
+ },
9966
+ {
9967
+ name: "system_program",
9968
+ address: "11111111111111111111111111111111"
9969
+ }
9970
+ ],
9971
+ args: [
9972
+ {
9973
+ name: "trader",
9974
+ type: "pubkey"
9975
+ }
9976
+ ]
9977
+ },
9978
+ {
9979
+ name: "update_global_params",
9980
+ discriminator: [
9981
+ 146,
9982
+ 36,
9983
+ 222,
9984
+ 108,
9985
+ 89,
9986
+ 226,
9987
+ 249,
9988
+ 126
9989
+ ],
9990
+ accounts: [
9991
+ {
9992
+ name: "admin",
9993
+ writable: true,
9994
+ signer: true,
9995
+ relations: [
9996
+ "global_params"
9997
+ ]
9998
+ },
9999
+ {
10000
+ name: "global_params",
10001
+ writable: true,
10002
+ pda: {
10003
+ seeds: [
10004
+ {
10005
+ kind: "const",
10006
+ value: [
10007
+ 103,
10008
+ 108,
10009
+ 111,
10010
+ 98,
10011
+ 97,
10012
+ 108,
10013
+ 45,
10014
+ 112,
10015
+ 97,
10016
+ 114,
10017
+ 97,
10018
+ 109,
10019
+ 115
10020
+ ]
10021
+ }
10022
+ ]
10023
+ }
10024
+ },
10025
+ {
10026
+ name: "system_program",
10027
+ address: "11111111111111111111111111111111"
10028
+ }
10029
+ ],
10030
+ args: [
10031
+ {
10032
+ name: "sell_discount",
10033
+ type: {
10034
+ option: "u32"
10035
+ }
10036
+ },
10037
+ {
10038
+ name: "buy_discount",
10039
+ type: {
10040
+ option: "u32"
10041
+ }
10042
+ },
10043
+ {
10044
+ name: "max_sol_per_sell",
10045
+ type: {
10046
+ option: "u64"
10047
+ }
10048
+ },
10049
+ {
10050
+ name: "max_sol_per_buy",
10051
+ type: {
10052
+ option: "u64"
10053
+ }
10054
+ },
10055
+ {
10056
+ name: "max_risk_allowed",
10057
+ type: {
10058
+ option: "u64"
10059
+ }
10060
+ },
10061
+ {
10062
+ name: "max_risk_per_coin",
10063
+ type: {
10064
+ option: "u64"
10065
+ }
10066
+ },
10067
+ {
10068
+ name: "duration",
10069
+ type: {
10070
+ option: "u8"
10071
+ }
10072
+ },
10073
+ {
10074
+ name: "trade_rate_limit",
10075
+ type: {
10076
+ option: "i64"
10077
+ }
10078
+ },
10079
+ {
10080
+ name: "withdraw_rate_limit",
10081
+ type: {
10082
+ option: "i64"
10083
+ }
10084
+ },
10085
+ {
10086
+ name: "minimum_sol_reserves",
10087
+ type: {
10088
+ option: "u64"
10089
+ }
10090
+ }
10091
+ ]
10092
+ },
10093
+ {
10094
+ name: "update_trader",
10095
+ discriminator: [
10096
+ 201,
10097
+ 207,
10098
+ 99,
10099
+ 64,
10100
+ 101,
10101
+ 86,
10102
+ 175,
10103
+ 96
10104
+ ],
10105
+ accounts: [
10106
+ {
10107
+ name: "admin",
10108
+ writable: true,
10109
+ signer: true,
10110
+ relations: [
10111
+ "global_params"
10112
+ ]
10113
+ },
10114
+ {
10115
+ name: "global_params",
10116
+ writable: true,
10117
+ pda: {
10118
+ seeds: [
10119
+ {
10120
+ kind: "const",
10121
+ value: [
10122
+ 103,
10123
+ 108,
10124
+ 111,
10125
+ 98,
10126
+ 97,
10127
+ 108,
10128
+ 45,
10129
+ 112,
10130
+ 97,
10131
+ 114,
10132
+ 97,
10133
+ 109,
10134
+ 115
10135
+ ]
10136
+ }
10137
+ ]
10138
+ }
10139
+ },
10140
+ {
10141
+ name: "system_program",
10142
+ address: "11111111111111111111111111111111"
10143
+ }
10144
+ ],
10145
+ args: [
10146
+ {
10147
+ name: "trader",
10148
+ type: "pubkey"
10149
+ }
10150
+ ]
10151
+ },
10152
+ {
10153
+ name: "withdraw_admin",
10154
+ discriminator: [
10155
+ 30,
10156
+ 27,
10157
+ 135,
10158
+ 188,
10159
+ 137,
10160
+ 158,
10161
+ 218,
10162
+ 107
10163
+ ],
10164
+ accounts: [
10165
+ {
10166
+ name: "admin",
10167
+ writable: true,
10168
+ signer: true,
10169
+ relations: [
10170
+ "global_params"
10171
+ ]
10172
+ },
10173
+ {
10174
+ name: "global_params",
10175
+ writable: true,
10176
+ pda: {
10177
+ seeds: [
10178
+ {
10179
+ kind: "const",
10180
+ value: [
10181
+ 103,
10182
+ 108,
10183
+ 111,
10184
+ 98,
10185
+ 97,
10186
+ 108,
10187
+ 45,
10188
+ 112,
10189
+ 97,
10190
+ 114,
10191
+ 97,
10192
+ 109,
10193
+ 115
10194
+ ]
10195
+ }
10196
+ ]
10197
+ }
10198
+ },
10199
+ {
10200
+ name: "sol_vault",
10201
+ writable: true,
10202
+ pda: {
10203
+ seeds: [
10204
+ {
10205
+ kind: "const",
10206
+ value: [
10207
+ 115,
10208
+ 111,
10209
+ 108,
10210
+ 45,
10211
+ 118,
10212
+ 97,
10213
+ 117,
10214
+ 108,
10215
+ 116
10216
+ ]
10217
+ }
10218
+ ]
10219
+ }
10220
+ },
10221
+ {
10222
+ name: "system_program",
10223
+ address: "11111111111111111111111111111111"
10224
+ }
10225
+ ],
10226
+ args: [
10227
+ {
10228
+ name: "amount",
10229
+ type: "u64"
10230
+ }
10231
+ ]
10232
+ }
10233
+ ],
10234
+ accounts: [
10235
+ {
10236
+ name: "BondingCurve",
10237
+ discriminator: [
10238
+ 23,
10239
+ 183,
10240
+ 248,
10241
+ 55,
10242
+ 96,
10243
+ 216,
10244
+ 172,
10245
+ 96
10246
+ ]
10247
+ },
10248
+ {
10249
+ name: "GlobalConfig",
10250
+ discriminator: [
10251
+ 149,
10252
+ 8,
10253
+ 156,
10254
+ 202,
10255
+ 160,
10256
+ 252,
10257
+ 176,
10258
+ 217
10259
+ ]
10260
+ },
10261
+ {
10262
+ name: "GlobalParams",
10263
+ discriminator: [
10264
+ 121,
10265
+ 193,
10266
+ 248,
10267
+ 87,
10268
+ 195,
10269
+ 56,
10270
+ 76,
10271
+ 11
10272
+ ]
10273
+ },
10274
+ {
10275
+ name: "MayhemState",
10276
+ discriminator: [
10277
+ 177,
10278
+ 253,
10279
+ 191,
10280
+ 125,
10281
+ 203,
10282
+ 22,
10283
+ 134,
10284
+ 107
10285
+ ]
10286
+ },
10287
+ {
10288
+ name: "Pool",
10289
+ discriminator: [
10290
+ 241,
10291
+ 154,
10292
+ 109,
10293
+ 4,
10294
+ 17,
10295
+ 177,
10296
+ 109,
10297
+ 188
10298
+ ]
10299
+ }
10300
+ ],
10301
+ events: [
10302
+ {
10303
+ name: "BurnEvent",
10304
+ discriminator: [
10305
+ 33,
10306
+ 89,
10307
+ 47,
10308
+ 117,
10309
+ 82,
10310
+ 124,
10311
+ 238,
10312
+ 250
10313
+ ]
10314
+ },
10315
+ {
10316
+ name: "ExtendAccountEvent",
10317
+ discriminator: [
10318
+ 97,
10319
+ 97,
10320
+ 215,
10321
+ 144,
10322
+ 93,
10323
+ 146,
10324
+ 22,
10325
+ 124
10326
+ ]
10327
+ },
10328
+ {
10329
+ name: "MayhemTradeEvent",
10330
+ discriminator: [
10331
+ 49,
10332
+ 72,
10333
+ 123,
10334
+ 45,
10335
+ 110,
10336
+ 64,
10337
+ 176,
10338
+ 133
10339
+ ]
10340
+ }
10341
+ ],
10342
+ errors: [
10343
+ {
10344
+ code: 6e3,
10345
+ name: "TradingPaused",
10346
+ msg: "Trading is paused"
10347
+ },
10348
+ {
10349
+ code: 6001,
10350
+ name: "TradingActive",
10351
+ msg: "Trading is active"
10352
+ },
10353
+ {
10354
+ code: 6002,
10355
+ name: "MathOverflow",
10356
+ msg: "Math overflow"
10357
+ },
10358
+ {
10359
+ code: 6003,
10360
+ name: "SolReservesTooLow",
10361
+ msg: "Too little sol reserves"
10362
+ },
10363
+ {
10364
+ code: 6004,
10365
+ name: "MayhemModeEnded",
10366
+ msg: "Mayhem mode ended"
10367
+ },
10368
+ {
10369
+ code: 6005,
10370
+ name: "MayhemModeNotEnded",
10371
+ msg: "Mayhem mode not ended"
10372
+ },
10373
+ {
10374
+ code: 6006,
10375
+ name: "OverallRiskExceeded",
10376
+ msg: "Overall risk tolerance exceeded"
10377
+ },
10378
+ {
10379
+ code: 6007,
10380
+ name: "CoinRiskExceeded",
10381
+ msg: "Per coin risk tolerance exceeded"
10382
+ },
10383
+ {
10384
+ code: 6008,
10385
+ name: "PumpCpiFailed",
10386
+ msg: "Pump CPI call failed"
10387
+ },
10388
+ {
10389
+ code: 6009,
10390
+ name: "PumpCpiMathOverflow",
10391
+ msg: "Math Overflow in Pump CPI call"
10392
+ },
10393
+ {
10394
+ code: 6010,
10395
+ name: "PumpSwapCpiFailed",
10396
+ msg: "Pump Swap CPI call failed"
10397
+ },
10398
+ {
10399
+ code: 6011,
10400
+ name: "PumpSwapCpiMathOverflow",
10401
+ msg: "Math Overflow in Pump Swap CPI call"
10402
+ },
10403
+ {
10404
+ code: 6012,
10405
+ name: "PumpCpiSlippage",
10406
+ msg: "Price impact exceeds slippage tolerance in Pump CPI call"
10407
+ },
10408
+ {
10409
+ code: 6013,
10410
+ name: "PumpSwapCpiSlippage",
10411
+ msg: "Price impact exceeds slippage tolerance in Pump Swap CPI call"
10412
+ },
10413
+ {
10414
+ code: 6014,
10415
+ name: "WithdrawRateLimit",
10416
+ msg: "Withdraw Rate limit"
10417
+ },
10418
+ {
10419
+ code: 6015,
10420
+ name: "TradeRateLimit",
10421
+ msg: "Trade Rate limit"
10422
+ },
10423
+ {
10424
+ code: 6016,
10425
+ name: "AccountTypeNotSupported",
10426
+ msg: "Account type not supported"
10427
+ }
10428
+ ],
10429
+ types: [
10430
+ {
10431
+ name: "BondingCurve",
10432
+ type: {
10433
+ kind: "struct",
10434
+ fields: [
10435
+ {
10436
+ name: "virtual_token_reserves",
10437
+ type: "u64"
10438
+ },
10439
+ {
10440
+ name: "virtual_sol_reserves",
10441
+ type: "u64"
10442
+ },
10443
+ {
10444
+ name: "real_token_reserves",
10445
+ type: "u64"
10446
+ },
10447
+ {
10448
+ name: "real_sol_reserves",
10449
+ type: "u64"
10450
+ },
10451
+ {
10452
+ name: "token_total_supply",
10453
+ type: "u64"
10454
+ },
10455
+ {
10456
+ name: "complete",
10457
+ type: "bool"
10458
+ },
10459
+ {
10460
+ name: "creator",
10461
+ type: "pubkey"
10462
+ },
10463
+ {
10464
+ name: "is_mayhem_mode",
10465
+ type: "bool"
10466
+ }
10467
+ ]
10468
+ }
10469
+ },
10470
+ {
10471
+ name: "BurnEvent",
10472
+ type: {
10473
+ kind: "struct",
10474
+ fields: [
10475
+ {
10476
+ name: "amount",
10477
+ type: "u64"
10478
+ },
10479
+ {
10480
+ name: "mint",
10481
+ type: "pubkey"
10482
+ },
10483
+ {
10484
+ name: "mayhem_state",
10485
+ type: "pubkey"
10486
+ },
10487
+ {
10488
+ name: "timestamp",
10489
+ type: "i64"
10490
+ }
10491
+ ]
10492
+ }
10493
+ },
10494
+ {
10495
+ name: "CoinState",
10496
+ type: {
10497
+ kind: "enum",
10498
+ variants: [
10499
+ {
10500
+ name: "INITIALIZED"
10501
+ },
10502
+ {
10503
+ name: "ACTIVE"
10504
+ },
10505
+ {
10506
+ name: "EXPIRED"
10507
+ }
10508
+ ]
10509
+ }
10510
+ },
10511
+ {
10512
+ name: "ExtendAccountEvent",
10513
+ type: {
10514
+ kind: "struct",
10515
+ fields: [
10516
+ {
10517
+ name: "account",
10518
+ type: "pubkey"
10519
+ },
10520
+ {
10521
+ name: "user",
10522
+ type: "pubkey"
10523
+ },
10524
+ {
10525
+ name: "current_size",
10526
+ type: "u64"
10527
+ },
10528
+ {
10529
+ name: "new_size",
10530
+ type: "u64"
10531
+ },
10532
+ {
10533
+ name: "timestamp",
10534
+ type: "i64"
10535
+ }
10536
+ ]
10537
+ }
10538
+ },
10539
+ {
10540
+ name: "GlobalConfig",
10541
+ type: {
10542
+ kind: "struct",
10543
+ fields: [
10544
+ {
10545
+ name: "admin",
10546
+ type: "pubkey"
10547
+ },
10548
+ {
10549
+ name: "lp_fee_basis_points",
10550
+ type: "u64"
10551
+ },
10552
+ {
10553
+ name: "protocol_fee_basis_points",
10554
+ type: "u64"
10555
+ },
10556
+ {
10557
+ name: "disable_flags",
10558
+ type: "u8"
10559
+ },
10560
+ {
10561
+ name: "protocol_fee_recipients",
10562
+ type: {
10563
+ array: [
10564
+ "pubkey",
10565
+ 8
10566
+ ]
10567
+ }
10568
+ },
10569
+ {
10570
+ name: "coin_creator_fee_basis_points",
10571
+ type: "u64"
10572
+ },
10573
+ {
10574
+ name: "admin_set_coin_creator_authority",
10575
+ type: "pubkey"
10576
+ },
10577
+ {
10578
+ name: "whitelist_pda",
10579
+ type: "pubkey"
10580
+ },
10581
+ {
10582
+ name: "reserved_fee_recipient",
10583
+ type: "pubkey"
10584
+ }
10585
+ ]
10586
+ }
10587
+ },
10588
+ {
10589
+ name: "GlobalParams",
10590
+ type: {
10591
+ kind: "struct",
10592
+ fields: [
10593
+ {
10594
+ name: "sell_discount",
10595
+ type: "u32"
10596
+ },
10597
+ {
10598
+ name: "buy_discount",
10599
+ type: "u32"
10600
+ },
10601
+ {
10602
+ name: "max_sol_per_sell",
10603
+ type: "u64"
10604
+ },
10605
+ {
10606
+ name: "max_sol_per_buy",
10607
+ type: "u64"
10608
+ },
10609
+ {
10610
+ name: "max_risk_allowed",
10611
+ type: "u64"
10612
+ },
10613
+ {
10614
+ name: "max_risk_per_coin",
10615
+ type: "u64"
10616
+ },
10617
+ {
10618
+ name: "trading_paused",
10619
+ type: "bool"
10620
+ },
10621
+ {
10622
+ name: "admin",
10623
+ type: "pubkey"
10624
+ },
10625
+ {
10626
+ name: "trader",
10627
+ type: "pubkey"
10628
+ },
10629
+ {
10630
+ name: "total_sol_deployed",
10631
+ type: "i128"
10632
+ },
10633
+ {
10634
+ name: "minimum_sol_reserves",
10635
+ type: "u64"
10636
+ },
10637
+ {
10638
+ name: "duration",
10639
+ type: "u8"
10640
+ },
10641
+ {
10642
+ name: "last_withdraw_timestamp",
10643
+ type: "i64"
10644
+ },
10645
+ {
10646
+ name: "trade_rate_limit",
10647
+ type: "i64"
10648
+ },
10649
+ {
10650
+ name: "withdraw_rate_limit",
10651
+ type: "i64"
10652
+ }
10653
+ ]
10654
+ }
10655
+ },
10656
+ {
10657
+ name: "MayhemState",
10658
+ type: {
10659
+ kind: "struct",
10660
+ fields: [
10661
+ {
10662
+ name: "creation_time",
10663
+ type: "i64"
10664
+ },
10665
+ {
10666
+ name: "expiration_time",
10667
+ type: "i64"
10668
+ },
10669
+ {
10670
+ name: "mint",
10671
+ type: "pubkey"
10672
+ },
10673
+ {
10674
+ name: "sol_deployed",
10675
+ type: "i128"
10676
+ },
10677
+ {
10678
+ name: "tokens_deployed",
10679
+ type: "i128"
10680
+ },
10681
+ {
10682
+ name: "trading_paused",
10683
+ type: "bool"
10684
+ },
10685
+ {
10686
+ name: "last_trade_timestamp",
10687
+ type: "i64"
10688
+ },
10689
+ {
10690
+ name: "coin_state",
10691
+ type: {
10692
+ defined: {
10693
+ name: "CoinState"
10694
+ }
10695
+ }
10696
+ },
10697
+ {
10698
+ name: "amount_burned",
10699
+ type: "u64"
10700
+ }
10701
+ ]
10702
+ }
10703
+ },
10704
+ {
10705
+ name: "MayhemTradeEvent",
10706
+ type: {
10707
+ kind: "struct",
10708
+ fields: [
10709
+ {
10710
+ name: "trade_type",
10711
+ type: {
10712
+ defined: {
10713
+ name: "TradeType"
10714
+ }
10715
+ }
10716
+ },
10717
+ {
10718
+ name: "trader",
10719
+ type: "pubkey"
10720
+ },
10721
+ {
10722
+ name: "mint",
10723
+ type: "pubkey"
10724
+ },
10725
+ {
10726
+ name: "sol_amount",
10727
+ type: "u64"
10728
+ },
10729
+ {
10730
+ name: "token_amount",
10731
+ type: "u64"
10732
+ },
10733
+ {
10734
+ name: "sol_vault_balance",
10735
+ type: "u64"
10736
+ },
10737
+ {
10738
+ name: "token_vault_balance",
10739
+ type: "u64"
10740
+ },
10741
+ {
10742
+ name: "sol_risk",
10743
+ type: "i128"
10744
+ },
10745
+ {
10746
+ name: "token_risk",
10747
+ type: "i128"
10748
+ },
10749
+ {
10750
+ name: "virtual_sol_reserves",
10751
+ type: "u64"
10752
+ },
10753
+ {
10754
+ name: "virtual_token_reserves",
10755
+ type: "u64"
10756
+ },
10757
+ {
10758
+ name: "total_sol_risk",
10759
+ type: "i128"
10760
+ },
10761
+ {
10762
+ name: "timestamp",
10763
+ type: "i64"
10764
+ },
10765
+ {
10766
+ name: "expiration_time",
10767
+ type: "i64"
10768
+ },
10769
+ {
10770
+ name: "real_sol_reserves",
10771
+ type: "u64"
10772
+ },
10773
+ {
10774
+ name: "real_token_reserves",
10775
+ type: "u64"
10776
+ }
10777
+ ]
10778
+ }
10779
+ },
10780
+ {
10781
+ name: "Pool",
10782
+ type: {
10783
+ kind: "struct",
10784
+ fields: [
10785
+ {
10786
+ name: "pool_bump",
10787
+ type: "u8"
10788
+ },
10789
+ {
10790
+ name: "index",
10791
+ type: "u16"
10792
+ },
10793
+ {
10794
+ name: "creator",
10795
+ type: "pubkey"
10796
+ },
10797
+ {
10798
+ name: "base_mint",
10799
+ type: "pubkey"
10800
+ },
10801
+ {
10802
+ name: "quote_mint",
10803
+ type: "pubkey"
10804
+ },
10805
+ {
10806
+ name: "lp_mint",
10807
+ type: "pubkey"
10808
+ },
10809
+ {
10810
+ name: "pool_base_token_account",
10811
+ type: "pubkey"
10812
+ },
10813
+ {
10814
+ name: "pool_quote_token_account",
10815
+ type: "pubkey"
10816
+ },
10817
+ {
10818
+ name: "lp_supply",
10819
+ type: "u64"
10820
+ },
10821
+ {
10822
+ name: "coin_creator",
10823
+ type: "pubkey"
10824
+ },
10825
+ {
10826
+ name: "is_mayhem_mode",
10827
+ type: "bool"
10828
+ }
10829
+ ]
10830
+ }
10831
+ },
10832
+ {
10833
+ name: "TradeType",
10834
+ type: {
10835
+ kind: "enum",
10836
+ variants: [
10837
+ {
10838
+ name: "Buy"
10839
+ },
10840
+ {
10841
+ name: "Sell"
10842
+ }
10843
+ ]
10844
+ }
10845
+ }
10846
+ ]
10847
+ };
10848
+
10849
+ // src/onlineSdk.ts
10850
+ function getMayhemProgram(connection) {
10851
+ return new Program(
10852
+ mayhem_program_default,
10853
+ new AnchorProvider(connection, null, {})
10854
+ );
10855
+ }
10856
+ var OFFLINE_PUMP_PROGRAM = getPumpProgram(null);
10857
+ var OFFLINE_MAYHEM_PROGRAM = getMayhemProgram(null);
10858
+ var OnlinePumpSdk = class {
10859
+ constructor(connection) {
10860
+ this.connection = connection;
10861
+ this.pumpProgram = getPumpProgram(connection);
10862
+ this.offlinePumpProgram = OFFLINE_PUMP_PROGRAM;
10863
+ this.pumpAmmSdk = new OnlinePumpAmmSdk(connection);
10864
+ this.pumpAmmAdminSdk = new PumpAmmAdminSdk(connection);
10865
+ }
10866
+ async fetchGlobal() {
10867
+ return await this.pumpProgram.account.global.fetch(GLOBAL_PDA);
10868
+ }
10869
+ async fetchFeeConfig() {
10870
+ return await this.pumpProgram.account.feeConfig.fetch(PUMP_FEE_CONFIG_PDA);
10871
+ }
10872
+ async fetchBondingCurve(mint) {
10873
+ return await this.pumpProgram.account.bondingCurve.fetch(
10874
+ bondingCurvePda(mint)
10875
+ );
10876
+ }
10877
+ async fetchBuyState(mint, user, tokenProgram = TOKEN_PROGRAM_ID) {
10878
+ const [bondingCurveAccountInfo, associatedUserAccountInfo] = await this.connection.getMultipleAccountsInfo([
10879
+ bondingCurvePda(mint),
10880
+ getAssociatedTokenAddressSync(mint, user, true, tokenProgram)
10881
+ ]);
10882
+ if (!bondingCurveAccountInfo) {
10883
+ throw new Error(
10884
+ `Bonding curve account not found for mint: ${mint.toBase58()}`
10885
+ );
10886
+ }
10887
+ const bondingCurve = PUMP_SDK.decodeBondingCurve(bondingCurveAccountInfo);
10888
+ return { bondingCurveAccountInfo, bondingCurve, associatedUserAccountInfo };
10889
+ }
10890
+ async fetchSellState(mint, user, tokenProgram = TOKEN_PROGRAM_ID) {
10891
+ const [bondingCurveAccountInfo, associatedUserAccountInfo] = await this.connection.getMultipleAccountsInfo([
10892
+ bondingCurvePda(mint),
10893
+ getAssociatedTokenAddressSync(mint, user, true, tokenProgram)
10894
+ ]);
10895
+ if (!bondingCurveAccountInfo) {
10896
+ throw new Error(
10897
+ `Bonding curve account not found for mint: ${mint.toBase58()}`
10898
+ );
10899
+ }
10900
+ if (!associatedUserAccountInfo) {
10901
+ throw new Error(
10902
+ `Associated token account not found for mint: ${mint.toBase58()} and user: ${user.toBase58()}`
10903
+ );
10904
+ }
10905
+ const bondingCurve = PUMP_SDK.decodeBondingCurve(bondingCurveAccountInfo);
10906
+ return { bondingCurveAccountInfo, bondingCurve };
10907
+ }
10908
+ async fetchGlobalVolumeAccumulator() {
10909
+ return await this.pumpProgram.account.globalVolumeAccumulator.fetch(
10910
+ GLOBAL_VOLUME_ACCUMULATOR_PDA
10911
+ );
10912
+ }
10913
+ async fetchUserVolumeAccumulator(user) {
10914
+ return await this.pumpProgram.account.userVolumeAccumulator.fetchNullable(
10915
+ userVolumeAccumulatorPda(user)
10916
+ );
10917
+ }
7553
10918
  async fetchUserVolumeAccumulatorTotalStats(user) {
7554
10919
  const userVolumeAccumulator = await this.fetchUserVolumeAccumulator(
7555
10920
  user
@@ -7763,9 +11128,9 @@ var OnlinePumpSdk = class {
7763
11128
 
7764
11129
  // src/sdk.ts
7765
11130
  function getPumpProgram(connection) {
7766
- return new Program(
11131
+ return new Program2(
7767
11132
  pump_default,
7768
- new AnchorProvider(connection, null, {})
11133
+ new AnchorProvider2(connection, null, {})
7769
11134
  );
7770
11135
  }
7771
11136
  var PUMP_PROGRAM_ID = new PublicKey4(
@@ -7774,6 +11139,9 @@ var PUMP_PROGRAM_ID = new PublicKey4(
7774
11139
  var PUMP_AMM_PROGRAM_ID = new PublicKey4(
7775
11140
  "pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"
7776
11141
  );
11142
+ var MAYHEM_PROGRAM_ID = new PublicKey4(
11143
+ "MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e"
11144
+ );
7777
11145
  var PUMP_FEE_PROGRAM_ID = new PublicKey4(
7778
11146
  "pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"
7779
11147
  );
@@ -7854,12 +11222,18 @@ var PumpSdk = class {
7854
11222
  symbol,
7855
11223
  uri,
7856
11224
  creator,
7857
- user
11225
+ user,
11226
+ mayhemMode
7858
11227
  }) {
7859
- return await this.offlinePumpProgram.methods.createV2(name, symbol, uri, creator).accountsPartial({
11228
+ return await this.offlinePumpProgram.methods.createV2(name, symbol, uri, creator, mayhemMode).accountsPartial({
7860
11229
  mint,
7861
11230
  user,
7862
- tokenProgram: TOKEN_2022_PROGRAM_ID2
11231
+ tokenProgram: TOKEN_2022_PROGRAM_ID2,
11232
+ mayhemProgramId: MAYHEM_PROGRAM_ID,
11233
+ globalParams: getGlobalParamsPda(),
11234
+ solVault: getSolVaultPda(),
11235
+ mayhemState: getMayhemStatePda(mint),
11236
+ mayhemTokenVault: getTokenVaultPda(mint)
7863
11237
  }).instruction();
7864
11238
  }
7865
11239
  async buyInstructions({
@@ -7905,7 +11279,8 @@ var PumpSdk = class {
7905
11279
  amount,
7906
11280
  solAmount,
7907
11281
  slippage,
7908
- tokenProgram
11282
+ tokenProgram,
11283
+ mayhemMode: bondingCurve.isMayhemMode
7909
11284
  })
7910
11285
  );
7911
11286
  return instructions;
@@ -7919,11 +11294,12 @@ var PumpSdk = class {
7919
11294
  creator,
7920
11295
  user,
7921
11296
  amount,
7922
- solAmount
11297
+ solAmount,
11298
+ mayhemMode
7923
11299
  }) {
7924
11300
  const associatedUser = getAssociatedTokenAddressSync2(mint, user, true, TOKEN_2022_PROGRAM_ID2);
7925
11301
  return [
7926
- await this.createV2Instruction({ mint, name, symbol, uri, creator, user }),
11302
+ await this.createV2Instruction({ mint, name, symbol, uri, creator, user, mayhemMode }),
7927
11303
  await this.extendAccountInstruction({
7928
11304
  account: bondingCurvePda(mint),
7929
11305
  user
@@ -7996,14 +11372,15 @@ var PumpSdk = class {
7996
11372
  amount,
7997
11373
  solAmount,
7998
11374
  slippage,
7999
- tokenProgram
11375
+ tokenProgram,
11376
+ mayhemMode = false
8000
11377
  }) {
8001
11378
  return await this.getBuyInstructionInternal({
8002
11379
  user,
8003
11380
  associatedUser,
8004
11381
  mint,
8005
11382
  creator,
8006
- feeRecipient: getFeeRecipient(global),
11383
+ feeRecipient: getFeeRecipient(global, mayhemMode),
8007
11384
  amount,
8008
11385
  solAmount: solAmount.add(
8009
11386
  solAmount.mul(new BN5(Math.floor(slippage * 10))).div(new BN5(1e3))
@@ -8020,7 +11397,8 @@ var PumpSdk = class {
8020
11397
  amount,
8021
11398
  solAmount,
8022
11399
  slippage,
8023
- tokenProgram = TOKEN_PROGRAM_ID2
11400
+ tokenProgram = TOKEN_PROGRAM_ID2,
11401
+ mayhemMode = false
8024
11402
  }) {
8025
11403
  const instructions = [];
8026
11404
  if (bondingCurveAccountInfo.data.length < BONDING_CURVE_NEW_SIZE) {
@@ -8036,7 +11414,7 @@ var PumpSdk = class {
8036
11414
  user,
8037
11415
  mint,
8038
11416
  creator: bondingCurve.creator,
8039
- feeRecipient: getFeeRecipient(global),
11417
+ feeRecipient: getFeeRecipient(global, mayhemMode),
8040
11418
  amount,
8041
11419
  solAmount: solAmount.sub(
8042
11420
  solAmount.mul(new BN5(Math.floor(slippage * 10))).div(new BN5(1e3))
@@ -8181,9 +11559,13 @@ var PumpSdk = class {
8181
11559
  }
8182
11560
  };
8183
11561
  var PUMP_SDK = new PumpSdk();
8184
- function getFeeRecipient(global) {
8185
- const feeRecipients = [global.feeRecipient, ...global.feeRecipients];
8186
- return feeRecipients[Math.floor(Math.random() * feeRecipients.length)];
11562
+ function getFeeRecipient(global, mayhemMode) {
11563
+ if (!mayhemMode) {
11564
+ const feeRecipients = [global.feeRecipient, ...global.feeRecipients];
11565
+ return feeRecipients[Math.floor(Math.random() * feeRecipients.length)];
11566
+ } else {
11567
+ return global.reservedFeeRecipient;
11568
+ }
8187
11569
  }
8188
11570
 
8189
11571
  // src/pda.ts
@@ -8220,6 +11602,32 @@ function canonicalPumpPoolPda(mint) {
8220
11602
  function userVolumeAccumulatorPda(user) {
8221
11603
  return pumpPda([import_buffer.Buffer.from("user_volume_accumulator"), user.toBuffer()]);
8222
11604
  }
11605
+ var getGlobalParamsPda = () => {
11606
+ return PublicKey5.findProgramAddressSync(
11607
+ [import_buffer.Buffer.from("global-params")],
11608
+ MAYHEM_PROGRAM_ID
11609
+ )[0];
11610
+ };
11611
+ var getMayhemStatePda = (mint) => {
11612
+ return PublicKey5.findProgramAddressSync(
11613
+ [import_buffer.Buffer.from("mayhem-state"), mint.toBuffer()],
11614
+ MAYHEM_PROGRAM_ID
11615
+ )[0];
11616
+ };
11617
+ var getSolVaultPda = () => {
11618
+ return PublicKey5.findProgramAddressSync(
11619
+ [import_buffer.Buffer.from("sol-vault")],
11620
+ MAYHEM_PROGRAM_ID
11621
+ )[0];
11622
+ };
11623
+ var getTokenVaultPda = (mintPubkey) => {
11624
+ return getAssociatedTokenAddressSync3(
11625
+ mintPubkey,
11626
+ getSolVaultPda(),
11627
+ true,
11628
+ TOKEN_2022_PROGRAM_ID3
11629
+ );
11630
+ };
8223
11631
  export {
8224
11632
  BONDING_CURVE_NEW_SIZE,
8225
11633
  CANONICAL_POOL_INDEX,
@@ -8238,8 +11646,12 @@ export {
8238
11646
  currentDayTokens,
8239
11647
  getBuySolAmountFromTokenAmount,
8240
11648
  getBuyTokenAmountFromSolAmount,
11649
+ getGlobalParamsPda,
11650
+ getMayhemStatePda,
8241
11651
  getPumpProgram,
8242
11652
  getSellSolAmountFromTokenAmount,
11653
+ getSolVaultPda,
11654
+ getTokenVaultPda,
8243
11655
  newBondingCurve,
8244
11656
  pump_default as pumpIdl,
8245
11657
  pumpPoolAuthorityPda,