mirror of
https://github.com/chainstacklabs/pumpfun-bonkfun-bot.git
synced 2026-08-17 17:28:05 +00:00
Add mayhem mode support and Token2022 integration (#149)
* feat: mayhem update in idl * feat(examples): update bonding curve scripts * feat(example): update listen_blocksubscribe * feat(examples): update geyser listener * feat(examples): update all new token listeners * feat(examples): add comments, fix printing, formatting * feat(examples): pumpswap buy and sell update with mayhem mode * fix(examples): sell pump amm fee recipient * feat(examples): update decode scripts * feat(examples): update fetch price * feat(examples): buy and sell bonding curve scripts * feat(examples): add mint with mayhem mode enabled * feat(examples): improve listening to wallet txs * feat(examples): migration listener improvements * feat(examples): global vol accumulator is not writable * feat(examples): support token/token2022 programs in buy instructions * feat(examples): token/token2022 for pumpswap buy * feat(examples): token/token2022 supprot for sell instructions * feat(bot): support create_v2 with token2022, mayhem mode, other fixes * fix(bot): support only token2022 in logs and pumportal listeners * feat(bot): token2022 support in cleanup flow * fix(bot): update token program handling and improve price validation in trading logic * feat(bot): enhance token program handling for LetsBonk integration
This commit is contained in:
+241
-2
@@ -543,7 +543,6 @@
|
||||
},
|
||||
{
|
||||
"name": "global_volume_accumulator",
|
||||
"writable": true,
|
||||
"pda": {
|
||||
"seeds": [
|
||||
{
|
||||
@@ -972,7 +971,6 @@
|
||||
},
|
||||
{
|
||||
"name": "global_volume_accumulator",
|
||||
"writable": true,
|
||||
"pda": {
|
||||
"seeds": [
|
||||
{
|
||||
@@ -2085,6 +2083,10 @@
|
||||
{
|
||||
"name": "coin_creator",
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "is_mayhem_mode",
|
||||
"type": "bool"
|
||||
}
|
||||
]
|
||||
},
|
||||
@@ -3006,6 +3008,92 @@
|
||||
],
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"name": "set_reserved_fee_recipients",
|
||||
"discriminator": [
|
||||
111,
|
||||
172,
|
||||
162,
|
||||
232,
|
||||
114,
|
||||
89,
|
||||
213,
|
||||
142
|
||||
],
|
||||
"accounts": [
|
||||
{
|
||||
"name": "global_config",
|
||||
"writable": true,
|
||||
"pda": {
|
||||
"seeds": [
|
||||
{
|
||||
"kind": "const",
|
||||
"value": [
|
||||
103,
|
||||
108,
|
||||
111,
|
||||
98,
|
||||
97,
|
||||
108,
|
||||
95,
|
||||
99,
|
||||
111,
|
||||
110,
|
||||
102,
|
||||
105,
|
||||
103
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "admin",
|
||||
"signer": true,
|
||||
"relations": [
|
||||
"global_config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "event_authority",
|
||||
"pda": {
|
||||
"seeds": [
|
||||
{
|
||||
"kind": "const",
|
||||
"value": [
|
||||
95,
|
||||
95,
|
||||
101,
|
||||
118,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
95,
|
||||
97,
|
||||
117,
|
||||
116,
|
||||
104,
|
||||
111,
|
||||
114,
|
||||
105,
|
||||
116,
|
||||
121
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "program"
|
||||
}
|
||||
],
|
||||
"args": [
|
||||
{
|
||||
"name": "whitelist_pda",
|
||||
"type": "pubkey"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "sync_user_volume_accumulator",
|
||||
"discriminator": [
|
||||
@@ -3134,6 +3222,70 @@
|
||||
],
|
||||
"args": []
|
||||
},
|
||||
{
|
||||
"name": "toggle_mayhem_mode",
|
||||
"discriminator": [
|
||||
1,
|
||||
9,
|
||||
111,
|
||||
208,
|
||||
100,
|
||||
31,
|
||||
255,
|
||||
163
|
||||
],
|
||||
"accounts": [
|
||||
{
|
||||
"name": "admin",
|
||||
"signer": true,
|
||||
"relations": [
|
||||
"global_config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "global_config",
|
||||
"writable": true
|
||||
},
|
||||
{
|
||||
"name": "event_authority",
|
||||
"pda": {
|
||||
"seeds": [
|
||||
{
|
||||
"kind": "const",
|
||||
"value": [
|
||||
95,
|
||||
95,
|
||||
101,
|
||||
118,
|
||||
101,
|
||||
110,
|
||||
116,
|
||||
95,
|
||||
97,
|
||||
117,
|
||||
116,
|
||||
104,
|
||||
111,
|
||||
114,
|
||||
105,
|
||||
116,
|
||||
121
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "program"
|
||||
}
|
||||
],
|
||||
"args": [
|
||||
{
|
||||
"name": "enabled",
|
||||
"type": "bool"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "update_admin",
|
||||
"discriminator": [
|
||||
@@ -3644,6 +3796,19 @@
|
||||
216
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "ReservedFeeRecipientsEvent",
|
||||
"discriminator": [
|
||||
43,
|
||||
188,
|
||||
250,
|
||||
18,
|
||||
221,
|
||||
75,
|
||||
187,
|
||||
95
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "SellEvent",
|
||||
"discriminator": [
|
||||
@@ -3902,6 +4067,22 @@
|
||||
"code": 6040,
|
||||
"name": "BuySlippageBelowMinBaseAmountOut",
|
||||
"msg": "buy: slippage - would buy less tokens than expected min_base_amount_out"
|
||||
},
|
||||
{
|
||||
"code": 6041,
|
||||
"name": "MayhemModeDisabled"
|
||||
},
|
||||
{
|
||||
"code": 6042,
|
||||
"name": "OnlyPumpPoolsMayhemMode"
|
||||
},
|
||||
{
|
||||
"code": 6043,
|
||||
"name": "MayhemModeInDesiredState"
|
||||
},
|
||||
{
|
||||
"code": 6044,
|
||||
"name": "NotEnoughRemainingAccounts"
|
||||
}
|
||||
],
|
||||
"types": [
|
||||
@@ -4005,6 +4186,10 @@
|
||||
{
|
||||
"name": "creator",
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "is_mayhem_mode",
|
||||
"type": "bool"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4357,6 +4542,10 @@
|
||||
{
|
||||
"name": "coin_creator",
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "is_mayhem_mode",
|
||||
"type": "bool"
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4625,6 +4814,27 @@
|
||||
"The admin authority for setting coin creators"
|
||||
],
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "whitelist_pda",
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "reserved_fee_recipient",
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "mayhem_mode_enabled",
|
||||
"type": "bool"
|
||||
},
|
||||
{
|
||||
"name": "reserved_fee_recipients",
|
||||
"type": {
|
||||
"array": [
|
||||
"pubkey",
|
||||
7
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
@@ -4747,6 +4957,35 @@
|
||||
{
|
||||
"name": "coin_creator",
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "is_mayhem_mode",
|
||||
"type": "bool"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "ReservedFeeRecipientsEvent",
|
||||
"type": {
|
||||
"kind": "struct",
|
||||
"fields": [
|
||||
{
|
||||
"name": "timestamp",
|
||||
"type": "i64"
|
||||
},
|
||||
{
|
||||
"name": "reserved_fee_recipient",
|
||||
"type": "pubkey"
|
||||
},
|
||||
{
|
||||
"name": "reserved_fee_recipients",
|
||||
"type": {
|
||||
"array": [
|
||||
"pubkey",
|
||||
7
|
||||
]
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user