diff --git a/CHANGELOG.md b/CHANGELOG.md index 4c1bb66..248525c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -84,4 +84,5 @@ 0.7.50 - Raydium Launchpad event coverage bootstrap : normalisation locale canonique vers `raydium_launchpad`, ajout de `RAYDIUM_LAUNCHPAD_PROGRAM_ID`, synchronisation des entrées Carbon Launchpad dans le registre upstream, fallback audit/mapped decoder pour discriminants Launchpad, enrichissement audit Anchor self-CPI, maintien conservatoire en `decoded_events_only`, rapport Launchpad et SQL de validation dédiés. 0.7.50-pre-r2 - Clôture CPMM/CLMM post-Launchpad : ajout des entrées Carbon `cpi_event` pour `raydium_cpmm` et `raydium_clmm`, ajout de `raydium_clmm.update_dynamic_fee_config`, normalisation des Program-data events CLMM, ajout de la table `k_sol_token_account_events` et de la matérialisation `create_support_mint_associated`, reclassement des familles ambiguës (`cpi_transport`, `liquidity_calculation`, `liquidity_change`, `position_open`, `pool_create`, `admin_config`, `account_create`, `idl_management`), codage du discriminant CPMM `40f4bc78a7e9690a` comme `raydium_cpmm.anchor_idl_instruction` decoded-only après inspection Solscan, et contexte de secours pour matérialisation liquidity CLMM via événements frères quand possible. 0.7.51 - Raydium AMM v4 event coverage clôturé : decoder maximal local pour tous les discriminants officiels AMM v4 `00..11`, spécialisation des swaps `swap_base_in/out` et `swap_base_in/out_v2`, suppression durable du `raydium_amm_v4.swap` legacy, index AMM v4 en discriminant 1 octet, matérialisation validée des swaps, liquidity, lifecycle, fees, admin/config et side effects orderbook, `pre_initialize` conservé comme lifecycle audit deprecated/partial, `simulate_info` decoded-only, reset replay renforcé par `protocol_name`, validation des invariants failed/non-swap/single-target/unexplained gaps et maintien de `raydium_pool_v4` en audit conditionnel sans decoder autonome. -0.7.52 - Raydium Stable Swap event coverage clôturé : decoder legacy 1 octet pour la surface locale `00..0d`, matérialisation lifecycle/liquidity/admin/fee/orderbook selon contexte, swaps `swap_base_in/out` matérialisés uniquement depuis deltas de vaults exacts (`stable_swap_vault_balance_delta`), conservation des bornes d’instruction comme audit-only, failed transactions decoded-only avec skip reasons, validation locale 407 tests et clippy `-D warnings` OK. +0.7.52 - Raydium Stable Swap event coverage clôturé : decoder legacy 1 octet pour la surface locale `00..0d`, matérialisation lifecycle/liquidity/admin/fee/orderbook selon contexte, swaps `swap_base_in/out` matérialisés uniquement depuis deltas de vaults exacts (`stable_swap_vault_balance_delta`), conservation des bornes d’instruction comme audit-only, failed transactions decoded-only avec skip reasons, validation locale 407 tests et clippy `-D warnings` OK. +0.7.53 - Clôture PumpSwap : décodage transaction/log complet, matérialisation `buy/sell/buy_exact_quote_in` depuis sources exactes, events Anchor audit-only, tests synthétiques IDL, validation globale coverage SQL et non-régression Raydium. diff --git a/Cargo.toml b/Cargo.toml index f5f7921..31adc18 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -8,7 +8,7 @@ members = [ ] [workspace.package] -version = "0.7.52" +version = "0.7.53" edition = "2024" license = "MIT" repository = "https://git.sasedev.com/Sasedev/khadhroony-bobobot" diff --git a/README.md b/README.md index 497a96e..9b130fd 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,65 @@ # khadhroony-bobobot +## État final validé `0.7.53` — `pump_swap` + +La tranche `0.7.53 pump_swap` est clôturée côté décodage transaction/log et matérialisation métier. Elle ferme le program id unique `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` sans rouvrir Raydium. + +Points verrouillés : + +- `pump_swap.buy` et `pump_swap.sell` restent matérialisés uniquement depuis montants exacts transaction/vault/balance-delta ; +- `pump_swap.buy_exact_quote_in` est matérialisable seulement lorsqu'un `BuyEvent` Anchor exact est présent (`amountSource=pump_swap_anchor_buy_event`) ; les cas `instruction_bounds_only` restent decoded-only avec raison explicite ; +- les events Anchor `*_event` sont décodés comme events autonomes audit-only, sauf exception explicitement matérialisable (`claim_token_incentives_event` si un corpus réussi apparaît) ; +- les transactions failed restent traçables mais non actionnables ; +- les non-trades PumpSwap alimentent uniquement les tables métier prévues (`liquidity`, `lifecycle`, `fee`, `reward`, `admin`) et ne créent jamais de trade/candle ; +- les tests synthétiques verrouillent les instructions/events IDL non observés dans le corpus local ; +- la surveillance globale distingue maintenant les vrais gaps locaux, le backlog `upstream_git` et les observations non attribuées. + +Validation locale finale rapportée : + +```text +cargo test -p kb_lib -> 421 passed / 0 failed +cargo clippy -p kb_lib --all-targets -- -D warnings -> OK +``` + +Dernier replay élargi rapporté après backfill pool : + +```text +1189 replayed +0 decode skipped +1189 ledger upserts +967 unsafe ledger rows +928 trades +13 liquidity +8 lifecycle +0 tokenAccount +3700 candle upserts +instructionObservations = 25724 +resetDeleted = 5622 +catalog = 76 tokens / 80 pools / 80 pairs +``` + +Checks de fermeture : + +- `pump_swap` decoded without coverage : vide ; +- fallback `upstream_git` PumpSwap couvert localement : vide ; +- successful trade candidates PumpSwap sans trade et sans raison explicite : vide ; +- failed transaction avec business trade : vide ; +- non-swap matérialisé en trade : vide ; +- multi-target materialization : vide ; +- Raydium AMM v4 / CLMM / CPMM targeted observation gaps : vide après normalisation. + +Livrables `0.7.53` : + +- `docs/reports/PUMP_SWAP_EVENT_COVERAGE_REPORT.md` ; +- `docs/reports/DEX_COVERAGE_GLOBAL_WATCHLIST_0_7_53.md` ; +- `validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql` ; +- `validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql` ; +- `idls/` comme corpus local d'IDL Solscan à comparer aux sources Git. + +La suite immédiate est `pump_fees` / `pump_fun` selon priorité de backlog observé. Les petits gaps Meteora sont volontairement reportés aux tranches Meteora futures. + + ## État final validé `0.7.51` — `raydium_amm_v4` La tranche `0.7.51 raydium_amm_v4` est clôturable côté `kb_lib` après validation locale du decoder maximal AMM v4. @@ -118,9 +177,10 @@ Sources prioritaires : | Source | Usage attendu | |---|---| +| `idls/` | Corpus local d’IDL téléchargés depuis Solscan ; source de savoir locale à comparer aux sources Git avant promotion métier. | | `https://github.com/sevenlabs-hq/carbon/tree/main/decoders` | Source principale de discriminants, instructions et events multi-protocoles. | | `https://github.com/0xfnzero/solana-streamer` | Source complémentaire pour PumpFun, PumpSwap, Bonk et Raydium CPMM. | -| `https://github.com/0xfnzero/sol-parser-sdk/tree/main/idl` | IDL complémentaires pour programmes Solana supportés par parser SDK. | +| `https://github.com/0xfnzero/sol-parser-sdk/tree/main/idls` | IDL complémentaires pour programmes Solana supportés par parser SDK. | | `https://github.com/pinax-network/substreams-solana-idls/tree/main/src` | IDL et layouts additionnels à comparer au registre local. | | `https://github.com/hodlwarden/solana-tx-parser/tree/main/src` | Décodage transactionnel complémentaire et conventions de mapping. | | `https://github.com/openbook-dex/openbook-v2` | Source officielle OpenBook v2 : programme, IDL et logs. | @@ -427,17 +487,14 @@ Si une requête DB est ajoutée ou modifiée, mettre à jour les re-exports dans ## 8. Priorité immédiate -La priorité immédiate après le point de reprise `0.7.43-E5C` est : +La priorité immédiate après la clôture `0.7.53` est la suivante : -1. `0.7.48` : `raydium_cpmm` — clôturé côté event coverage ; -2. `0.7.49` : `raydium_clmm` — clôturé côté instructions observées, matérialisation non-trade prouvée et nettoyage fallback ; -3. `0.7.50-pre-r2` : `raydium_launchpad` clos + re-vérification `raydium_cpmm` / `raydium_clmm` ; -4. `0.7.51` : `raydium_amm_v4` ; -5. `0.7.52` : `raydium_stable_swap` — clôturé ; -6. `0.7.53` : `raydium_pool_v4` audit / program-id decision seulement si program id distinct et corpus exploitable ; -7. `0.7.54` : `pump_swap` ; -8. `0.7.55` : `pump_fun` ; -9. `0.7.56+` : Meteora, Phoenix/OpenBook, Orca puis validation progressive des autres DEX/surfaces issus du registre upstream Git. +1. `0.7.53` est clos pour `pump_swap` : ne rouvrir que pour correction de bug, pas pour ajout fonctionnel IDL déjà couvert ; +2. maintenir les checks globaux de surveillance dans `validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql` après chaque gros backfill ; +3. traiter ensuite le backlog observé, en priorité `pump_fees`, puis `pump_fun`, puis `jupiter_swap` si l’objectif devient l’analyse des routes/agrégateurs ; +4. reporter volontairement les corrections Meteora restantes (`meteora_dlmm.swap`, `meteora_damm_v2.swap`, `meteora_damm_v2.instruction_audit`) aux tranches Meteora dédiées ; +5. ne pas rouvrir `raydium_amm_v4`, `raydium_clmm` ou `raydium_cpmm` tant que les requêtes Raydium normalisées restent vides ; +6. garder `raydium_launchpad` et `raydium_stable_swap` en surveillance : les entrées non observées restent `upstream_git_mapped_unverified`, pas des régressions. Garde-fous constants : @@ -547,8 +604,12 @@ La suite fonctionnelle reprend par Raydium avant Meteora : 3. `0.7.50-pre-r2` — `raydium_launchpad` + clôture CPMM/CLMM ; 4. `0.7.51` — `raydium_amm_v4` ; 5. `0.7.52` — `raydium_stable_swap` — clôturé ; -6. `0.7.53` — `raydium_pool_v4` audit conditionnel, sans promotion automatique ; -7. `0.7.54+` — Pump, Meteora, Phoenix/OpenBook, Orca puis les autres DEX/surfaces. +6. `0.7.53` — `pump_swap` — clôturé ; +7. `0.7.54` — `pump_fees` ; +8. `0.7.55` — `pump_fun` ; +9. `0.7.56+` — Meteora, routers/agrégateurs, Phoenix/OpenBook, Orca puis les autres DEX/surfaces. + +`raydium_pool_v4.json` reste repoussé en audit conditionnel tardif, pas une tranche bloquante. ## Note 0.7.48 — Raydium CPMM event coverage diff --git a/ROADMAP.md b/ROADMAP.md index 5753250..11d6a8f 100644 --- a/ROADMAP.md +++ b/ROADMAP.md @@ -2,6 +2,30 @@ # khadhroony-bobobot — Roadmap +## État courant — clôture `0.7.53 pump_swap` + +`0.7.53` est clos pour `pump_swap`. La version ferme le décodage transaction/log de PumpSwap, la matérialisation `buy`, `sell` et `buy_exact_quote_in` depuis sources exactes, les events Anchor audit-only, les tests synthétiques IDL, et la surveillance SQL globale. Les futures interventions PumpSwap doivent être des corrections de bugs ou des adaptations à un changement externe prouvé, pas l’ajout d’entrées IDL déjà connues. + +Décisions de clôture : + +- `pump_swap.buy_exact_quote_in` est matérialisé uniquement avec `amountSource=pump_swap_anchor_buy_event`; les rows `instruction_bounds_only` restent decoded-only ; +- les events Anchor `buy_event`, `sell_event`, `deposit_event`, `withdraw_event`, `create_pool_event`, etc. restent audit-only pour éviter le double-count avec les instructions locales ; +- `claim_token_incentives_event` est testé et prêt à matérialiser `reward` si un corpus réussi apparaît ; les signatures observées côté instruction étaient failed et ne doivent pas produire de reward ; +- `sync_user_volume_accumulator_event` reste `implemented_idl_unobserved` : plus de 60/70 signatures supplémentaires ont confirmé l’instruction sans faire apparaître l’event ; +- Raydium AMM v4 / CLMM / CPMM ne présentent plus de gap ciblé après normalisation des observations ; +- les gaps Meteora sont explicitement différés. + +### Phasage immédiat après `0.7.53` + +| Priorité | Tranche | Surface | Raison | +|---:|---|---|---| +| 1 | `0.7.54` | `pump_fees` | Backlog observé dominant (`get_fees` très fréquent) ; aucun trade/candle direct attendu. | +| 2 | `0.7.55` | `pump_fun` | Launch/bonding/migration et creator fees observés en fallback upstream. | +| 3 | `0.7.56+` | `meteora_*` | Corriger les gaps locaux Meteora reportés volontairement. | +| 4 | ultérieur | `jupiter_swap` / agrégateurs | Routes et comptes auxiliaires à traiter sans double-count des DEX effectifs. | + + + ## 0.7.47-1FE5 — Décision de planification : ne plus viser “tous les events en une session” La phase `0.7.47` a montré que l’objectif “réimplémenter tous les décodeurs Carbon et toutes les sources en un seul bloc” est trop large. Le plan est donc redécoupé en **un DEX/version par tranche**, avec une matrice documentaire dédiée : `docs/DEX_DECODER_MATRIX.md`. @@ -19,37 +43,111 @@ Règles de planification : | Source | Usage | |---|---| +| `idls/` | Corpus local d’IDL Solscan téléchargés et versionnés dans le workspace ; source locale obligatoire à comparer aux liens Git avant décision de decoder. | | `https://github.com/sevenlabs-hq/carbon/tree/main/decoders` | Source principale des decoders multi-protocoles. | | `https://github.com/0xfnzero/solana-streamer` | Source complémentaire PumpFun/PumpSwap/Bonk/Raydium CPMM. | -| `https://github.com/0xfnzero/sol-parser-sdk/tree/main/idl` | IDL complémentaires. | +| `https://github.com/0xfnzero/sol-parser-sdk/tree/main/idls` | IDL complémentaires. | | `https://github.com/pinax-network/substreams-solana-idls/tree/main/src` | IDL et layouts additionnels. | | `https://github.com/hodlwarden/solana-tx-parser/tree/main/src` | Parsers transactionnels complémentaires. | | `https://github.com/openbook-dex/openbook-v2` | Source officielle OpenBook v2. | | `https://github.com/all-in-one-blockchain/phoenix-onchain-mm` | Source Phoenix/MM complémentaire. | | `https://docs.vybenetwork.com/docs/available-dexs-amms` | Source externe de découverte DEX/AMM, non vérifiante. | -### Plan révisé `0.7.48` à `0.7.63+` +### Plan révisé `0.7.53+` — une version par `program_id` -| Version cible | Scope | Objectif de clôture | -|---|---|---| -| `0.7.48` | `raydium_cpmm` | Clôturé : instructions/events CPMM, lifecycle, fees, admin/config, deposit/withdraw, `lp_change_event`, invariants trade/candle. | -| `0.7.49` | `raydium_clmm` | Clôturé : 33 instructions observées/décodées, orderbook CLMM, liquidity/fee/reward/admin/lifecycle, fallbacks upstream nettoyés, 11 Program-data events préparés mais non observés. | -| `0.7.50` | `raydium_launchpad` | Bootstrap ouvert : surface LaunchLab/Launchpad, discriminants Carbon/IDL, fallback audit, SQL de validation, aucune matérialisation métier sans corpus. | -| `0.7.51` | `raydium_amm_v4` | Clôturé : decoder maximal `00..11`, swaps spécialisés, lifecycle/liquidity/fees/admin/orderbook, `pre_initialize` audit, `simulate_info` decoded-only, cleanup legacy/fallback. | -| `0.7.52` | `raydium_stable_swap` | Clôturé : surface legacy `00..0d`, swaps via deltas vault exacts, failed tx decoded-only, invariants trade/candle propres. | -| `0.7.53` | `raydium_pool_v4` | Audit / program-id decision seulement : confirmer program id, rôle exact et corpus avant toute promotion métier. | -| `0.7.54` | `pump_swap` | Couvrir `buy/sell` et tous les events auxiliaires disponibles : fees, cashback, volume accumulator, admin/config. | -| `0.7.55` | `pump_fun` | Traiter launch/bonding/migration ; séparer création token, buy/sell bonding, migration vers DEX effectif. | -| `0.7.56` | `meteora_dbc` | Couverture DBC : bonding curve, swap, migration, launch attribution, fees/admin, non-trade. | -| `0.7.57` | `meteora_dlmm` | Audit final de parité avec sources Git/IDL ; fermer ou documenter les audits résiduels. | -| `0.7.58` | `meteora_damm_v1` | Parité upstream complète ; résoudre les cas non matérialisés faute de pool/pair quand possible. | -| `0.7.59` | `meteora_damm_v2` | Couverture DAMM v2 complète : create, swap, liquidity, fees/admin/config ; décider trade actionability. | -| `0.7.60` | `phoenix_v1` | Finir tous les events Git disponibles en audit ; préparer mais ne pas activer trade materialization. | -| `0.7.61` | `openbook_v2` | Finir layouts logs/events ; définir conditions futures de trade/candle sans les activer par défaut. | -| `0.7.62` | `orca_whirlpools` | Reprendre Whirlpools depuis IDL/source : swaps, pools, positions, liquidity, fees/rewards. | -| `0.7.63+` | Launch surfaces / DEX candidats / validation consolidée | Moonshot/Moonit, Boop, Heaven, Bags, LetsBonk, FluxBeam, DexLab, Lifinity, Stabble, BonkSwap, GooseFX, Obric, SolFi puis base neuve multi-DEX. | +Règle de planification validée après `0.7.52` : **une version cible = un `program_id`**. -Ce plan remplace les anciens regroupements larges `0.7.50+` qui mélangeaient plusieurs DEX dans une même version. +Exceptions : les comptes non-programmes (`platform_config`, token authority, comptes de configuration, comptes de pool, accounts de programme) ne créent pas de version decoder autonome. Ils restent des sources de contexte ou d’enrichissement. `SOLSCAN_ACCOUNT_SOURCES` reste un inventaire de découverte, pas une preuve de support local. + +| Version cible | Decoder / surface | Program id | Famille | Objectif de clôture | +|---|---|---|---|---| +| `0.7.53` | `pump_swap` | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | Pump / AMM | **Clos** : `buy/sell/buy_exact_quote_in` matérialisés seulement depuis sources exactes ; events Anchor audit-only ; tests synthétiques IDL ; SQL global. | +| `0.7.54` | `pump_fees` | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | Pump / fee | Couvrir fee accounting/claim/config observés ; aucun trade/candle direct. | +| `0.7.55` | `pump_fun` | `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` | Pump / launch-bonding | Couvrir create, buy/sell bonding, migration/graduate, config/update ; séparer bonding curve et DEX effectif. | +| `0.7.56` | `meteora_dbc` | `dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN` | Meteora / DBC | Compléter launch/bonding, swaps exploitables, migration, fees/admin/config. | +| `0.7.57` | `meteora_dlmm` | `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo` | Meteora / DLMM | Parité upstream finale : swaps, bins, positions, liquidity, fees/rewards/admin. | +| `0.7.58` | `meteora_damm_v1` | `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB` | Meteora / DAMM v1 | Parité upstream finale : pools, swaps, liquidity, lock, fees/admin. | +| `0.7.59` | `meteora_damm_v2` | `cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG` | Meteora / DAMM v2 | Couverture complète : create/custom pools, swaps, liquidity, dynamic config, fees/admin. | +| `0.7.60` | `meteora_vault` | `24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi` | Meteora / vault | Vault deposit/withdraw/fee/accounting ; pas de candle directe. | +| `0.7.61` | `system_program` | `11111111111111111111111111111111` | Système Solana | Create/assign/transfer account ; side effects de contexte, pas de trade. | +| `0.7.62` | `spl_token` | `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` | SPL Token | Transfer, mint, burn, close account, sync native ; base transversale pour deltas. | +| `0.7.63` | `spl_token_2022` | `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` | Token-2022 | Transfers/extensions Token-2022, mint/burn/close, comptes et side effects. | +| `0.7.64` | `associated_token_account` | `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL` | Système token | Création ATA, rattachement wallet/token/pool. | +| `0.7.65` | `compute_budget` | `ComputeBudget111111111111111111111111111111` | Contexte tx | Budget/prioritization fee ; utile scoring/MEV, pas de trade. | +| `0.7.66` | `memo` | `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` | Contexte tx | Mémo transactionnel et attribution éventuelle. | +| `0.7.67` | `address_lookup_table` | `AddressLookupTab1e1111111111111111111111111` | Contexte tx | Résolution/diagnostic ALT si nécessaire. | +| `0.7.68` | `mpl_token_metadata` | `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s` | Metadata | Enrichissement token/NFT/mint metadata. | +| `0.7.69` | `mpl_core` | `CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d` | Metadata / asset | Contexte asset si présent dans corpus. | +| `0.7.70` | `bubblegum` | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | Compressed assets | Audit/contexte assets compressés, pas DEX. | +| `0.7.71` | `raydium_routing` | `routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS` | Router | Route/legs Raydium ; éviter le double-count avec DEX effectifs. | +| `0.7.72` | `jupiter_swap_v6` | `JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4` | Aggregator | Route attribution, legs, no duplicate trade/candle. | +| `0.7.73` | `jupiter_swap_v4` | `JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB` | Legacy aggregator | Audit/route only si corpus encore utile. | +| `0.7.74` | `dflow_aggregator_v4` | `DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH` | Aggregator | Route/intent/orderflow ; pas de double matérialisation. | +| `0.7.75` | `okx_dex` | `6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma` | Aggregator/router | Route attribution ; trades seulement si source exacte non doublonnée. | +| `0.7.76` | `onchain_labs_dex_v2` | `proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u` | Router/DEX candidat | Corpus d’abord ; classifier route vs DEX effectif. | +| `0.7.77` | `titan_router` | `T1TANpTeScyeqVzzgNViGDNrkQ6qHz9KrSBS4aNXvGT` | Router | Audit route-only sauf preuve de trade direct non doublonné. | +| `0.7.78` | `sanctum_router` | `stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq` | Router | Route/liquid staking context ; pas de candle DEX directe. | +| `0.7.79` | `orca_whirlpools` | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | DEX avec IDL/source | Swaps, pools, positions, liquidity, fees/rewards. | +| `0.7.80` | `stabble_stable_swap` | `swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ` | DEX avec IDL/source | Stable swap ; deltas exacts, liquidity/admin. | +| `0.7.81` | `stabble_weighted_swap` | `swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW` | DEX avec IDL/source | Weighted swap, deltas exacts, liquidity/admin. | +| `0.7.82` | `stabble_clmm` | `6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6` | DEX avec IDL/source | CLMM Stabble si corpus utile. | +| `0.7.83` | `bonkswap` | `BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p` | DEX avec IDL/source | Swap/liquidity/non-trade. | +| `0.7.84` | `boop_fun` | `boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4` | Launch/DEX candidat | Launch/swap/migration selon corpus. | +| `0.7.85` | `byreal_clmm` | `REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2` | DEX avec IDL/source | CLMM ; corpus puis matérialisation contrôlée. | +| `0.7.86` | `fusionamm` | `fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9` | DEX avec IDL/source | AMM ; swaps/liquidity si corpus. | +| `0.7.87` | `goosefx_v1` | `GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT` | DEX avec IDL/source | DEX/AMM selon corpus. | +| `0.7.88` | `goosefx_v2` | `GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn` | DEX avec IDL/source | DEX/AMM selon corpus. | +| `0.7.89` | `guac_swap` | `Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1` | DEX avec IDL/source | Swap/liquidity si corpus. | +| `0.7.90` | `hylo_exchange` | `HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn` | DEX/source à classifier | Classer DEX/lending/stable selon IDL/corpus. | +| `0.7.91` | `printr` | `T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint` | Launch/DEX candidat | Corpus d’abord ; surface launch/swap à confirmer. | +| `0.7.92` | `moonit` | `MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG` | Launch/DEX candidat | Launch/migration/swap si prouvé. | +| `0.7.93` | `metadao_amm_v0_5` | `AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ` | DEX avec source | AMM futarchy ; corpus et price semantics. | +| `0.7.94` | `metadao_bid_wall` | `WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx` | Order/bid-wall | Order/bid-wall context ; pas de candle directe sans fill exact. | +| `0.7.95` | `metadao_launchpad` | `moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM` | Launch surface | Launch/ICO surface ; pas DEX effectif par défaut. | +| `0.7.96` | `vertigo` | `vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ` | DEX/source | Swap/launch selon corpus. | +| `0.7.97` | `virtuals` | `5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki` | Launch/DEX candidat | Launch/AMM à confirmer. | +| `0.7.98` | `wavebreak` | `waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF` | DEX/source | Corpus et rôle exact. | +| `0.7.99` | `woofi` | `WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb` | DEX/router | Swap/route selon corpus. | +| `0.7.100` | `pancake_swap` | `HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq` | DEX/source | DEX Solana à confirmer par corpus. | +| `0.7.101` | `gavel` | `srAMMzfVHVAtgSJc8iH6CfKzuWuUTzLHVCE81QU1rgi` | Source upstream | Corpus d’abord ; rôle exact à classer. | +| `0.7.102` | `heaven` | `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` | Launch/DEX candidat | Launch/DEX selon corpus. | +| `0.7.103` | `lifinity_v2` | `2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c` | DEX legacy/actif | Support selon corpus. | +| `0.7.104` | `moonshot` | `MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG` | Source upstream/Solscan | À dédupliquer avec `moonit` si même program id. | +| `0.7.105` | `openbook_v2` | `opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb` | Orderbook | Audit/orderbook complet ; trade/candle seulement si fills exacts. | +| `0.7.106` | `phoenix_v1` | `PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY` | Orderbook | Audit-only complet avant toute matérialisation fill. | +| `0.7.107` | `alphaq` | `ALPHAQmeA7bjrVuccPsYPiCvsi428SNwte66Srvs4pHA` | Solscan/no IDL | Probe par Demo3 + corpus ; décider support ou abandon. | +| `0.7.108` | `aquifer` | `AQU1FRd7papthgdrwPTTq5JacJh8YtwEXaBfKU3bTz45` | Solscan/no IDL | Probe uniquement. | +| `0.7.109` | `bisonfi` | `BiSoNHVpsVZW2F7rx2eQ59yQwKxzU5NvBcmKshCSUypi` | Solscan/no IDL | Probe uniquement. | +| `0.7.110` | `dexlab` | `DSwpgjMvXhtGn6BsbqmacdBZyfLj6jSWf3HJpdJtmg6N` | Solscan/no IDL | Vérifier support partiel / corpus. | +| `0.7.111` | `fluxbeam` | `FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X` | Solscan/no IDL | Vérifier support partiel / corpus. | +| `0.7.112` | `goonfi` | `goonERTdGsjnkZqWuVjs73BZ3Pb9qoCUdBUL17BnS5j` | Solscan/no IDL | Probe. | +| `0.7.113` | `goonfi_v2` | `goonuddtQRrWqqn5nFyczVKaie28f3kDkHWkHtURSLE` | Solscan/no IDL | Probe ; adresse à revérifier si erreur de taille. | +| `0.7.114` | `humidifi` | `9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp` | Solscan/no IDL | Probe. | +| `0.7.115` | `obric_v2` | `obriQD1zbpyLz95G5n7nJe6a4DPjpFwa5XYPoNm113y` | Solscan/no IDL | Probe. | +| `0.7.116` | `ondo_global_market` | `XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm` | Solscan IDL | Rôle marché/tokenized assets à confirmer. | +| `0.7.117` | `scorch` | `SCoRcH8c2dpjvcJD6FiPbCSQyQgu3PcUAWj2Xxx3mqn` | Solscan/no IDL | Probe. | +| `0.7.118` | `solfi` | `SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZxyCe` | Solscan/no IDL | Probe. | +| `0.7.119` | `solfi_v2` | `SV2EYYJyRz2YhfXwXnhNAevDEui5Q6yrfyo13WtupPF` | Solscan/no IDL | Probe. | +| `0.7.120` | `zerofi` | `ZERor4xhbUycZ6gb9ntrhqscUcZmAbQDjEAtCf4hbZY` | Solscan/no IDL | Probe. | +| `0.7.121` | `zora` | `zoRabwLGd5zXaV7Gxacppw8tcceXEiTrSKyNLSaSTUc` | Solscan/no IDL | Probe, pas de promotion sans corpus. | +| `0.7.122` | `1dex` | `DEXYosS6oEGvk8uCDayvwEZz4qEyDJRf9nFgYCaqPMTm` | Solscan/no IDL | Probe. | +| `0.7.123` | `aldrin_amm` | `AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6` | Legacy/no IDL | Historique/probe. | +| `0.7.124` | `aldrin_amm_v2` | `CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4` | Legacy/no IDL | Historique/probe. | +| `0.7.125` | `crema_finance` | `CLMM9tUoggJu2wagPkkqs9eFG4BWhVBZWkP1qv3Sp7tR` | Legacy/no IDL | Historique/probe. | +| `0.7.126` | `cropper_finance` | `CTMAxxk34HjKWxQ3QLZK1HpaLXmBveao3ESePXbiyfzh` | Legacy/no IDL | Historique/probe. | +| `0.7.127` | `cropper_whirlpool` | `H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt` | Legacy/no IDL | Historique/probe. | +| `0.7.128` | `mercurial_stable_swap` | `MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky` | Legacy/no IDL | Historique stable swap ; deltas exacts si support. | +| `0.7.129` | `saber_stable_swap` | `SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ` | Legacy/no IDL | Historique stable swap. | +| `0.7.130` | `saros_amm` | `SSwapUtytfBdBn1b9NUGG6foMVPtcWgpRU32HToDUZr` | Legacy/no IDL | Historique/probe. | +| `0.7.131` | `step_finance_swap` | `SSwpMgqNDsyV7mAgN9ady4bDVu5ySjmmXejXvy2vLt1` | Legacy/no IDL | Historique/probe. | +| `0.7.132` | `stepn_dooar_swap` | `Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j` | Legacy/no IDL | Historique/probe. | +| `0.7.133` | `raydium_amm_v2_legacy` | `RVKd61ztZW9GUwhRbbLoYVRE5Xf1B2tVscKqwZqXgEr` | Raydium legacy/no IDL | Historique Raydium ; corpus d’abord. | +| `0.7.134` | `raydium_amm_v3_legacy` | `27haf8L6oxUeXrHrgEgsexjSY5hbVUWEmvv9Nyxg8vQv` | Raydium legacy/no IDL | Historique Raydium ; ne pas confondre avec CLMM moderne. | +| `0.7.135` | `raydium_pool_v4_json_audit` | aucun `program_id` prouvé par le fichier seul | Audit source annexe | Vérifier `sol-parser-sdk/idls/raydium_pool_v4.json` après les surfaces documentées ; patch AMM v4 si amélioration, sinon clôture no-op. | +| `0.7.136` | cleanup `SOLSCAN_ACCOUNT_SOURCES` | n/a | Nettoyage registry/constants | Retirer doublons/promotions ; les programmes validés deviennent constantes/support matrix, les comptes non-programmes restent contexte ou sont supprimés. | +| `0.7.137` | base neuve multi-programmes | n/a | Validation consolidée | Replay consolidé, coverage global, zéro faux trade/candle, diagnostics bloquants à zéro. | + +Ce plan remplace les regroupements larges qui mélangeaient plusieurs DEX ou plusieurs `program_id` dans une seule tranche. `raydium_pool_v4.json` est explicitement repoussé vers la fin : il ne bloque plus `0.7.53`. @@ -1315,60 +1413,132 @@ Objectif : reprendre Raydium Stable comme tranche Raydium dédiée après AMM v4 Réalisé : decoder legacy 1 octet, surface locale `00..0d`, matérialisation lifecycle/liquidity/admin/fee/orderbook selon contexte, swaps `swap_base_in/out` matérialisés uniquement depuis deltas vault exacts (`stable_swap_vault_balance_delta`), transactions failed decoded-only, invariants trade/candle propres. -### 6.085. Version `0.7.53` — `raydium_pool_v4` audit / program-id decision -Objectif : auditer `raydium_pool_v4.json` comme source IDL annexe, sans promotion métier automatique. +### 6.085. Versions `0.7.53` à `0.7.137` — phasage par `program_id` +Objectif : reprendre la suite après `0.7.52 raydium_stable_swap` avec une règle stricte : **une version = un `program_id`**. -À faire : confirmer s'il correspond à un program id distinct, confirmer son rôle exact par rapport à `raydium_amm_v4`, chercher un corpus exploitable, puis décider seulement ensuite si une surface dédiée est nécessaire. +Les comptes non-programmes ne créent pas de tranche decoder autonome. `SOLSCAN_ACCOUNT_SOURCES` reste un inventaire de découverte et sera nettoyé après validation des surfaces. -### 6.086. Version `0.7.54` — `pump_swap` event coverage -Objectif : compléter `pump_swap` au-delà de `buy/sell`. +#### Bloc Pump -À faire : couvrir fees, cashback, volume accumulator, admin/config et autres events upstream disponibles, tout en maintenant l’invariant non-trade = zéro trade/candle. +| Version | Decoder / surface | Program id | Objectif | +|---:|---|---|---| +| `0.7.53` | `pump_swap` | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | Clos : `buy/sell/buy_exact_quote_in` depuis sources exactes, non-trades spécialisés, events Anchor audit-only. | +| `0.7.54` | `pump_fees` | `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` | Couvrir fee accounting/claim/config ; aucun trade/candle direct. | +| `0.7.55` | `pump_fun` | `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` | Couvrir launch/bonding/migration : create, buy/sell bonding, update/config, graduate/migrate. | -### 6.087. Version `0.7.55` — `pump_fun` launch/bonding/migration -Objectif : séparer launch/bonding de DEX effectif et valider migration vers PumpSwap ou autre surface tradable. +#### Bloc Meteora -À faire : traiter create, buy/sell bonding, update/config, mint/burn éventuels, migration/graduate et rattachement au pool tradable. +| Version | Decoder / surface | Program id | Objectif | +|---:|---|---|---| +| `0.7.56` | `meteora_dbc` | `dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN` | Compléter toutes les instructions/events DBC : launch/bonding, swap exploitable, migration, fees/admin/config. | +| `0.7.57` | `meteora_dlmm` | `LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo` | Parité upstream finale : swaps, bins, positions, liquidity, fees/rewards/admin. | +| `0.7.58` | `meteora_damm_v1` | `Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB` | Parité upstream finale : pools, swaps, liquidity, lock, fees/admin. | +| `0.7.59` | `meteora_damm_v2` | `cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG` | Couverture complète : create/custom pools, swaps, liquidity, dynamic config, fees/admin. | +| `0.7.60` | `meteora_vault` | `24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi` | Vault deposit/withdraw/fee/accounting ; pas de candle directe. | -### 6.088. Version `0.7.56` — `meteora_dbc` séparé -Objectif : reprendre Meteora après les tranches Raydium et Pump, en séparant bonding/launch, swap effectif, migration et attribution d’origine. +#### Bloc programmes système / contexte transactionnel -À faire : vérifier swaps exploitables, migration, lifecycle, mint/burn éventuels, launch attribution, fees/admin, sans candle artificielle sur events non pricés. +| Version | Decoder / surface | Program id | Objectif | +|---:|---|---|---| +| `0.7.61` | `system_program` | `11111111111111111111111111111111` | Create/assign/transfer account ; side effects de contexte, pas de trade. | +| `0.7.62` | `spl_token` | `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` | Transfer, mint, burn, close account, sync native ; base transversale pour deltas. | +| `0.7.63` | `spl_token_2022` | `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` | Transfers/extensions Token-2022, mint/burn/close, comptes et side effects. | +| `0.7.64` | `associated_token_account` | `ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL` | Création ATA, rattachement wallet/token/pool. | +| `0.7.65` | `compute_budget` | `ComputeBudget111111111111111111111111111111` | Budget/prioritization fee ; utile scoring/MEV, pas de trade. | +| `0.7.66` | `memo` | `MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr` | Mémo transactionnel et attribution éventuelle. | +| `0.7.67` | `address_lookup_table` | `AddressLookupTab1e1111111111111111111111111` | Résolution/diagnostic ALT si nécessaire. | +| `0.7.68` | `mpl_token_metadata` | `metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s` | Enrichissement token/NFT/mint metadata. | +| `0.7.69` | `mpl_core` | `CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d` | Contexte asset si présent dans corpus. | +| `0.7.70` | `bubblegum` | `BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY` | Audit/contexte assets compressés, pas DEX. | -### 6.089. Version `0.7.57` — `meteora_dlmm` parité upstream finale -Objectif : comparer la couverture locale DLMM déjà avancée avec toutes les sources Git/IDL et documenter ou fermer les audits résiduels. +#### Bloc routers / aggregators -À faire : revalider swaps, liquidity, positions, lifecycle, fees/rewards/admin, et garder les discriminants non mappés en audit documenté. +| Version | Decoder / surface | Program id | Objectif | +|---:|---|---|---| +| `0.7.71` | `raydium_routing` | `routeUGWgWzqBWFcrCfv8tritsqukccJPu3q5GPP3xS` | Route/legs Raydium ; éviter le double-count avec AMM/CLMM/CPMM/Stable. | +| `0.7.72` | `jupiter_swap_v6` | `JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4` | Route attribution, legs, no duplicate trade/candle. | +| `0.7.73` | `jupiter_swap_v4` | `JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB` | Audit/route only si corpus encore utile. | +| `0.7.74` | `dflow_aggregator_v4` | `DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH` | Route/intent/orderflow ; pas de double matérialisation. | +| `0.7.75` | `okx_dex` | `6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma` | Route attribution ; trades seulement si source exacte non doublonnée. | +| `0.7.76` | `onchain_labs_dex_v2` | `proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u` | Corpus d’abord ; classifier route vs DEX effectif. | +| `0.7.77` | `titan_router` | `T1TANpTeScyeqVzzgNViGDNrkQ6qHz9KrSBS4aNXvGT` | Audit route-only sauf preuve de trade direct non doublonné. | +| `0.7.78` | `sanctum_router` | `stkitrT1Uoy18Dk1fTrgPw8W6MVzoCfYoAFT4MLsmhq` | Route/liquid staking context ; pas de candle DEX directe. | -### 6.090. Version `0.7.58` — `meteora_damm_v1` parité upstream finale -Objectif : compléter la tranche DAMM v1 déjà engagée, résoudre les surfaces non observées et améliorer le rattachement pool/pair quand possible. +#### Bloc DEX avec IDL/code/source exploitable -À faire : vérifier toutes les instructions upstream restantes, matérialiser uniquement les events prouvés et documenter les cas sans pool/pair local. +| Version | Decoder / surface | Program id | Objectif | +|---:|---|---|---| +| `0.7.79` | `orca_whirlpools` | `whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc` | Swaps, pools, positions, liquidity, fees/rewards. | +| `0.7.80` | `stabble_stable_swap` | `swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ` | Stable swap ; deltas exacts, liquidity/admin. | +| `0.7.81` | `stabble_weighted_swap` | `swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW` | Weighted swap, deltas exacts, liquidity/admin. | +| `0.7.82` | `stabble_clmm` | `6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6` | CLMM Stabble si corpus utile. | +| `0.7.83` | `bonkswap` | `BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p` | Swap/liquidity/non-trade. | +| `0.7.84` | `boop_fun` | `boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4` | Launch/swap/migration selon corpus. | +| `0.7.85` | `byreal_clmm` | `REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2` | CLMM ; corpus puis matérialisation contrôlée. | +| `0.7.86` | `fusionamm` | `fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9` | AMM ; swaps/liquidity si corpus. | +| `0.7.87` | `goosefx_v1` | `GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT` | DEX/AMM selon corpus. | +| `0.7.88` | `goosefx_v2` | `GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn` | DEX/AMM selon corpus. | +| `0.7.89` | `guac_swap` | `Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1` | Swap/liquidity si corpus. | +| `0.7.90` | `hylo_exchange` | `HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn` | Classer DEX/lending/stable selon IDL/corpus. | +| `0.7.91` | `printr` | `T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint` | Corpus d’abord ; surface launch/swap à confirmer. | +| `0.7.92` | `moonit` | `MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG` | Launch/migration/swap si prouvé. | +| `0.7.93` | `metadao_amm_v0_5` | `AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ` | AMM futarchy ; corpus et price semantics. | +| `0.7.94` | `metadao_bid_wall` | `WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx` | Order/bid-wall context ; pas de candle directe sans fill exact. | +| `0.7.95` | `metadao_launchpad` | `moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM` | Launch/ICO surface ; pas DEX effectif par défaut. | +| `0.7.96` | `vertigo` | `vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ` | Swap/launch selon corpus. | +| `0.7.97` | `virtuals` | `5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki` | Launch/AMM à confirmer. | +| `0.7.98` | `wavebreak` | `waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF` | Corpus et rôle exact. | +| `0.7.99` | `woofi` | `WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb` | Swap/route selon corpus. | +| `0.7.100` | `pancake_swap` | `HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq` | DEX Solana à confirmer par corpus. | +| `0.7.101` | `gavel` | `srAMMzfVHVAtgSJc8iH6CfKzuWuUTzLHVCE81QU1rgi` | Corpus d’abord ; rôle exact à classer. | +| `0.7.102` | `heaven` | `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` | Launch/DEX selon corpus. | +| `0.7.103` | `lifinity_v2` | `2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c` | DEX legacy/actif à confirmer. | +| `0.7.104` | `moonshot` | `MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG` | À dédupliquer avec `moonit` si même program id. | +| `0.7.105` | `openbook_v2` | `opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb` | Audit/orderbook complet ; trade/candle seulement si fills exacts. | +| `0.7.106` | `phoenix_v1` | `PhoeNiXZ8ByJGLkxNfZRnkUfjvmuYqLR89jjFHGqdXY` | Audit-only complet avant toute matérialisation fill. | -### 6.091. Version `0.7.59` — `meteora_damm_v2` séparé -Objectif : reprendre DAMM v2 comme DEX effectif séparé après disponibilité du ledger de coverage. +#### Bloc probes / DEX sans IDL fiable / historiques -À faire : consolider create_pool, swaps exploitables, configs dynamiques, liquidity, fees/admin, lifecycle ; conserver les swaps sans payload montant/prix fiable comme `non_actionable_trade`. +| Version | Decoder / surface | Program id | Objectif | +|---:|---|---|---| +| `0.7.107` | `alphaq` | `ALPHAQmeA7bjrVuccPsYPiCvsi428SNwte66Srvs4pHA` | Demo3 + corpus ; décider support ou abandon. | +| `0.7.108` | `aquifer` | `AQU1FRd7papthgdrwPTTq5JacJh8YtwEXaBfKU3bTz45` | Probe uniquement. | +| `0.7.109` | `bisonfi` | `BiSoNHVpsVZW2F7rx2eQ59yQwKxzU5NvBcmKshCSUypi` | Probe uniquement. | +| `0.7.110` | `dexlab` | `DSwpgjMvXhtGn6BsbqmacdBZyfLj6jSWf3HJpdJtmg6N` | Vérifier support partiel / corpus. | +| `0.7.111` | `fluxbeam` | `FLUXubRmkEi2q6K3Y9kBPg9248ggaZVsoSFhtJHSrm1X` | Vérifier support partiel / corpus. | +| `0.7.112` | `goonfi` | `goonERTdGsjnkZqWuVjs73BZ3Pb9qoCUdBUL17BnS5j` | Probe. | +| `0.7.113` | `goonfi_v2` | `goonuddtQRrWqqn5nFyczVKaie28f3kDkHWkHtURSLE` | Probe ; adresse à revérifier si erreur de taille. | +| `0.7.114` | `humidifi` | `9H6tua7jkLhdm3w8BvgpTn5LZNU7g4ZynDmCiNN3q6Rp` | Probe. | +| `0.7.115` | `obric_v2` | `obriQD1zbpyLz95G5n7nJe6a4DPjpFwa5XYPoNm113y` | Probe. | +| `0.7.116` | `ondo_global_market` | `XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm` | Rôle marché/tokenized assets à confirmer. | +| `0.7.117` | `scorch` | `SCoRcH8c2dpjvcJD6FiPbCSQyQgu3PcUAWj2Xxx3mqn` | Probe. | +| `0.7.118` | `solfi` | `SoLFiHG9TfgtdUXUjWAxi3LtvYuFyDLVhBWxdMZxyCe` | Probe. | +| `0.7.119` | `solfi_v2` | `SV2EYYJyRz2YhfXwXnhNAevDEui5Q6yrfyo13WtupPF` | Probe. | +| `0.7.120` | `zerofi` | `ZERor4xhbUycZ6gb9ntrhqscUcZmAbQDjEAtCf4hbZY` | Probe. | +| `0.7.121` | `zora` | `zoRabwLGd5zXaV7Gxacppw8tcceXEiTrSKyNLSaSTUc` | Probe, pas de promotion sans corpus. | +| `0.7.122` | `1dex` | `DEXYosS6oEGvk8uCDayvwEZz4qEyDJRf9nFgYCaqPMTm` | Probe. | +| `0.7.123` | `aldrin_amm` | `AMM55ShdkoGRB5jVYPjWziwk8m5MpwyDgsMWHaMSQWH6` | Historique/probe. | +| `0.7.124` | `aldrin_amm_v2` | `CURVGoZn8zycx6FXwwevgBTB2gVvdbGTEpvMJDbgs2t4` | Historique/probe. | +| `0.7.125` | `crema_finance` | `CLMM9tUoggJu2wagPkkqs9eFG4BWhVBZWkP1qv3Sp7tR` | Historique/probe. | +| `0.7.126` | `cropper_finance` | `CTMAxxk34HjKWxQ3QLZK1HpaLXmBveao3ESePXbiyfzh` | Historique/probe. | +| `0.7.127` | `cropper_whirlpool` | `H8W3ctz92svYg6mkn1UtGfu2aQr2fnUFHM1RhScEtQDt` | Historique/probe. | +| `0.7.128` | `mercurial_stable_swap` | `MERLuDFBMmsHnsBPZw2sDQZHvXFMwp8EdjudcU2HKky` | Historique stable swap ; deltas exacts si support. | +| `0.7.129` | `saber_stable_swap` | `SSwpkEEcbUqx4vtoEByFjSkhKdCT862DNVb52nZg1UZ` | Historique stable swap. | +| `0.7.130` | `saros_amm` | `SSwapUtytfBdBn1b9NUGG6foMVPtcWgpRU32HToDUZr` | Historique/probe. | +| `0.7.131` | `step_finance_swap` | `SSwpMgqNDsyV7mAgN9ady4bDVu5ySjmmXejXvy2vLt1` | Historique/probe. | +| `0.7.132` | `stepn_dooar_swap` | `Dooar9JkhdZ7J3LHN3A7YCuoGRUggXhQaG4kijfLGU2j` | Historique/probe. | +| `0.7.133` | `raydium_amm_v2_legacy` | `RVKd61ztZW9GUwhRbbLoYVRE5Xf1B2tVscKqwZqXgEr` | Historique Raydium ; corpus d’abord. | +| `0.7.134` | `raydium_amm_v3_legacy` | `27haf8L6oxUeXrHrgEgsexjSY5hbVUWEmvv9Nyxg8vQv` | Historique Raydium ; ne pas confondre avec CLMM moderne. | +| `0.7.135` | `raydium_pool_v4_json_audit` | aucun `program_id` prouvé par le fichier seul | Vérifier `sol-parser-sdk/idls/raydium_pool_v4.json` après les surfaces documentées ; patch AMM v4 si amélioration, sinon clôture no-op. | -### 6.092. Version `0.7.60` — `phoenix_v1` audit-only complet -Objectif : finir tous les events Git disponibles en audit, sans activer de trade/candle. +#### Nettoyage / consolidation -À faire : couvrir `Fill`, `FillSummary`, `Fee`, `Evict`, `ExpiredOrder` et autres logs/events disponibles ; préparer le futur modèle orderbook sans matérialisation marché par défaut. +| Version | Scope | Objectif | +|---:|---|---| +| `0.7.136` | cleanup `SOLSCAN_ACCOUNT_SOURCES` | Retirer les doublons/promotions : les vrais programmes validés deviennent constantes + support matrix ; les comptes non-programmes restent contexte ou sont supprimés. | +| `0.7.137` | base neuve multi-programmes | Replay consolidé, coverage global, zéro faux trade/candle, diagnostics bloquants à zéro. | -### 6.093. Version `0.7.61` — `openbook_v2` audit-only complet -Objectif : finir les layouts logs/events OpenBook v2 et définir les conditions futures de matérialisation orderbook/trade. - -À faire : vérifier fills, settle, consume events, open orders create/close, maker/taker, lots/decimals et sens économique avant toute promotion. - -### 6.094. Version `0.7.62` — `orca_whirlpools` event coverage -Objectif : reprendre Whirlpools depuis IDL/source avec corpus dédié. - -À faire : swaps, pools, positions, liquidity, fees/rewards, tick arrays, mint/burn/Token-2022 si applicable. - -### 6.095. Version `0.7.63+` — Launch surfaces, DEX historiques/candidats et validation consolidée -Objectif : traiter les surfaces restantes puis rejouer une base neuve multi-DEX. - -À faire : Moonshot/Moonit, Boop, Heaven, Bags, LetsBonk, FluxBeam, DexLab, Lifinity, Stabble, BonkSwap, GooseFX, Obric, SolFi et autres entrées Vybe/registry ; rapport coverage par DEX/event, zéro faux trade/candle, corpus documentés, matrices cohérentes, diagnostics bloquants à zéro. +Garde-fous constants : pas de faux trade, pas de fausse candle, pas de `program_id` fictif, pas de promotion sans corpus transactionnel local, pas de double matérialisation router/leg, pas de logique métier DEX profonde dans `kb_demo_app`. ### 6.091. Version `0.8.x` — Analyse et filtrage Objectif : transformer les événements bruts en signaux exploitables. @@ -1561,23 +1731,16 @@ Ordre de travail recommandé pour la suite : 2. `0.7.45` : `meteora_dlmm` — clos ; 3. `0.7.46` : `meteora_damm_v1` — clos côté corpus local ; 4. `0.7.47` : Upstream Git Registry / DEX discovery preparation — acquis ; -5. `0.7.48-pre` : event coverage + DB model checkpoint — clos après table, sync upstream, refresh counts, diagnostics et profil validation ; +5. `0.7.48-pre` : event coverage + DB model checkpoint — clos ; 6. `0.7.48` : `raydium_cpmm` — clos ; 7. `0.7.49` : `raydium_clmm` — clos ; 8. `0.7.50-pre-r2` : `raydium_launchpad` clos + re-vérification CPMM/CLMM ; -9. `0.7.51` : `raydium_amm_v4` ; -10. `0.7.52` : `raydium_stable_swap` — clôturé ; -11. `0.7.53` : `raydium_pool_v4` audit conditionnel ; -12. `0.7.54` : `pump_swap` ; -13. `0.7.55` : `pump_fun` ; -14. `0.7.56` : `meteora_dbc` ; -15. `0.7.57` : `meteora_dlmm` parité upstream finale ; -16. `0.7.58` : `meteora_damm_v1` parité upstream finale ; -17. `0.7.59` : `meteora_damm_v2` ; -18. `0.7.60` : `phoenix_v1` audit-only complet ; -19. `0.7.61` : `openbook_v2` audit-only complet ; -20. `0.7.62` : `orca_whirlpools` ; -21. `0.7.63+` : launch surfaces, DEX candidats/historiques et validation consolidée. +9. `0.7.51` : `raydium_amm_v4` — clos ; +10. `0.7.52` : `raydium_stable_swap` — clos ; +11. `0.7.53` : `pump_swap` / `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` — clos ; +12. `0.7.54` : `pump_fees` / `pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ` ; +13. `0.7.55` : `pump_fun` / `6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P` ; +14. `0.7.56+` : appliquer le phasage strict “une version = un `program_id`” défini en section `6.085`. Garde-fous constants : @@ -1649,7 +1812,7 @@ La tranche CPMM reconnaît désormais tous les discriminants instruction-level l `0.7.48` est clôturable côté `raydium_cpmm`. Le decoder couvre les instructions/events CPMM listés par Carbon/fnzero/Raydium CP-Swap, avec matérialisation locale validée pour trades, liquidity, lifecycle, fees et admin/config. `swap_event` reste audit-only pour éviter les doublons avec `swap_base_input` / `swap_base_output`. Les side effects SPL Token / Token-2022 observés via Solscan (`burn`, `transfer`, `transferChecked`, `closeAccount`) restent hors decoder CPMM direct et alimenteront une réflexion transversale future. -La suite après `0.7.49 raydium_clmm` reprend en `0.7.50-pre-r2` par la clôture Launchpad et la re-vérification CPMM/CLMM, puis `0.7.51 raydium_amm_v4`, `0.7.52 raydium_stable_swap` et `0.7.53 raydium_pool_v4` uniquement comme audit conditionnel, en gardant la même discipline : sources Git/IDL + Solscan pour accélérer la découverte, mais corpus local obligatoire avant toute promotion métier. +La suite après `0.7.52 raydium_stable_swap` a été clôturée par `0.7.53 pump_swap`, puis continue avec le phasage strict “une version = un `program_id`”. `raydium_pool_v4.json` reste repoussé vers la fin comme audit conditionnel : source Git/IDL utile seulement si elle apporte une amélioration concrète à `raydium_amm_v4` ou prouve un nouveau scope par corpus local. ## Clôture `0.7.51` — Raydium AMM v4 @@ -1674,7 +1837,7 @@ Décision `raydium_pool_v4` : ne pas ouvrir de decoder autonome dans cette tranc Le rapport de décision est `docs/reports/RAYDIUM_POOL_V4_DECISION_NOTE.md`. -La tranche `0.7.52 raydium_stable_swap` est clôturée ; la suite reprend sur les surfaces restantes ou les audits conditionnels selon le corpus disponible. +La tranche `0.7.52 raydium_stable_swap` est clôturée et `0.7.53 pump_swap` est désormais clôturé également. L'audit `raydium_pool_v4.json` reste repoussé vers la fin du phasage, avant le nettoyage/consolidation, afin de ne pas bloquer les surfaces Pump/Meteora/système/routers/DEX documentés. ### Addendum final — `0.7.52 raydium_stable_swap` @@ -1723,3 +1886,11 @@ SQL de validation : `validation_sql/SQL_VALIDATION_RAYDIUM_STABLE_SWAP_0_7_52.sq Rapport : `docs/reports/RAYDIUM_STABLE_SWAP_EVENT_COVERAGE_REPORT.md`. +### Addendum — `0.7.53 pump_swap` + +La reprise après `0.7.52 raydium_stable_swap` cible uniquement le program id `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA`. Le decoder local `pump_swap` couvre désormais les discriminants d’instructions upstream connus : trades matérialisables (`buy`, `sell`), swap decoded-only provisoire (`buy_exact_quote_in` tant que les montants exacts ne sont pas prouvés), liquidity (`deposit`, `withdraw`), pool/config (`create_pool`, `create_config`, `update_fee_config`), creator/protocol fee paths, cashback/token incentives et volume accumulator. Les events Program-data associés sont conservés comme entrées de coverage explicites ; ils ne doivent pas créer de doublon trade si l’instruction locale matérialise déjà le swap effectif. + +Delta post-replay : `toggle_cashback_enabled` est admin-only, `migrate_pool_coin_creator` est admin/config et l’index `k_sol_instruction_observations` nomme les discriminants PumpSwap observés. Les trois discriminants d’abord inconnus (`01214eb921432c5c`, `fbe0ab92a01a71e9`, `cfbdb247a77a44b4`) sont maintenant nommés : `transfer_creator_fees_to_pump_v2` et `update_buyback_config` sont confirmés par le raw Solscan IDL ; `set_reserved_fee_recipient` reste une entrée observée dans les logs locaux, probablement une instruction ancienne/supprimée ou non exposée dans ce raw. + +Critères de fermeture : corpus Demo3/backfill/replay dédié, coverage `pump_swap` synchronisée, zéro fallback `upstream_git.instruction_match` pour les instructions couvertes localement, failed tx sans trade/candle, non-swap sans trade/candle, et SQL `validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql` vide sur les requêtes d’anomalies. + diff --git a/docs/DEX_DECODER_MATRIX.md b/docs/DEX_DECODER_MATRIX.md index 83f3ea1..faf4057 100644 --- a/docs/DEX_DECODER_MATRIX.md +++ b/docs/DEX_DECODER_MATRIX.md @@ -1,4 +1,10 @@ -# DEX Decoder Matrix — `khadhroony-bobobot` `0.7.50-pre-r2` +# DEX Decoder Matrix — `khadhroony-bobobot` `0.7.53 final` + +## Note `0.7.53 final` — PumpSwap clôturé et sources IDL locales + +Le répertoire `idls/` devient une source locale de savoir en plus des liens Git. Les IDL Solscan locales doivent être comparées au registre upstream et au corpus avant promotion métier. `pump_swap` est clôturé côté transaction/log decoder : instructions IDL, events Anchor audit-only, `buy_exact_quote_in` via `BuyEvent` exact, tests synthétiques et SQL global. Raydium AMM v4 / CLMM / CPMM ne nécessitent pas de correction dans cette clôture ; les gaps Meteora sont reportés. + +`sol-parser-sdk/idls/raydium_pool_v4.json` a été vérifié comme source annexe distincte des fichiers `idls/raydium_*.json` présents localement : il expose notamment `swapBaseIn` et des comptes OpenBook/Serum, mais aucun fichier local ne porte ce nom ni ne correspond à son empreinte/format. Il reste donc un audit conditionnel, pas une source bloquante pour `0.7.53`. Cette matrice complète `kb_lib/src/dex_support_matrix.rs`. Elle documente **ce qui est fait**, **ce qui reste à faire**, et **le niveau de preuve attendu** par DEX/version. @@ -17,7 +23,7 @@ Cette matrice complète `kb_lib/src/dex_support_matrix.rs`. Elle documente **ce - Carbon decoders : `https://github.com/sevenlabs-hq/carbon/tree/main/decoders` - Solana Streamer : `https://github.com/0xfnzero/solana-streamer` -- Sol Parser SDK IDLs : `https://github.com/0xfnzero/sol-parser-sdk/tree/main/idl` +- Sol Parser SDK IDLs : `https://github.com/0xfnzero/sol-parser-sdk/tree/main/idls` - Pinax Substreams Solana IDLs : `https://github.com/pinax-network/substreams-solana-idls/tree/main/src` - HODL Warden Solana Tx Parser : `https://github.com/hodlwarden/solana-tx-parser/tree/main/src` - OpenBook v2 : `https://github.com/openbook-dex/openbook-v2` @@ -33,8 +39,8 @@ Cette matrice complète `kb_lib/src/dex_support_matrix.rs`. Elle documente **ce | 3 | `raydium_launchpad` | `bootstrap / 0.7.50` | Surface canonique normalisée, 1 entrée programme + 26 discriminants Carbon/IDL listés, fallback audit/mapped decoder, SQL dédié. | Créer DB neuve, backfill par discriminant, replay forcé, promouvoir seulement après corpus local. | | 4 | `raydium_amm_v4` | `supported / 0.7.51 closed` | Decoder maximal AMM v4 `00..11`, swaps spécialisés, lifecycle/liquidity/fees/admin/orderbook validés. | Stable Swap clôturé ensuite en `0.7.52`; surveiller les surfaces restantes. | | 5 | `raydium_stable_swap` | `supported / 0.7.52 closed` | Decoder legacy 1 octet, surface `00..0d`, swaps matérialisés depuis deltas vault exacts. | Surveiller seulement de nouveaux discriminants ou `swap_event` observé. | -| 6 | `raydium_pool_v4` | `to_verify / 0.7.53 conditional audit` | IDL annexe mentionnée par fnzero, non présente dans l'archive locale, pas de program id/rôle confirmé ici. | Ne pas promouvoir tant que program id distinct, rôle exact et corpus exploitable ne sont pas confirmés. | -| 7 | `pump_swap` | `supported / 0.7.54 planned` | `buy`/`sell` décodés et matérialisés ; trade/candle OK. | Ajouter tous les events Carbon/Solana Streamer : cashback, fee, volume accumulator, admin/config ; conserver les non-trades hors candles. | +| 6 | `raydium_pool_v4` | `to_verify / late-phase conditional audit` | IDL annexe mentionnée par fnzero, non présente dans l'archive locale, pas de program id/rôle confirmé ici. | Ne pas promouvoir tant que program id distinct, rôle exact et corpus exploitable ne sont pas confirmés. | +| 7 | `pump_swap` | `supported / 0.7.53 closed` | `buy`, `sell` + `buy_exact_quote_in` matérialisable via `BuyEvent` exact ; instructions non-trade spécialisées : liquidity, fee/creator fee, admin/config, cashback/token incentives, volume accumulator ; events Anchor autonomes audit-only. | Trades/candles uniquement depuis montants exacts ; failed tx decoded-only ; `instruction_bounds_only` reste decoded-only ; tests synthétiques IDL et SQL global ajoutés. | | 8 | `pump_fun` | `partial / 0.7.55 launch_surface` | Création/token launch partiellement décodée ; intégrée au pipeline de listings. | Traiter tous les events Pump.fun disponibles : buy/sell/migrate/create/update ; séparer bonding/launch de DEX effectif ; valider migration vers PumpSwap. | | 9 | `meteora_dbc` | `partial / 0.7.56 planned` | Swaps/instruction audits observés ; Demo3 donne du corpus. | Couverture complète DBC : launch/bonding curve, swap, migration, config/admin, fees ; matérialiser seulement ce qui est prouvé. | | 10 | `meteora_dlmm` | `supported / 0.7.57 parity` | Couverture avancée validée en `0.7.45` : swaps, liquidity, positions, lifecycle, fees ; non-trade matérialisé. | Résoudre les audits résiduels non mappés ; comparer Carbon/IDL pour events rewards/admin restants ; revalidation base neuve. | @@ -273,3 +279,9 @@ La tranche a été validée sur base SQLite dédiée : tous les discriminants `0 |---|---|---|---|---| | `raydium_stable_swap` | `5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h` | supported / closed | legacy 1 octet | Surface locale `00..0d` couverte ; swaps `swap_base_in/out` matérialisés uniquement depuis deltas vault exacts ; instruction bounds et failed tx restent decoded-only. | +## 0.7.53 — PumpSwap + +| Decoder | Program id | Statut | Source discriminants | Couverture locale | Règles métier | +|---|---|---:|---|---|---| +| `pump_swap` | `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` | supported / 0.7.53 closed | upstream registry + `idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json` + corpus Demo3/replay | instructions : `buy`, `sell`, `buy_exact_quote_in`, `deposit`, `withdraw`, `create_pool`, `create_config`, `update_fee_config`, creator-fee, cashback, token incentives, volume accumulator, admin/config ; events Anchor autonomes audit-only | `buy_exact_quote_in` trade uniquement avec `pump_swap_anchor_buy_event`; aucun non-swap en trade/candle ; failed tx decoded-only ; `buy_event`/`sell_event` Program-data audit-only ; `transfer_creator_fees_to_pump_v2` et `update_buyback_config` confirmés par Solscan IDL ; `set_reserved_fee_recipient` conservé sur preuve log locale | + diff --git a/docs/DEX_EVENT_COVERAGE_MATRIX.md b/docs/DEX_EVENT_COVERAGE_MATRIX.md index 454d751..8cf1688 100644 --- a/docs/DEX_EVENT_COVERAGE_MATRIX.md +++ b/docs/DEX_EVENT_COVERAGE_MATRIX.md @@ -1,4 +1,4 @@ -# DEX Event Coverage Matrix — `khadhroony-bobobot` `0.7.50-pre-r2` +# DEX Event Coverage Matrix — `khadhroony-bobobot` `0.7.53 final` Cette matrice complète `docs/DEX_DECODER_MATRIX.md` avec une lecture par familles d'événements. Elle ne remplace pas la preuve locale : une entrée Git/IDL reste un indice tant qu'elle n'est pas observée dans le corpus local puis validée par replay et SQL. @@ -214,3 +214,38 @@ Status: **closed on local corpus**. Stable Swap swaps are not materialized from instruction min/max bounds. `swap_base_in/out` require `amountSource=stable_swap_vault_balance_delta`; `stable_swap_instruction_bounds_only` remains decoded-only and, in the final corpus, appears only on failed transactions. +## 0.7.53 — `pump_swap` + +Program id unique : `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA`. + +| Entry | Discriminator | Family | Expected DB target | Local event kind | Status | +|---|---:|---|---|---|---| +| `buy` | `66063d1201daebea` | `swap` | `k_sol_trade_events` | `pump_swap.buy` | local specialized decoder ; materialize only from exact transfer/vault deltas | +| `sell` | `33e685a4017f83ad` | `swap` | `k_sol_trade_events` | `pump_swap.sell` | local specialized decoder ; materialize only from exact transfer/vault deltas | +| `buy_exact_quote_in` | `c62e1552b4d9e870` | `swap` | `k_sol_trade_events` only when exact Anchor `BuyEvent` is present ; otherwise decoded-only | `pump_swap.buy_exact_quote_in` | local specialized decoder ; `amountSource=pump_swap_anchor_buy_event` materializes trades ; `instruction_bounds_only` rows keep explicit `skipTradeReason` | +| `create_pool` | `e992d18ecf6840bc` | `pool_create` | `k_sol_pool_lifecycle_events` or decoded-only | `pump_swap.create_pool` | local specialized instruction ; non-trade | +| `deposit` | `f223c68952e1f2b6` | `liquidity_add` | `k_sol_liquidity_events` or decoded-only | `pump_swap.deposit` | local specialized instruction ; non-trade | +| `withdraw` | `b712469c946da122` | `liquidity_remove` | `k_sol_liquidity_events` or decoded-only | `pump_swap.withdraw` | local specialized instruction ; non-trade | +| `collect_coin_creator_fee` | `a039592ab58b2b42` | `fee` | `k_sol_fee_events` or decoded-only | `pump_swap.collect_coin_creator_fee` | local specialized instruction ; non-trade | +| `transfer_creator_fees_to_pump` | `8b348655e4e56cf1` | `fee` | `k_sol_fee_events` or decoded-only | `pump_swap.transfer_creator_fees_to_pump` | local specialized instruction ; non-trade | +| `transfer_creator_fees_to_pump_v2` | `01214eb921432c5c` | `fee` | `k_sol_fee_events` or decoded-only | `pump_swap.transfer_creator_fees_to_pump_v2` | Solscan IDL proof + local log proof: `transfer_creator_fees_to_pump_v2` / `Instruction: TransferCreatorFeesToPumpV2` ; non-trade | +| `claim_cashback` | `253a237ebe35e4c5` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.claim_cashback` | local specialized instruction ; non-trade | +| `claim_token_incentives` | `1004471ccc01281b` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.claim_token_incentives` | local specialized instruction ; non-trade | +| `init_user_volume_accumulator` | `5e06ca73ff60e8b7` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.init_user_volume_accumulator` | local specialized instruction ; non-trade | +| `sync_user_volume_accumulator` | `561fc057a3574fee` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.sync_user_volume_accumulator` | local specialized instruction ; non-trade | +| `close_user_volume_accumulator` | `f945a4da9667548a` | `reward` | `k_sol_reward_events` or decoded-only | `pump_swap.close_user_volume_accumulator` | local specialized instruction ; non-trade | +| `update_buyback_config` | `fbe0ab92a01a71e9` | `admin_config` | `k_sol_pool_admin_events` or decoded-only | `pump_swap.update_buyback_config` | Solscan IDL proof + local log proof: `update_buyback_config` / `Instruction: UpdateBuybackConfig` ; non-trade | +| `set_reserved_fee_recipient` | `cfbdb247a77a44b4` | `admin_config` | `k_sol_pool_admin_events` or decoded-only | `pump_swap.set_reserved_fee_recipient` | local log proof only: `Instruction: SetReservedFeeRecipient` ; absent from checked Solscan IDL raw ; non-trade | +| admin/config group | see report | `admin_config` | `k_sol_pool_admin_events` or decoded-only | `pump_swap.*` | local specialized instruction ; non-trade ; includes `toggle_cashback_enabled` and `migrate_pool_coin_creator` as admin-only | +| `buy_event` / `sell_event` | `67f4521f2cf57777` / `3e2f370aa503dc2a` | `swap_event_audit` | decoded-only | not local-instruction mapped | Program-data event discriminators listed; not used to duplicate local instruction trades | +| auxiliary Program-data events | see report | fee/reward/admin/liquidity | decoded-only until payload-specific materializer exists | not local-instruction mapped | explicit upstream status required after replay | + + + +### Fermeture `0.7.53` + +- `pump_swap` ne présente plus de decoded event local sans coverage dans le corpus de clôture. +- `buy_exact_quote_in` est matérialisé seulement quand le `BuyEvent` Anchor donne les montants exacts ; les bornes d’instruction seules restent non actionnables. +- Les events Anchor `*_event` sont décodés en audit-only pour éviter les doublons, sauf exception matérialisable explicitement testée. +- Les gaps globaux restants sont classés comme backlog upstream (`pump_fees`, `pump_fun`, `jupiter_swap`, agrégateurs), gaps Meteora reportés, ou observations non attribuées. +- Les checks Raydium AMM v4 / CLMM / CPMM normalisés sont vides ; aucune correction Raydium n’est incluse dans cette clôture. diff --git a/docs/prompts/PROMPT_0_7_53_PUMP_SWAP.md b/docs/prompts/PROMPT_0_7_53_PUMP_SWAP.md new file mode 100644 index 0000000..40fa589 --- /dev/null +++ b/docs/prompts/PROMPT_0_7_53_PUMP_SWAP.md @@ -0,0 +1,150 @@ + + +# Prompt de reprise — `0.7.53 pump_swap` + +Nous reprenons le workspace Rust/Tauri `khadhroony-bobobot` après le commit final `0.7.52 raydium_stable_swap`. + +## Objectif de tranche + +Version cible : `0.7.53` + +Surface cible unique : `pump_swap` + +Program id cible unique : + +```text +pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA +``` + +Règle de phasage validée : **une version = un `program_id`**. + +`raydium_pool_v4.json` est explicitement repoussé vers la fin du phasage. Il ne doit pas bloquer `0.7.53`. + +## Contexte validé avant reprise + +Raydium est clos sur les surfaces suivantes : + +- `raydium_cpmm` — `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` ; +- `raydium_clmm` — `CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK` ; +- `raydium_launchpad` — `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj` ; +- `raydium_amm_v4` — `675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8` ; +- `raydium_stable_swap` — `5quBtoiQqxF9Jv6KYKctB59NT3gtJD2Y65kdnB1Uev3h`. + +`0.7.52 raydium_stable_swap` est clos avec : + +- `cargo test -p kb_lib` : `407 passed`, `0 failed` ; +- `cargo clippy -p kb_lib --all-targets -- -D warnings` : OK ; +- swaps matérialisés uniquement depuis `amountSource=stable_swap_vault_balance_delta` ; +- failed transactions conservées decoded-only ; +- aucun successful swap non expliqué. + +## Sources à utiliser pour `pump_swap` + +Sources obligatoires à vérifier avant de patcher : + +- `kb_lib/src/constants.rs` et `SOLSCAN_ACCOUNT_SOURCES` ; +- sources upstream Git déjà intégrées dans le registre : Carbon, fnzero, Pinax, HODL Warden si disponibles ; +- IDL Solscan du programme `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA` si disponible ; +- corpus local Demo3 + backfill signature/pool ; +- `k_sol_dex_event_coverage_entries` après replay. + +Les sources Git/IDL/Solscan sont des indices. La preuve métier exige corpus local, replay et SQL. + +## Tâches attendues + +1. Inspecter le support local existant de `pump_swap`. +2. Lister toutes les instructions/events/discriminators disponibles depuis les sources upstream/IDL. +3. Comparer avec les events localement couverts. +4. Compléter le decoder `pump_swap` pour couvrir au minimum : + - `buy` ; + - `sell` ; + - fees / creator fees / protocol fees si présents ; + - admin/config si présents ; + - events auxiliaires tels que cashback, volume accumulator ou équivalents si présents dans les sources. +5. Matérialiser en `k_sol_trade_events` et `k_sol_pair_candles` uniquement si les montants exacts et le sens économique sont prouvés. +6. Conserver les failed transactions comme decoded-only avec `failed_transaction`. +7. Matérialiser les non-trade uniquement vers les tables adaptées : liquidity, fee, admin, lifecycle, reward, orderbook ou decoded-only selon le cas. +8. Nettoyer les fallbacks `upstream_git.instruction_match` uniquement quand un decoder local spécialisé couvre vraiment l’entrée. +9. Mettre à jour la coverage DB et la matrice documentaire. +10. Ajouter ou mettre à jour le SQL de validation dédié : `validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql`. + +## Invariants obligatoires + +- Aucun non-swap ne doit créer de trade/candle. +- Aucune transaction failed ne doit créer de trade/candle. +- Aucun trade/candle ne doit être créé depuis des bornes d’instruction ou des montants incomplets. +- Aucun router/aggregator ne doit créer un doublon si le DEX effectif matérialise déjà le trade. +- Aucun `program_id` ne doit être inventé. +- Aucun compte non-programme de `SOLSCAN_ACCOUNT_SOURCES` ne doit être promu en decoder autonome. +- `kb_demo_app` ne doit pas contenir de logique métier DEX profonde. + +## Contraintes de code + +Respecter les contraintes du projet : + +- Rust 2024 ; +- aucun fichier `mod.rs` ; +- pas de `pub mod` ; utiliser `mod` + `pub use` ; +- pas de `anyhow`, pas de `thiserror` ; +- pas de `?`, `unwrap`, `expect` dans le code applicatif `kb_lib` ; +- gestion d’erreurs explicite via `match`, `if let Err`, `let Err = ... else` ; +- rustdoc publique ; +- `#![deny(unreachable_pub)]` et `#![warn(missing_docs)]` ; +- tracing obligatoire ; +- tests offline ; +- si une requête DB est ajoutée ou modifiée, mettre à jour les re-exports dans `kb_lib/src/db.rs`, puis dans `kb_lib/src/lib.rs`. + +## Validation attendue + +Commandes locales à exécuter après patch : + +```bash +cargo fmt +cargo test -p kb_lib +cargo clippy -p kb_lib --all-targets -- -D warnings +``` + +Replay attendu sur une base dédiée `0.7.53 pump_swap` : + +```text +skipDexDecode=no +forceDexDecode=yes +deferInstructionObservations=yes +``` + +SQL de clôture attendu : + +- coverage par entrée `pump_swap` ; +- instruction observations ; +- absence d’audit résiduel local non expliqué ; +- absence de fallback upstream pour les entrées couvertes localement ; +- failed tx -> zéro trade ; +- non-swap -> zéro trade ; +- decoded without coverage -> vide ; +- successful non-materialized inexpliqués -> vide ; +- multi-target materialization -> vide ; +- résumé matérialisation par event_kind. + +## Livrables documentaires + +Mettre à jour au minimum : + +- `ROADMAP.md` ; +- `CHANGELOG.md` ; +- `docs/DEX_DECODER_MATRIX.md` ; +- `docs/DEX_EVENT_COVERAGE_MATRIX.md` ; +- `docs/reports/PUMP_SWAP_EVENT_COVERAGE_REPORT.md` ; +- `validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql`. + +## Décision attendue en fin de tranche + +`0.7.53 pump_swap` est clôturable uniquement si : + +```text +- tous les events/instructions disponibles ont un statut explicite ; +- les swaps réussis exploitables produisent trades/candles ; +- les failed transactions restent decoded-only ; +- les non-trade sont matérialisés dans les bonnes tables ou restent decoded-only expliqués ; +- la coverage DB ne contient pas de gap local inexpliqué ; +- cargo test et clippy sont OK. +``` diff --git a/docs/prompts/PROMPT_0_7_54_PUMP_FUN.md b/docs/prompts/PROMPT_0_7_54_PUMP_FUN.md new file mode 100644 index 0000000..8810bba --- /dev/null +++ b/docs/prompts/PROMPT_0_7_54_PUMP_FUN.md @@ -0,0 +1,272 @@ + + +# Prompt de reprise — khadhroony-bobobot 0.7.54 — pump_fun + +Tu reprends le workspace Rust/Tauri `khadhroony-bobobot` après clôture documentaire et fonctionnelle de `0.7.53 pump_swap`. + +## 1. Fichiers à utiliser comme base + +Je fournis l’archive la plus récente du workspace, intégrant normalement les deltas de clôture `0.7.53`. + +À considérer comme sources locales de savoir : + +- le code Rust du workspace ; +- les fichiers Markdown (`README.md`, `ROADMAP.md`, `CHANGELOG.md`, `docs/**`) ; +- les SQL de validation dans `validation_sql/**` ; +- le répertoire `idls/**`, ajouté au projet, contenant des IDL JSON téléchargés depuis Solscan ; +- les liens Git/upstream déjà documentés dans les docs ; +- les résultats SQL/logs que je colle dans la conversation. + +Ne pas supposer que les docs sont parfaites : les vérifier contre le code et contre les IDL locales. + +## 2. État validé avant cette version + +La version `0.7.53` a fermé `pump_swap` côté transaction/log decoder : + +- `cargo test -p kb_lib` : `421 passed`; +- `cargo clippy -p kb_lib --all-targets -- -D warnings` : OK ; +- `pump_swap.buy`, `pump_swap.sell`, `pump_swap.buy_exact_quote_in` matérialisent correctement les trades ; +- `buy_exact_quote_in` utilise `pump_swap_anchor_buy_event` quand l’Anchor `BuyEvent` exact est disponible ; +- les `*_event` Anchor PumpSwap sont décodés en audit-only sauf exception métier explicite ; +- `claim_token_incentives_event` est prêt à matérialiser `k_sol_reward_events` si un event réussi apparaît ; +- `pump_swap` ne présente plus de decoded event sans coverage, ni fallback upstream résiduel, ni trade candidate réussi non matérialisé ; +- les surfaces Raydium déjà travaillées (`raydium_amm_v4`, `raydium_clmm`, `raydium_cpmm`) ne doivent pas être rouvertes sauf bug prouvé ; +- les petits gaps Meteora sont volontairement différés. + +Ne pas modifier PumpSwap ou Raydium sauf preuve SQL/code claire d’une régression. + +## 3. Objectif de la version 0.7.54 + +Objectif principal : ouvrir et avancer une tranche `pump_fun`. + +Cette tranche doit traiter la surface launch/mint Pump.fun, qui est logiquement prioritaire avant `pump_fees`. + +Le backlog global montre des entrées `pump_fun` encore en fallback upstream, notamment : + +- `pump_fun.collect_creator_fee` / discriminator `1416567bc61cdb84` ; +- `pump_fun.migrate_bonding_curve_creator` / `577c34bf3426d6e8` ; +- `pump_fun.distribute_creator_fees` / `a572670079cef751` ; +- `pump_fun.admin_set_creator` / `4519ab8e39ef0d04` ; +- `pump_fun.extend_account` / `ea66c2cb96483ee5` ; +- `pump_fun.set_creator` / `fe94ff70cf8eaaa5` ; +- `pump_fun.migrate` / `9beae792ec9ea21e` ; +- `pump_fun.claim_cashback` / `253a237ebe35e4c5` ; +- `pump_fun.sell` / `33e685a4017f83ad` ; +- autres discriminators `pump_fun` observés dans `k_sol_instruction_observations`. + +L’objectif n’est pas seulement de faire disparaître un fallback : il faut couvrir proprement la surface `pump_fun` : + +- registry/coverage ; +- decoder local ou statut local explicitement decoded-only/audit-only ; +- matérialisation métier si les données sont fiables ; +- tests unitaires ; +- SQL de validation ; +- documentation. + +## 4. Périmètre + +### Inclus + +- `pump_fun` launch/mint/bonding-curve surface ; +- instructions/events liés à création/migration/configuration/creator fees/cashback si présents dans IDL ou corpus ; +- intégration coverage ; +- matérialisation vers tables métier seulement si fiable. + +### Hors périmètre sauf nécessité démontrée + +- `pump_swap`, déjà fermé en `0.7.53` ; +- `raydium_*`, sauf régression prouvée ; +- `meteora_*`, volontairement différé ; +- `jupiter_swap`, `dflow_aggregator_v4`, `onchain_labs_dex_v2`, `orca_whirlpools`, backlog futur ; +- `pump_fees`, qui doit venir après `pump_fun`, probablement en `0.7.55`. + +## 5. Méthode obligatoire + +### 5.1 Nouvelle base SQLite + +Créer une nouvelle DB dédiée à `0.7.54`, ne pas travailler sur l’ancienne DB de validation PumpSwap. + +Démarrage attendu : + +- catalog initial propre ou connu ; +- backfills ciblés ; +- replay forcé ; +- validation SQL. + +### 5.2 Backfill de corpus + +Construire un corpus local à partir de : + +1. filtres Solscan.io quand disponibles ; +2. Demo3 discovery quand nécessaire ; +3. batch backfill de groupes de signatures ; +4. program/signature backfill si pertinent ; +5. signatures issues des requêtes SQL `sample_signature`. + +Utiliser d’abord les signatures fortes observées dans le backlog : + +- `pump_fun.collect_creator_fee`; +- `pump_fun.migrate_bonding_curve_creator`; +- `pump_fun.distribute_creator_fees`; +- `pump_fun.admin_set_creator`; +- `pump_fun.extend_account`; +- `pump_fun.set_creator`; +- `pump_fun.migrate`; +- `pump_fun.claim_cashback`; +- puis autres discriminators observés. + +Après chaque groupe de backfill : + +- replay local avec `skipDexDecode=no`; +- utiliser `forceDexDecode=yes` quand le decoder/coverage change ; +- `deferInstructionObservations=yes` ; +- rafraîchir catalog ; +- relancer les SQL de surveillance. + +### 5.3 Sources + +Utiliser en priorité : + +- `idls/**` local ; +- code existant ; +- docs existantes ; +- `upstream_registry_generated.rs` ; +- sources Git déjà référencées dans les docs ; +- Solscan signatures/logs ; +- payloads locaux DB. + +Si une IDL locale contredit une source Git, signaler la divergence et ne pas inventer. + +## 6. Contraintes de code Rust + +Respecter strictement les conventions du projet : + +- Rust 2024 ; +- pas de `?` ; +- pas de `unwrap()` / `expect()` en code applicatif ; +- pas de `anyhow` / `thiserror` ; +- `match` / `if let Err` explicites ; +- async-first ; +- `tracing` obligatoire ; +- pas de `mod.rs` ; +- pas de `pub mod` ; utiliser `mod` + `pub use` ; +- imports limités, types appelés de façon qualifiée quand c’est la convention locale ; +- tests offline ; +- ne pas casser `#![deny(unreachable_pub)]` et `#![warn(missing_docs)]`. + +Si des requêtes DB sont ajoutées ou déplacées, penser aux re-exports : + +- `kb_lib/src/db.rs` ; +- `kb_lib/src/lib.rs`. + +## 7. Matérialisation attendue + +Pour `pump_fun`, ne pas forcer une matérialisation si les montants/acteurs/comptes ne sont pas prouvés. + +Classer explicitement chaque entrée : + +- `k_sol_launch_events` pour les événements de launch/mint/migration ; +- `k_sol_fee_events` si l’instruction représente réellement des frais exploitables ; +- `k_sol_pool_admin_events` si c’est de la configuration/admin/creator ; +- `k_sol_reward_events` uniquement si c’est réellement une récompense/incitation/cashback fiable ; +- `k_sol_dex_decoded_events_only` si audit-only ou données insuffisantes ; +- `k_sol_trade_events` seulement si c’est un swap/trade fiable ; +- `skip*Reason` explicite quand non matérialisable. + +Ne jamais matérialiser une transaction failed comme business event. + +## 8. SQL de validation à utiliser + +Utiliser et adapter : + +- `validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql`; +- les SQL de validation PumpSwap comme modèle ; +- une nouvelle validation dédiée à `pump_fun`, par exemple : + - `validation_sql/SQL_VALIDATION_PUMP_FUN_0_7_54.sql`. + +Requêtes minimales attendues : + +1. coverage `pump_fun` ; +2. instruction observations `pump_fun` ; +3. decoded events `pump_fun` sans coverage ; +4. fallback upstream `pump_fun` résiduel ; +5. successful non-materialized events sans skip reason ; +6. failed tx materialization safety ; +7. multi-target materialization safety ; +8. materialization summary ; +9. comparaison entre `k_sol_instruction_observations` et `k_sol_dex_event_coverage_entries` ; +10. global watchlist après replay. + +## 9. Invariants de validation + +Après correction, viser : + +- pas de `pump_fun` decoded event local sans coverage ; +- pas de fallback `upstream_git` résiduel pour les entrées `pump_fun` couvertes localement ; +- pas de materialized business event sur failed transaction ; +- pas de multi-target incohérent ; +- tous les events/instructions observés ont : + - un decoder local, + - ou un statut audit-only, + - ou un skip reason explicite, + - ou une justification documentée s’ils restent upstream-only. + +## 10. Documentation à mettre à jour + +À la fin de la tranche, mettre à jour : + +- `CHANGELOG.md` : une ligne ; +- `README.md` : état courant, nouvelle version, validation ; +- `ROADMAP.md` : phasage et clôture/état de `pump_fun`, puis annonce de `pump_fees` en version suivante ; +- `docs/DEX_DECODER_MATRIX.md` ; +- `docs/DEX_EVENT_COVERAGE_MATRIX.md` ; +- éventuellement un rapport : + - `docs/reports/PUMP_FUN_EVENT_COVERAGE_REPORT.md`. + +Ne pas gonfler les docs inutilement : noter les faits validés, les limites, et les prochaines tranches. + +## 11. Format de livraison attendu + +Ne pas fournir une archive complète du workspace sauf demande explicite. + +Fournir un delta zip contenant uniquement les fichiers modifiés/ajoutés. + +Nom recommandé : + +`khadhroony-bobobot-v0.7.54-pump_fun-delta-N-files.zip` + +Chaque réponse de livraison doit inclure : + +- résumé des changements ; +- liste exacte des fichiers modifiés ; +- commandes à lancer : + - `cargo fmt` + - `cargo test -p kb_lib` + - `cargo clippy -p kb_lib --all-targets -- -D warnings` +- replay recommandé ; +- SQL à exécuter ; +- ce qui est attendu dans les résultats. + +## 12. Priorités si plusieurs gaps apparaissent + +Ordre de priorité : + +1. `pump_fun` ; +2. `pump_fees` seulement si strictement nécessaire pour comprendre un flux `pump_fun` ; +3. ne pas traiter Meteora dans cette version ; +4. ne pas rouvrir Raydium sauf régression démontrée ; +5. ne pas ouvrir Jupiter/dFlow/onchain_labs dans cette tranche sauf pour les classer en backlog. + +## 13. Première tâche demandée + +Commencer par analyser l’archive fournie : + +1. identifier les fichiers existants liés à `pump_fun`, `pump_fees`, upstream registry, coverage, materialization ; +2. chercher dans `idls/**` s’il existe une IDL Solscan liée à `pump_fun` ; +3. produire un état des lieux court : + - entrées upstream disponibles ; + - entrées observées dans SQL/logs fournis ; + - fichiers à modifier ; + - hypothèse de classification par entry ; + - SQL initial de backfill/validation ; +4. proposer puis produire le premier delta minimal. diff --git a/docs/reports/DEX_COVERAGE_GLOBAL_WATCHLIST_0_7_53.md b/docs/reports/DEX_COVERAGE_GLOBAL_WATCHLIST_0_7_53.md new file mode 100644 index 0000000..60e9a99 --- /dev/null +++ b/docs/reports/DEX_COVERAGE_GLOBAL_WATCHLIST_0_7_53.md @@ -0,0 +1,128 @@ +# DEX coverage global watchlist — `0.7.53` + +## Objet + +Ce rapport accompagne la clôture `0.7.53 pump_swap`. Il sépare les anomalies bloquantes des files de travail futures. + +`pump_swap` est clos côté transaction/log decoder et matérialisation métier. Les lignes restantes de surveillance globale ne sont pas des erreurs PumpSwap. + +## Résultat de clôture PumpSwap + +Validation rapportée : + +```text +cargo test -p kb_lib -> 421 passed / 0 failed +cargo clippy -p kb_lib --all-targets -- -D warnings -> OK +``` + +Replay élargi rapporté : + +```text +1189 replayed +0 decode skipped +1189 ledger upserts +967 unsafe ledger rows +928 trades +13 liquidity +8 lifecycle +0 tokenAccount +3700 candle upserts +instructionObservations = 25724 +resetDeleted = 5622 +catalog = 76 tokens / 80 pools / 80 pairs +``` + +Checks PumpSwap attendus vides : + +- decoded events sans coverage ; +- fallback `upstream_git` couvert localement ; +- successful trade candidates sans trade et sans raison explicite ; +- failed transaction matérialisée en business trade ; +- non-swap matérialisé en trade ; +- multi-target materialization. + +`buy_exact_quote_in` : + +```text +pump_swap_anchor_buy_event -> 168 decoded / 167 trades / 1 failed tx +instruction_bounds_only -> decoded-only, sans trade +``` + +## Non-régression Raydium + +Les checks ciblés Raydium AMM v4 / CLMM / CPMM normalisés sont vides. Il n'y a pas de correction Raydium à inclure dans `0.7.53`. + +Lecture correcte : + +- `raydium_amm_v4.swap_base_in_v2` : observé et matérialisé dans le corpus courant ; +- `raydium_clmm.swap_v2` : observé et matérialisé dans le corpus courant ; +- `raydium_cpmm.swap_base_input` : observé et matérialisé dans le corpus courant ; +- les entrées `upstream_git_mapped_unverified` avec `observed_count=0` sont des entrées registry non observées, pas des régressions. + +## Gaps locaux reportés + +La requête globale `local decoded events without coverage` retourne des gaps Meteora connus et reportés : + +```text +meteora_dlmm.swap +meteora_damm_v2.instruction_audit +meteora_damm_v2.swap +``` + +Décision : ne pas les corriger dans `0.7.53`. Ils seront repris dans les tranches Meteora futures. + +## Backlog upstream observé + +La file `upstream_git.instruction_match` indique les prochaines surfaces à prioriser. Au moment de la clôture : + +| Priorité | Surface | Indice principal | Décision | +|---:|---|---|---| +| 1 | `pump_fees` | `get_fees` très fréquent | Prochaine tranche recommandée ; aucun trade/candle direct attendu. | +| 2 | `pump_fun` | creator fees, migrate, set/admin creator | Tranche launch/bonding séparée. | +| 3 | `jupiter_swap` | `route_v2`, `create_token_account`, `route` | Agrégateur/router ; éviter double-count DEX effectifs. | +| 4 | `dflow_aggregator_v4`, `onchain_labs_dex_v2` | swaps/route helpers | Surfaces secondaires après Pump/Meteora. | +| 5 | `orca_whirlpools` | faibles occurrences | À reprendre plus tard avec corpus dédié. | + +## Observations non attribuées + +Les observations avec `decoder_code` vide ne doivent pas être traitées comme des discriminants Anchor confirmés. Elles exigent d'abord : + +1. inspection de `sample_signature` ; +2. extraction du `program_id` effectif ; +3. comparaison aux IDL locales `idls/` et aux sources Git ; +4. ajout d'un decoder ou d'un statut explicite seulement si le programme est identifié. + +## Source IDL locale + +Le répertoire `idls/` est désormais une source locale de savoir. Les IDL téléchargées depuis Solscan doivent être utilisées en plus des liens Git, avec la règle suivante : une IDL donne une surface possible, mais la matérialisation métier exige corpus, replay et SQL. + +## Vérification `raydium_pool_v4.json` + +Fichier Git vérifié : `0xfnzero/sol-parser-sdk/idls/raydium_pool_v4.json`. + +Constats : + +- la page GitHub annonce `3400` lignes / environ `101 KB` ; +- le fichier expose notamment `swapBaseIn`, `addLiquidity` et des comptes OpenBook/Serum (`OpenBookMarket`, `OpenBookBids`, `OpenBookAsks`, etc.) ; +- la chaîne du program id AMM v4 `675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8` n'apparaît pas dans la page GitHub consultée ; +- aucun fichier local `idls/raydium_*.json` ne porte le nom `raydium_pool_v4` ; +- les fichiers Raydium locaux présents sont `raydium_clmm`, `raydium_cpmm`, `raydium_launchlab` et `raydium_lock`. + +Table locale : + +| Fichier local | Name IDL | Address IDL | Taille | SHA-256 | +|---|---|---|---:|---| +| `idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json` | `raydium_clmm` | `CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK` | 86240 | `d3f265adc9e4d7b1a28641444800a60bcdeb921ef136855fe8dea4532afa18bd` | +| `idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json` | `raydium_cp_swap` | `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` | 32066 | `5b709dfe7b0df67c9e29655307ae877244d3bb8022056ee01c754f0e36264d9c` | +| `idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json` | `raydium_launchpad` | `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj` | 68052 | `c1465a10f38912413f55f04a68536c989992add1b3d48cba86dca97212a482da` | +| `idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json` | `raydium_liquidity_locking` | absent | 10621 | `da45fd5eaf726e5e2ead7280c04588ebd4224d203304cdc8217b012b8130e1f1` | + +Décision : `raydium_pool_v4.json` ne correspond à aucun fichier JSON local actuel. Il reste une source annexe d'audit AMM v4/strategy/wrapper à traiter plus tard, sans bloquer `0.7.53`. + +## SQL associé + +Voir : + +```text +validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql +``` diff --git a/docs/reports/PUMP_SWAP_EVENT_COVERAGE_REPORT.md b/docs/reports/PUMP_SWAP_EVENT_COVERAGE_REPORT.md new file mode 100644 index 0000000..92a9a27 --- /dev/null +++ b/docs/reports/PUMP_SWAP_EVENT_COVERAGE_REPORT.md @@ -0,0 +1,166 @@ +# PumpSwap event coverage report — `0.7.53` + +## Scope + +- Version cible : `0.7.53`. +- Surface unique : `pump_swap`. +- Program id unique : `pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA`. +- Phasage : une version = un `program_id`. +- `raydium_pool_v4.json` reste repoussé vers la fin du phasage et ne bloque pas cette tranche. + +## Sources vérifiées / à vérifier pendant la fermeture + +- `kb_lib/src/constants.rs`, notamment `PUMP_SWAP_PROGRAM_ID` et `SOLSCAN_ACCOUNT_SOURCES`. +- Registre upstream local généré : `kb_lib/src/upstream_registry_generated.rs`. +- Sources Git/IDL externes disponibles : Pump public docs / IDL, Carbon, fnzero, Pinax, HODL Warden si présents dans le registre. +- IDL locale : `idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json`, téléchargée depuis Solscan et versionnée dans le workspace. +- Solscan IDL du program id PumpSwap si disponible. +- Corpus local Demo3 + backfills signature/pool. +- `k_sol_dex_event_coverage_entries` après replay forcé. + +Les sources Git/IDL/Solscan sont des indices. La fermeture métier exige corpus local, replay et SQL. + +## Couverture locale ajoutée + +Le decoder local `kb_lib/src/dex/pump_swap.rs` ne se limite plus à `buy`/`sell`. Il reconnaît maintenant les discriminants d’instruction suivants et produit un event spécialisé `pump_swap.`. + +| Entry | Kind | Discriminator | Target attendu | Matérialisation | +|---|---|---:|---|---| +| `admin_set_coin_creator` | instruction | `f228759149606968` | admin/config | decoded specialized non-trade | +| `admin_update_token_incentives` | instruction | `d10b7357d5177ccc` | reward/admin | decoded specialized non-trade | +| `buy` | instruction | `66063d1201daebea` | trade | trade/candle seulement depuis montants exacts | +| `buy_exact_quote_in` | instruction | `c62e1552b4d9e870` | trade conditionnel | matérialisé seulement si un `BuyEvent` Anchor exact est présent (`amountSource=pump_swap_anchor_buy_event`) ; sinon decoded-only `instruction_bounds_only` avec `skipTradeReason` | +| `claim_cashback` | instruction | `253a237ebe35e4c5` | reward | decoded specialized non-trade | +| `claim_token_incentives` | instruction | `1004471ccc01281b` | reward | decoded specialized non-trade | +| `close_user_volume_accumulator` | instruction | `f945a4da9667548a` | reward | decoded specialized non-trade | +| `collect_coin_creator_fee` | instruction | `a039592ab58b2b42` | fee | decoded specialized non-trade | +| `create_config` | instruction | `c9cff3724b6f2fbd` | admin/config | decoded specialized non-trade | +| `create_pool` | instruction | `e992d18ecf6840bc` | pool lifecycle | decoded specialized non-trade | +| `deposit` | instruction | `f223c68952e1f2b6` | liquidity add | decoded specialized non-trade | +| `disable` | instruction | `b9adbb5ad80feee9` | admin/config | decoded specialized non-trade | +| `extend_account` | instruction | `ea66c2cb96483ee5` | admin/config | decoded specialized non-trade | +| `init_user_volume_accumulator` | instruction | `5e06ca73ff60e8b7` | reward | decoded specialized non-trade | +| `migrate_pool_coin_creator` | instruction | `d0089f044aaf103a` | admin/migration | decoded specialized non-trade | +| `sell` | instruction | `33e685a4017f83ad` | trade | trade/candle seulement depuis montants exacts | +| `set_coin_creator` | instruction | `d295802dbc3a4eaf` | admin/config | decoded specialized non-trade | +| `set_reserved_fee_recipients` | instruction | `6faca2e87259d58e` | admin/config | decoded specialized non-trade | +| `set_reserved_fee_recipient` | instruction | `cfbdb247a77a44b4` | admin/config | local log proof only: `Instruction: SetReservedFeeRecipient` ; absent from checked Solscan IDL raw ; decoded specialized non-trade | +| `sync_user_volume_accumulator` | instruction | `561fc057a3574fee` | reward | decoded specialized non-trade | +| `toggle_cashback_enabled` | instruction | `7367e0ffbd5956c3` | admin/config | decoded specialized non-trade | +| `toggle_mayhem_mode` | instruction | `01096fd0641fffa3` | admin/config | decoded specialized non-trade | +| `transfer_creator_fees_to_pump` | instruction | `8b348655e4e56cf1` | fee | decoded specialized non-trade | +| `transfer_creator_fees_to_pump_v2` | instruction | `01214eb921432c5c` | fee | Solscan IDL proof + local log proof: `transfer_creator_fees_to_pump_v2` / `Instruction: TransferCreatorFeesToPumpV2` ; decoded specialized non-trade | +| `update_admin` | instruction | `a1b028d53cb8b3e4` | admin/config | decoded specialized non-trade | +| `update_buyback_config` | instruction | `fbe0ab92a01a71e9` | admin/config | Solscan IDL proof + local log proof: `update_buyback_config` / `Instruction: UpdateBuybackConfig` ; decoded specialized non-trade | +| `update_fee_config` | instruction | `68b867f258976b14` | admin/config | decoded specialized non-trade | +| `withdraw` | instruction | `b712469c946da122` | liquidity remove | decoded specialized non-trade | + +## Upstream Program-data events à statut explicite + +Ces events sont listés dans le registre upstream. Ils doivent apparaître avec un statut explicite dans la coverage DB après sync/replay. Ils ne doivent pas créer de doublons trade/candle tant que l’instruction locale spécialisée couvre déjà le DEX effectif. + +| Event | Discriminator | Statut `0.7.53` | +|---|---:|---| +| `admin_set_coin_creator_event` | `2ddc5d181961ac68` | upstream listed ; decoded-only/status explicite après replay | +| `admin_update_token_incentives_event` | `93fa6c78f71d43de` | upstream listed ; decoded-only/status explicite après replay | +| `buy_event` | `67f4521f2cf57777` | upstream listed ; audit/decoded-only to avoid duplicate trade | +| `claim_cashback_event` | `e2d6f62107f293e5` | upstream listed ; decoded-only/status explicite après replay | +| `claim_token_incentives_event` | `4facf631cd5bcee8` | upstream listed ; decoded-only/status explicite après replay | +| `close_user_volume_accumulator_event` | `929fbdac925838f4` | upstream listed ; decoded-only/status explicite après replay | +| `collect_coin_creator_fee_event` | `e8f5c2eeeada3a59` | upstream listed ; decoded-only/status explicite après replay | +| `create_config_event` | `6b34598137e25116` | upstream listed ; decoded-only/status explicite après replay | +| `create_pool_event` | `b1310cd2a076a774` | upstream listed ; decoded-only/status explicite après replay | +| `deposit_event` | `78f83d531f8e6b90` | upstream listed ; decoded-only/status explicite après replay | +| `disable_event` | `6bfdc14ce4ca1b68` | upstream listed ; decoded-only/status explicite après replay | +| `extend_account_event` | `6161d7905d92167c` | upstream listed ; decoded-only/status explicite après replay | +| `init_user_volume_accumulator_event` | `86240d48e86582d8` | upstream listed ; decoded-only/status explicite après replay | +| `migrate_pool_coin_creator_event` | `aadd52c793a5f72e` | upstream listed ; decoded-only/status explicite après replay | +| `reserved_fee_recipients_event` | `2bbcfa12dd4bbb5f` | upstream listed ; decoded-only/status explicite après replay | +| `sell_event` | `3e2f370aa503dc2a` | upstream listed ; audit/decoded-only to avoid duplicate trade | +| `set_bonding_curve_coin_creator_event` | `f2e7eb664163bdd3` | upstream listed ; decoded-only/status explicite après replay | +| `set_metaplex_coin_creator_event` | `966bc77b7ccf66e4` | upstream listed ; decoded-only/status explicite après replay | +| `sync_user_volume_accumulator_event` | `c57aa77c74515bff` | upstream listed ; decoded-only/status explicite après replay | +| `update_admin_event` | `e198ab57f63f42ea` | upstream listed ; decoded-only/status explicite après replay | +| `update_fee_config_event` | `5a1741233ef4bcd0` | upstream listed ; decoded-only/status explicite après replay | +| `withdraw_event` | `1609851aa02c47c0` | upstream listed ; decoded-only/status explicite après replay | + +## Matérialisation + +- `pump_swap.buy`, `pump_swap.sell` et `pump_swap.buy_exact_quote_in` peuvent alimenter `k_sol_trade_events`, mais seulement depuis des montants exacts. +- `pump_swap.buy_exact_quote_in` est matérialisé quand le log Anchor `BuyEvent` fournit `baseAmountOutRaw` et `userQuoteAmountInRaw` pour `ixName=buy_exact_quote_in`. Les rows `instruction_bounds_only` restent decoded-only avec `skipTradeReason` explicite. +- Les bornes d’instruction (`maxQuoteAmountIn`, `spendableQuoteAmountIn`, `minQuoteAmountOut`, `minBaseAmountOut`) ne sont pas considérées comme des montants exacts suffisants pour créer un trade/candle. +- La matérialisation doit passer par les résolutions exactes existantes : token transfer deltas, vault/account balance deltas ou autre source d’amount explicitement prouvée. +- Les transactions failed restent decoded-only via l’actionability `failed_transaction`. +- Les non-trades restent hors `k_sol_trade_events` et hors `k_sol_pair_candles`. + +## SQL de fermeture + +Le fichier dédié est : + +```text +validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql +``` + +Les requêtes d’anomalies attendues vides couvrent : + +- fallback upstream résiduel sur instruction couverte localement ; +- failed tx avec trade ; +- non-swap avec trade ; +- decoded without coverage ; +- successful non-materialized inexpliqué ; +- multi-target materialization ; +- successful swap exploitable sans trade et sans raison explicite. + +## Delta post-replay `0.7.53-pump_swap-delta-1` + +Le replay local a révélé trois écarts corrigés par ce delta : + +- `pump_swap.toggle_cashback_enabled` était classé à la fois `reward` et `admin`; il devient admin-only pour respecter l’invariant single-target. +- `pump_swap.buy_exact_quote_in` réussi non matérialisé reçoit maintenant un `skipTradeReason` explicite et reste decoded-only tant que les montants exacts ne sont pas prouvés. +- `k_sol_instruction_observations.instruction_name` reçoit un mapping PumpSwap par discriminant pour que la requête de coverage locale ne sorte plus des noms vides. Le discriminant `e445a52e51cb9a1d` reste marqué comme transport technique Anchor self-CPI. Les trois discriminants initialement inconnus ne doivent plus sortir en `observed_unknown_*` : deux sont confirmés par le raw Solscan IDL et un reste conservé comme local-log-only. + +`pump_swap.migrate_pool_coin_creator` est également forcé en admin/config, pas lifecycle, car il modifie l’attribution coin creator et ne représente pas une migration de pool échangeable. + +## Delta post-replay `0.7.53-pump_swap-delta-2` + +- Les trois discriminants initialement inconnus (`01214eb921432c5c`, `fbe0ab92a01a71e9`, `cfbdb247a77a44b4`) ont été provisoirement couverts decoded-only pour supprimer les gaps locaux sans inventer de métier. +- `toggle_cashback_enabled` est corrigé aussi dans la famille coverage (`admin_config`) afin de refléter la matérialisation admin-only. + +## Delta post-replay `0.7.53-pump_swap-delta-4` + +- Le corpus local donne maintenant le nom métier via logs Anchor : `TransferCreatorFeesToPumpV2`, `UpdateBuybackConfig`, `SetReservedFeeRecipient`. +- Ces trois discriminants deviennent des instructions locales spécialisées : `pump_swap.transfer_creator_fees_to_pump_v2`, `pump_swap.update_buyback_config`, `pump_swap.set_reserved_fee_recipient`. +- Recomparaison raw Solscan IDL : `transfer_creator_fees_to_pump_v2` et `update_buyback_config` sont présents dans l’IDL. `set_reserved_fee_recipient` n’est pas listé dans ce raw ; il est gardé sur preuve log locale, possiblement instruction historique/supprimée ou non exposée par cette version IDL. +- `transfer_creator_fees_to_pump_v2` est fee/non-trade ; `update_buyback_config` et `set_reserved_fee_recipient` sont admin/config non-trade. + + + +## Clôture finale `0.7.53` + +La tranche est clôturée après les deltas de consolidation : + +- `buy_exact_quote_in` route désormais vers la matérialisation pool/pair/trade quand `amountSource=pump_swap_anchor_buy_event`; +- les montants du `BuyEvent` sont normalisés par rapport à l’ordre local de la paire pour éviter les inversions base/quote ; +- les events Anchor PumpSwap sont décodés comme events autonomes audit-only ; +- `claim_token_incentives_event` possède un test synthétique de matérialisabilité reward si un corpus réussi apparaît ; +- `sync_user_volume_accumulator_event` reste implémenté mais non observé malgré un backfill élargi sur l’instruction ; +- les tests synthétiques couvrent les instructions/events IDL non observés localement ; +- `cargo test -p kb_lib` a été validé à `421 passed / 0 failed` et clippy est OK côté utilisateur. + +Résultats de validation rapportés après corpus élargi : + +```text +pump_swap decoded without coverage = vide +pump_swap upstream fallback couvert localement = vide +successful trade candidates sans trade = vide +failed tx avec business trade = vide +non-swap matérialisé en trade = vide +multi-target materialization = vide +buy_exact_quote_in / pump_swap_anchor_buy_event = 168 decoded / 167 trades / 1 failed tx +``` + +Les fichiers de surveillance à conserver sont : + +- `validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql` ; +- `validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql` ; +- `docs/reports/DEX_COVERAGE_GLOBAL_WATCHLIST_0_7_53.md`. diff --git a/idls/bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json b/idls/bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json new file mode 100644 index 0000000..80b7b11 --- /dev/null +++ b/idls/bonkswap.BSwp6bEBihVLdqJRKGgzjcGLHkcTuzmSo1TQkHepzH8p.json @@ -0,0 +1 @@ +{"version":"0.1.1","name":"bonkswap","instructions":[{"name":"createPool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":true},{"name":"poolYAccount","isMut":true,"isSigner":true},{"name":"adminXAccount","isMut":true,"isSigner":false},{"name":"adminYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"projectOwner","isMut":false,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"initialTokenX","type":{"defined":"Token"}},{"name":"initialTokenY","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createProvider","accounts":[{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"tokenXAmount","type":{"defined":"Token"}},{"name":"tokenYAmount","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createState","accounts":[{"name":"state","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"addTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":true,"isSigner":false},{"name":"tokenProjectFirst","isMut":true,"isSigner":false},{"name":"tokenProjectSecond","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"deltaX","type":{"defined":"Token"}},{"name":"deltaY","type":{"defined":"Token"}}]},{"name":"withdrawBuyback","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"swap","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"swapperXAccount","isMut":true,"isSigner":false},{"name":"swapperYAccount","isMut":true,"isSigner":false},{"name":"swapper","isMut":true,"isSigner":true},{"name":"referrerXAccount","isMut":true,"isSigner":false},{"name":"referrerYAccount","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"deltaIn","type":{"defined":"Token"}},{"name":"priceLimit","type":{"defined":"FixedPoint"}},{"name":"xToY","type":"bool"}]},{"name":"withdrawShares","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":true,"isSigner":false},{"name":"tokenProjectFirst","isMut":true,"isSigner":false},{"name":"tokenProjectSecond","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"shares","type":{"defined":"Token"}}]},{"name":"withdrawLpFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawProjectFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"projectOwnerXAccount","isMut":true,"isSigner":false},{"name":"projectOwnerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"projectOwner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"createFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"supply","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createDualFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createTripleFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenProjectSecond","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"withdrawRewards","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":true,"isSigner":false},{"name":"tokenProjectFirst","isMut":true,"isSigner":false},{"name":"tokenProjectSecond","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"closePool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawMercantiFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"mercantiXAccount","isMut":true,"isSigner":false},{"name":"mercantiYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"addSupply","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"}]},{"name":"updateFees","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false}],"args":[{"name":"newBuybackFee","type":{"defined":"FixedPoint"}},{"name":"newProjectFee","type":{"defined":"FixedPoint"}},{"name":"newProviderFee","type":{"defined":"FixedPoint"}},{"name":"newMercantiFee","type":{"defined":"FixedPoint"}}]},{"name":"resetFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"updateRewardTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"bonkswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"newTokenMarcoAccount","isMut":true,"isSigner":true},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Farm","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"tokens","type":{"array":["publicKey",3]}},{"name":"tokenAccounts","type":{"array":["publicKey",3]}},{"name":"supply","type":{"array":[{"defined":"Token"},3]}},{"name":"supplyLeft","type":{"array":[{"defined":"Token"},3]}},{"name":"accumulatedSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"offsetSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"startTime","type":"u64"},{"name":"endTime","type":"u64"},{"name":"lastUpdate","type":"u64"},{"name":"bump","type":"u8"},{"name":"farmType","type":{"defined":"FarmType"}}]}},{"name":"PoolV2","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"poolXAccount","type":"publicKey"},{"name":"poolYAccount","type":"publicKey"},{"name":"admin","type":"publicKey"},{"name":"projectOwner","type":"publicKey"},{"name":"tokenXReserve","type":{"defined":"Token"}},{"name":"tokenYReserve","type":{"defined":"Token"}},{"name":"selfShares","type":{"defined":"Token"}},{"name":"allShares","type":{"defined":"Token"}},{"name":"buybackAmountX","type":{"defined":"Token"}},{"name":"buybackAmountY","type":{"defined":"Token"}},{"name":"projectAmountX","type":{"defined":"Token"}},{"name":"projectAmountY","type":{"defined":"Token"}},{"name":"mercantiAmountX","type":{"defined":"Token"}},{"name":"mercantiAmountY","type":{"defined":"Token"}},{"name":"lpAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lpAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"constK","type":{"defined":"Product"}},{"name":"price","type":{"defined":"FixedPoint"}},{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"farmCount","type":"u64"},{"name":"poolBump","type":"u8"},{"name":"lpToken","type":"publicKey"},{"name":"lpTokenMintBump","type":"u8"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"poolXAccount","type":"publicKey"},{"name":"poolYAccount","type":"publicKey"},{"name":"admin","type":"publicKey"},{"name":"projectOwner","type":"publicKey"},{"name":"tokenXReserve","type":{"defined":"Token"}},{"name":"tokenYReserve","type":{"defined":"Token"}},{"name":"selfShares","type":{"defined":"Token"}},{"name":"allShares","type":{"defined":"Token"}},{"name":"buybackAmountX","type":{"defined":"Token"}},{"name":"buybackAmountY","type":{"defined":"Token"}},{"name":"projectAmountX","type":{"defined":"Token"}},{"name":"projectAmountY","type":{"defined":"Token"}},{"name":"mercantiAmountX","type":{"defined":"Token"}},{"name":"mercantiAmountY","type":{"defined":"Token"}},{"name":"lpAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lpAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"constK","type":{"defined":"Product"}},{"name":"price","type":{"defined":"FixedPoint"}},{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"farmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"Provider","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"shares","type":{"defined":"Token"}},{"name":"lastFeeAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lastFeeAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"lastSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"lastWithdrawTime","type":"u64"},{"name":"tokensOwedX","type":{"defined":"Token"}},{"name":"tokensOwedY","type":{"defined":"Token"}},{"name":"currentFarmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"programAuthority","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"nonce","type":"u8"}]}}],"types":[{"name":"FixedPoint","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"Token","type":{"kind":"struct","fields":[{"name":"v","type":"u64"}]}},{"name":"Product","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"FarmType","type":{"kind":"enum","variants":[{"name":"Single"},{"name":"Dual"},{"name":"Triple"}]}}],"errors":[{"code":6000,"name":"DeltaTooBig","msg":"Delta greater than provider's tokens"},{"code":6001,"name":"TokenUnderflow","msg":"Token amount underflow"},{"code":6002,"name":"WrongRatio","msg":"Wrong tokens ratio"},{"code":6003,"name":"TooMuchShares","msg":"Too much shares provided"},{"code":6004,"name":"SwapToBig","msg":"Swap too big"},{"code":6005,"name":"FeeExceeded","msg":"Fee exceeded 100%"},{"code":6007,"name":"ScalesNotEqual","msg":"Scales have to be equal"},{"code":6008,"name":"FeeExceededDeltaOut","msg":"Fees exceeded delta_out"},{"code":6009,"name":"PriceLimitExceeded","msg":"Price limit exceeded"},{"code":6010,"name":"MintMismatch","msg":"Mint mismatch"},{"code":6011,"name":"TokensAreTheSame","msg":"Tokens are the same"},{"code":6012,"name":"WrongFarm","msg":"Cannot add supply to wrong farm"},{"code":6013,"name":"RewardsExceedingSupply","msg":"Cannot withdraw rewards exceeding supply left"},{"code":6014,"name":"FarmNotEnded","msg":"Farm has not ended, cannot add additional rewards"},{"code":6015,"name":"ZeroAmount","msg":"Must provide a nonzero amount"},{"code":6016,"name":"InvariantDecreased","msg":"Invariant has changed"}]} \ No newline at end of file diff --git a/idls/boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json b/idls/boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json new file mode 100644 index 0000000..e130eea --- /dev/null +++ b/idls/boop_fun.boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4.json @@ -0,0 +1 @@ +{"address":"boop8hVGQGqehUK2iVEMEnMrL5RbjywRzHKBmBE7ry4","metadata":{"name":"boop","version":"0.3.0","spec":"0.1.0","description":"Boop is a token launcher with fee sharing"},"instructions":[{"name":"add_operators","discriminator":[165,199,62,214,81,54,4,150],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"signer":true,"relations":["config"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"operators","type":{"vec":"pubkey"}}]},{"name":"buy_token","discriminator":[138,127,14,91,38,87,115,105],"accounts":[{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"recipient_token_account"},{"name":"buyer","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"buy_amount","type":"u64"},{"name":"amount_out_min","type":"u64"}]},{"name":"cancel_authority_transfer","discriminator":[94,131,125,184,183,24,125,229],"accounts":[{"name":"authority","signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"close_bonding_curve_vault","discriminator":[189,71,189,239,113,66,59,189],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"operator","writable":true,"signer":true},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"mint"},{"name":"recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["System program for creating associated token if needed"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"collect_meteora_trading_fees","discriminator":[249,95,126,91,81,162,83,250],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pool_authority"},{"name":"pool"},{"name":"position","writable":true},{"name":"token_a_account","docs":["The token account to receive token a"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_a_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_b_account","docs":["The token account to receive token b"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"token_a_mint"},{"name":"token_b_mint"},{"name":"position_nft_account","writable":true},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"event_authority"},{"name":"cp_amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"}],"args":[]},{"name":"collect_meteora_trading_fees_v2","discriminator":[96,39,109,46,5,161,15,57],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pool_authority"},{"name":"pool"},{"name":"position","writable":true},{"name":"token_a_account","docs":["The token account to receive token a"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_a_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_b_account","docs":["The token account to receive token b"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,116,95,103,114,97,100,95,116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"token_a_mint"},{"name":"token_b_mint"},{"name":"position_nft_account","writable":true},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"event_authority"},{"name":"cp_amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_trading_fees","discriminator":[189,38,205,234,81,77,25,1],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"fee_nft_account","docs":["Fee token account"]},{"name":"locked_liquidity","docs":["Store the locked the information of liquidity"],"writable":true},{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"cp_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true},{"name":"lp_mint","docs":["lp mint","address = pool_state.lp_mint"],"writable":true},{"name":"recipient_token_0_account","docs":["The token account for receive token_0"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"vault_0_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient_token_1_account","docs":["The token account for receive token_1"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_0_vault.mint"}]}},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"locked_lp_vault","docs":["locked lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"system_program","docs":["System program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[]},{"name":"collect_trading_fees_v2","discriminator":[180,138,160,155,243,88,168,7],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"protocol_fee_recipient","relations":["config"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"fee_nft_account","docs":["Fee token account"]},{"name":"locked_liquidity","docs":["Store the locked the information of liquidity"],"writable":true},{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"cp_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true},{"name":"lp_mint","docs":["lp mint","address = pool_state.lp_mint"],"writable":true},{"name":"recipient_token_0_account","docs":["The token account for receive token_0"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"vault_0_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient_token_1_account","docs":["The token account for receive token_1"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,116,95,103,114,97,100,95,116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"token_0_vault.mint"}]}},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"locked_lp_vault","docs":["locked lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"system_program","docs":["System program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[]},{"name":"complete_authority_transfer","discriminator":[81,233,91,132,175,31,151,141],"accounts":[{"name":"pending_authority","signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_meteora_pool","discriminator":[246,254,33,37,225,176,41,232],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"cp_amm_config"},{"name":"pool_authority"},{"name":"pool","writable":true},{"name":"position","writable":true},{"name":"position_nft_mint","writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"token_a_mint"},{"name":"token_b_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_a_mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"event_authority"},{"name":"cp_amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"}],"args":[]},{"name":"create_raydium_pool","discriminator":[65,45,119,77,204,178,84,2],"accounts":[{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_0_mint"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_0_mint","writable":true},{"name":"token_1_mint","docs":["Token_1 mint, the key must be greater than token_0 mint."],"address":"So11111111111111111111111111111111111111112"},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"creator_lp_token","writable":true},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"create_raydium_random_pool","discriminator":[78,44,173,29,132,180,4,172],"accounts":[{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"signer":true},{"name":"token_0_mint","writable":true},{"name":"token_1_mint","docs":["Token_1 mint, the key must be greater than token_0 mint."],"address":"So11111111111111111111111111111111111111112"},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"creator_lp_token","writable":true},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"create_token","discriminator":[84,52,204,228,24,140,234,75],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]}}},{"name":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"account","path":"payer"},{"kind":"arg","path":"salt"}]}},{"name":"payer","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"salt","type":"u64"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"create_token_fallback","discriminator":[253,184,126,199,235,232,172,162],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]}}},{"name":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"arg","path":"salt"}]}},{"name":"payer","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"salt","type":"u64"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"deploy_bonding_curve","discriminator":[180,89,199,76,168,236,217,138],"accounts":[{"name":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"account","path":"payer"},{"kind":"arg","path":"salt"}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"creator","type":"pubkey"},{"name":"salt","type":"u64"}]},{"name":"deploy_bonding_curve_fallback","discriminator":[53,230,172,84,77,174,22,61],"accounts":[{"name":"mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,105,110,116]},{"kind":"arg","path":"salt"}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"creator","type":"pubkey"},{"name":"salt","type":"u64"}]},{"name":"deposit_into_raydium","discriminator":[168,89,99,30,117,49,88,224],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"operator","writable":true,"signer":true},{"name":"operator_wsol_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"operator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_0_mint"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","docs":["System program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Program to create an ATA for the operator to recoup any potential remaining WSOL"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool_state"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"cpmm_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"owner_lp_token","writable":true},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_0_mint","writable":true},{"name":"token_1_mint","docs":["token_1 mint, the key must greater than token_0 mint"],"address":"So11111111111111111111111111111111111111112"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"maximum_token_0_amount","type":"u64"},{"name":"maximum_token_1_amount","type":"u64"}]},{"name":"graduate","discriminator":[45,235,225,181,17,218,64,130],"accounts":[{"name":"mint"},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"protocol_fee_recipient","writable":true},{"name":"token_distributor"},{"name":"token_distributor_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_distributor"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_wsol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"initialize","discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"token_distributor","type":"pubkey"}]},{"name":"initiate_authority_transfer","discriminator":[210,43,101,215,119,140,106,218],"accounts":[{"name":"authority","signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_authority","type":"pubkey"}]},{"name":"lock_raydium_liquidity","discriminator":[173,255,148,6,122,99,140,22],"accounts":[{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"fee_nft_owner"},{"name":"fee_nft_mint","writable":true,"signer":true},{"name":"fee_nft_account","writable":true},{"name":"pool_state","writable":true},{"name":"locked_liquidity","docs":["Store the locked information of liquidity"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,107,101,100,95,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"fee_nft_mint"}],"program":{"kind":"account","path":"lock_program"}}},{"name":"lp_mint","docs":["The mint of liquidity token"],"writable":true},{"name":"liquidity_owner_lp","docs":["liquidity owner lp token account"],"writable":true},{"name":"locked_lp_vault","writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"operator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"token_0_vault.mint"}]}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]},{"kind":"account","path":"fee_nft_mint"}],"program":{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]}}},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the new account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create/transfer mint/token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving fee NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata accunt"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[]},{"name":"remove_operators","discriminator":[42,20,89,83,222,37,4,109],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"signer":true,"relations":["config"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"operators","type":{"vec":"pubkey"}}]},{"name":"sell_token","discriminator":[109,61,40,187,230,176,135,174],"accounts":[{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve_sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"seller_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"seller"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"seller","writable":true,"signer":true},{"name":"recipient","writable":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"sell_amount","type":"u64"},{"name":"amount_out_min","type":"u64"}]},{"name":"split_post_graduation_trading_fees","discriminator":[241,178,177,69,38,187,58,176],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"mint"},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,116,95,103,114,97,100,95,116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"fee_splitter_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_splitter_config"},{"name":"fee_splitter_creator_vault","writable":true},{"name":"fee_splitter_vault_authority","writable":true},{"name":"fee_splitter_creator_vault_authority","writable":true},{"name":"fee_splitter_staking_mint"},{"name":"fee_splitter_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_splitter_vault_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"wsol"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_splitter_creator_vault_authority_wsol_vault","writable":true},{"name":"fee_splitter_treasury_wsol_vault","writable":true},{"name":"fee_splitter_team_wsol_vault","writable":true},{"name":"fee_splitter_reward_pool","writable":true},{"name":"fee_splitter_reward_pool_staking_vault","writable":true},{"name":"fee_splitter_reward_pool_reward_vault","writable":true},{"name":"fee_splitter_reward_pool_program"}],"args":[]},{"name":"split_trading_fees","discriminator":[96,126,225,47,185,213,50,58],"accounts":[{"name":"operator","writable":true,"signer":true},{"name":"mint"},{"name":"wsol","address":"So11111111111111111111111111111111111111112"},{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"vault_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"trading_fees_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,97,100,105,110,103,95,102,101,101,115,95,118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"fee_splitter_program","address":"boopEYztaEYSnajfMtjcRysyzyRcchgKsPboRZEbnJi"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_splitter_config"},{"name":"fee_splitter_creator_vault","writable":true},{"name":"fee_splitter_vault_authority","writable":true},{"name":"fee_splitter_creator_vault_authority","writable":true},{"name":"fee_splitter_staking_mint"},{"name":"fee_splitter_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_splitter_vault_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"wsol"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_splitter_creator_vault_authority_wsol_vault","writable":true},{"name":"fee_splitter_treasury_wsol_vault","writable":true},{"name":"fee_splitter_team_wsol_vault","writable":true},{"name":"fee_splitter_reward_pool","writable":true},{"name":"fee_splitter_reward_pool_staking_vault","writable":true},{"name":"fee_splitter_reward_pool_reward_vault","writable":true},{"name":"fee_splitter_reward_pool_program"}],"args":[]},{"name":"swap_sol_for_tokens_on_raydium","discriminator":[107,248,131,239,152,234,54,35],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"output_token_mint"}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"operator","writable":true,"signer":true},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"output_token_mint"},{"kind":"account","path":"input_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"input_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"input_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"output_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"output_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"output_token_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"output_token_mint"}]}},{"name":"output_token_mint","docs":["token_0 mint, the key must smaller than token_1 mint"]},{"name":"input_token_mint","docs":["token_1 mint, the key must greater than token_0 mint"],"address":"So11111111111111111111111111111111111111112"},{"name":"token_program","docs":["input_token_mint and output_token_mint have the same token program"]},{"name":"cp_swap_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"account","path":"cp_swap_program"}}}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_tokens_for_sol_on_raydium","discriminator":[216,172,130,148,34,98,215,163],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101]},{"kind":"account","path":"input_token_mint"}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"operator","writable":true,"signer":true},{"name":"vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"pool_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"input_token_mint"},{"kind":"account","path":"output_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"input_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"input_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"output_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"output_token_mint"}],"program":{"kind":"const","value":[169,42,90,139,79,41,89,82,132,37,80,170,147,253,91,149,181,172,230,168,235,146,12,147,148,46,67,105,12,32,236,115]}}},{"name":"bonding_curve_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,118,97,117,108,116]},{"kind":"account","path":"input_token_mint"}]}},{"name":"bonding_curve_wsol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,95,99,117,114,118,101,95,119,115,111,108,95,118,97,117,108,116]},{"kind":"account","path":"input_token_mint"}]}},{"name":"input_token_mint","docs":["token_0 mint, the key must smaller than token_1 mint"]},{"name":"output_token_mint","docs":["token_1 mint, the key must greater than token_0 mint"],"address":"So11111111111111111111111111111111111111112"},{"name":"token_program","docs":["input_token_mint and output_token_mint have the same token program"]},{"name":"cp_swap_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"observation_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}],"program":{"kind":"account","path":"cp_swap_program"}}}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"toggle_paused","discriminator":[54,83,147,198,123,97,218,72],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["config"]},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}}],"args":[]},{"name":"update_config","discriminator":[29,158,252,191,10,83,219,99],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","signer":true,"relations":["config"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_protocol_fee_recipient","type":"pubkey"},{"name":"new_virtual_sol_reserves","type":"u64"},{"name":"new_virtual_token_reserves","type":"u64"},{"name":"new_graduation_target","type":"u64"},{"name":"new_graduation_fee","type":"u64"},{"name":"new_damping_term","type":"u8"},{"name":"new_swap_fee_basis_points","type":"u8"},{"name":"new_token_for_stakers_basis_points","type":"u16"},{"name":"new_token_amount_for_raydium_liquidity","type":"u64"},{"name":"new_max_graduation_price_deviation_basis_points","type":"u16"},{"name":"new_max_swap_amount_for_pool_price_correction_basis_points","type":"u16"}]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"LockedCpLiquidityState","discriminator":[25,10,238,197,207,234,73,22]}],"events":[{"name":"AuthorityTransferCancelledEvent","discriminator":[192,121,140,224,229,96,13,143]},{"name":"AuthorityTransferCompletedEvent","discriminator":[163,132,217,128,243,92,90,249]},{"name":"AuthorityTransferInitiatedEvent","discriminator":[121,246,95,155,229,109,148,205]},{"name":"BondingCurveDeployedEvent","discriminator":[225,80,178,34,217,39,184,148]},{"name":"BondingCurveDeployedFallbackEvent","discriminator":[106,252,243,115,199,159,247,31]},{"name":"BondingCurveVaultClosedEvent","discriminator":[185,36,156,82,189,164,207,79]},{"name":"ConfigUpdatedEvent","discriminator":[245,158,129,99,60,100,214,220]},{"name":"LiquidityDepositedIntoRaydiumEvent","discriminator":[236,50,97,27,198,101,248,20]},{"name":"OperatorsAddedEvent","discriminator":[247,58,112,56,203,186,112,152]},{"name":"OperatorsRemovedEvent","discriminator":[44,72,75,70,151,42,53,89]},{"name":"PausedToggledEvent","discriminator":[143,222,228,224,6,230,64,176]},{"name":"PostGraduationTradingFeesSplitEvent","discriminator":[34,231,16,81,36,203,158,196]},{"name":"RaydiumLiquidityLockedEvent","discriminator":[172,189,8,241,137,175,59,100]},{"name":"RaydiumPoolCreatedEvent","discriminator":[170,178,21,215,84,222,34,101]},{"name":"RaydiumRandomPoolCreatedEvent","discriminator":[152,251,128,152,158,235,83,53]},{"name":"SwapSolForTokensOnRaydiumEvent","discriminator":[247,1,8,166,221,116,113,98]},{"name":"SwapTokensForSolOnRaydiumEvent","discriminator":[76,249,221,162,65,70,118,32]},{"name":"TokenBoughtEvent","discriminator":[71,89,222,124,215,192,230,138]},{"name":"TokenCreatedEvent","discriminator":[96,122,113,138,50,227,149,57]},{"name":"TokenCreatedFallbackEvent","discriminator":[157,202,35,92,165,163,39,56]},{"name":"TokenGraduatedEvent","discriminator":[73,116,111,26,92,217,146,141]},{"name":"TokenSoldEvent","discriminator":[204,239,182,77,241,51,77,66]},{"name":"TradingFeesCollectedEvent","discriminator":[225,63,26,55,134,243,210,203]},{"name":"TradingFeesCollectedV2Event","discriminator":[23,246,130,250,11,49,240,179]},{"name":"TradingFeesSplitEvent","discriminator":[113,60,159,17,253,174,135,122]}],"errors":[{"code":6000,"name":"AmountInTooLow","msg":"Amount in too low"},{"code":6001,"name":"AmountOutTooLow","msg":"Amount out too low"},{"code":6002,"name":"AmountZero","msg":"Amount zero"},{"code":6003,"name":"ConfigNotInitialized","msg":"Config not initialized"},{"code":6004,"name":"CreatorIsNotProvided","msg":"Creator is not provided"},{"code":6005,"name":"DampingTermTooLow","msg":"Damping term too low"},{"code":6006,"name":"FirstBuyMustBeAtMost50PercentOfTotalSupply","msg":"First buy must be at most 50% of the total supply"},{"code":6007,"name":"GraduationFeeRelativeToTargetIsTooHigh","msg":"Graduation fee relative to graduation target is too high"},{"code":6008,"name":"InsufficientTokensOut","msg":"Insufficient tokens to transfer out of the bonding curve"},{"code":6009,"name":"InvalidBondingCurveStatus","msg":"Invalid bonding curve status"},{"code":6010,"name":"InvalidDampingTerm","msg":"Invalid damping term"},{"code":6011,"name":"InvalidMint","msg":"Invalid mint"},{"code":6012,"name":"InvalidProtocolFeeRecipient","msg":"Invalid protocol fee recipient"},{"code":6013,"name":"InvalidSqrtPrice","msg":"Invalid sqrt price"},{"code":6014,"name":"MathOverflow","msg":"Math overflow"},{"code":6015,"name":"MaxBasisPointsOffGraduationPriceTooHigh","msg":"Max basis points off graduation price too high"},{"code":6016,"name":"MaxGraduationPriceDeviationBasisPointsTooHigh","msg":"Max graduation price deviation basis points too high"},{"code":6017,"name":"MaxSwapAmountForPoolPriceCorrectionBasisPointsTooHigh","msg":"Max swap amount for pool price correction basis points too high"},{"code":6018,"name":"MintIsLargerThanOrEqualToNativeMint","msg":"Mint is larger than or equal to native mint"},{"code":6019,"name":"NoAuthorityTransferInProgress","msg":"No authority transfer in progress"},{"code":6020,"name":"NothingToDeposit","msg":"LP Token amount is too low"},{"code":6021,"name":"NothingToSplit","msg":"Nothing to split"},{"code":6022,"name":"NothingToLock","msg":"Nothing to lock"},{"code":6023,"name":"OperatorAlreadyAdded","msg":"Operator already added"},{"code":6024,"name":"OperatorDoesNotExist","msg":"Operator does not exist"},{"code":6025,"name":"Paused","msg":"Paused"},{"code":6026,"name":"PoolPriceOutOfRange","msg":"Pool is already created and has a price out of range when attempting to deposit liquidity"},{"code":6027,"name":"SwapFeeBasisPointsTooHigh","msg":"Swap fee basis points too high"},{"code":6028,"name":"SwapAmountTooHigh","msg":"Swap amount exceeds the reasonable limit to leave as liquidity"},{"code":6029,"name":"TokenAmountForRaydiumLiquidityTooHigh","msg":"Token amount for Raydium liquidity too high"},{"code":6030,"name":"TokenForStakersBasisPointsTooHigh","msg":"Token for stakers basis points too high"},{"code":6031,"name":"TokenGraduated","msg":"Token graduated"},{"code":6032,"name":"TokenNameTooLong","msg":"Token name too long"},{"code":6033,"name":"TokenNameTooShort","msg":"Token name too short"},{"code":6034,"name":"TokenSymbolTooLong","msg":"Token symbol too long"},{"code":6035,"name":"TokenSymbolTooShort","msg":"Token symbol too short"},{"code":6036,"name":"Unauthorized","msg":"Unauthorized"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"disable_create_pool","docs":["Status to control if new pool can be create"],"type":"bool"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u64"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"create_pool_fee","docs":["Fee for create a new pool"],"type":"u64"},{"name":"protocol_owner","docs":["Address of the protocol fee owner"],"type":"pubkey"},{"name":"fund_owner","docs":["Address of the fund fee owner"],"type":"pubkey"},{"name":"padding","docs":["padding"],"type":{"array":["u64",16]}}]}},{"name":"AuthorityTransferCancelledEvent","type":{"kind":"struct","fields":[]}},{"name":"AuthorityTransferCompletedEvent","type":{"kind":"struct","fields":[{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"AuthorityTransferInitiatedEvent","type":{"kind":"struct","fields":[{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"creator","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","docs":["virtual token reserves is deprecated, we now use the xyk formula instead","and it only requires virtual sol reserves","to maintain backwards compatibility, if damping term is 30, we use the old formula","and we still need virtual_token_reserves to be set correctly"],"type":"u64"},{"name":"graduation_target","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"sol_reserves","type":"u64"},{"name":"token_reserves","type":"u64"},{"name":"damping_term","docs":["In reality, this is now more like a bonding_curve_selector"],"type":"u8"},{"name":"swap_fee_basis_points","type":"u8"},{"name":"token_for_stakers_basis_points","type":"u16"},{"name":"status","type":{"defined":{"name":"BondingCurveStatus"}}}]}},{"name":"BondingCurveDeployedEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"BondingCurveDeployedFallbackEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"BondingCurveStatus","type":{"kind":"enum","variants":[{"name":"Trading"},{"name":"Graduated"},{"name":"PoolPriceCorrected"},{"name":"LiquidityProvisioned"},{"name":"LiquidityLocked"}]}},{"name":"BondingCurveVaultClosedEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"recipient","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"Config","type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"authority","type":"pubkey"},{"name":"pending_authority","type":"pubkey"},{"name":"operators","type":{"vec":"pubkey"}},{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"token_distributor","type":"pubkey"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"graduation_target","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"damping_term","type":"u8"},{"name":"token_for_stakers_basis_points","type":"u16"},{"name":"swap_fee_basis_points","type":"u8"},{"name":"token_amount_for_raydium_liquidity","type":"u64"},{"name":"max_graduation_price_deviation_basis_points","type":"u16"},{"name":"max_swap_amount_for_pool_price_correction_basis_points","type":"u16"}]}},{"name":"ConfigUpdatedEvent","type":{"kind":"struct","fields":[{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"graduation_target","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"damping_term","type":"u8"},{"name":"swap_fee_basis_points","type":"u8"},{"name":"token_for_stakers_basis_points","type":"u16"},{"name":"token_amount_for_raydium_liquidity","type":"u64"},{"name":"max_graduation_price_deviation_basis_points","type":"u16"},{"name":"max_swap_amount_for_pool_price_correction_basis_points","type":"u16"}]}},{"name":"LiquidityDepositedIntoRaydiumEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"lp_token_amount","type":"u64"},{"name":"tokens_deposited","type":"u64"},{"name":"wsol_deposited","type":"u64"}]}},{"name":"LockedCpLiquidityState","type":{"kind":"struct","fields":[{"name":"locked_lp_amount","docs":["The Locked liquidity amount without claimed lp fee"],"type":"u64"},{"name":"claimed_lp_amount","docs":["Claimed lp fee amount"],"type":"u64"},{"name":"unclaimed_lp_amount","docs":["Unclaimed lp fee amount"],"type":"u64"},{"name":"last_lp","docs":["Last updated cp pool lp total supply"],"type":"u64"},{"name":"last_k","docs":["Last updated cp pool k"],"type":"u128"},{"name":"recent_epoch","docs":["Account update recent epoch"],"type":"u64"},{"name":"pool_id","docs":["The ID of the pool with which this record is connected"],"type":"pubkey"},{"name":"fee_nft_mint","docs":["nft mint to check who has authority to collect fee"],"type":"pubkey"},{"name":"locked_owner","docs":["The owner who has locked liquidity"],"type":"pubkey"},{"name":"locked_lp_mint","docs":["The mint of locked lp token"],"type":"pubkey"},{"name":"padding","docs":["Unused bytes for future upgrades."],"type":{"array":["u64",8]}}]}},{"name":"OperatorsAddedEvent","type":{"kind":"struct","fields":[{"name":"operators","type":{"vec":"pubkey"}}]}},{"name":"OperatorsRemovedEvent","type":{"kind":"struct","fields":[{"name":"operators","type":{"vec":"pubkey"}}]}},{"name":"PausedToggledEvent","type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"}]}},{"name":"PostGraduationTradingFeesSplitEvent","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"creator","type":"pubkey"}]}},{"name":"RaydiumLiquidityLockedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"lp_amount","type":"u64"}]}},{"name":"RaydiumPoolCreatedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"RaydiumRandomPoolCreatedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"SwapSolForTokensOnRaydiumEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"SwapTokensForSolOnRaydiumEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"TokenBoughtEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"swap_fee","type":"u64"},{"name":"buyer","type":"pubkey"},{"name":"recipient","type":"pubkey"}]}},{"name":"TokenCreatedEvent","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"TokenCreatedFallbackEvent","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"TokenGraduatedEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"sol_for_liquidity","type":"u64"},{"name":"graduation_fee","type":"u64"},{"name":"token_for_distributor","type":"u64"}]}},{"name":"TokenSoldEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"swap_fee","type":"u64"},{"name":"seller","type":"pubkey"},{"name":"recipient","type":"pubkey"}]}},{"name":"TradingFeesCollectedEvent","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"TradingFeesCollectedV2Event","type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"TradingFeesSplitEvent","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"creator","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/idls/bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json b/idls/bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json new file mode 100644 index 0000000..8131dde --- /dev/null +++ b/idls/bubblegum.BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY.json @@ -0,0 +1 @@ +{"version":"0.12.0","name":"bubblegum","instructions":[{"name":"burn","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"cancelRedeem","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":true,"isSigner":true},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"voucher","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}}]},{"name":"createTree","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"treeCreator","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxDepth","type":"u32"},{"name":"maxBufferSize","type":"u32"},{"name":"public","type":{"option":"bool"}}]},{"name":"decompressV1","accounts":[{"name":"voucher","isMut":true,"isSigner":false},{"name":"leafOwner","isMut":true,"isSigner":true},{"name":"tokenAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"masterEdition","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"sysvarRent","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false}],"args":[{"name":"metadata","type":{"defined":"MetadataArgs"}}]},{"name":"delegate","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":true},{"name":"previousLeafDelegate","isMut":false,"isSigner":false},{"name":"newLeafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"mintToCollectionV1","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":true},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"metadataArgs","type":{"defined":"MetadataArgs"}}]},{"name":"mintV1","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"redeem","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":true,"isSigner":true},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"voucher","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"setAndVerifyCollection","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":false},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}},{"name":"collection","type":"publicKey"}]},{"name":"setDecompressibleState","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"treeCreator","isMut":false,"isSigner":true}],"args":[{"name":"decompressableState","type":{"defined":"DecompressibleState"}}]},{"name":"setTreeDelegate","accounts":[{"name":"treeAuthority","isMut":true,"isSigner":false},{"name":"treeCreator","isMut":false,"isSigner":true},{"name":"newTreeDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"transfer","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"newLeafOwner","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"}]},{"name":"unverifyCollection","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":false},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"unverifyCreator","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"creator","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"verifyCollection","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"treeDelegate","isMut":false,"isSigner":false},{"name":"collectionAuthority","isMut":false,"isSigner":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false},{"name":"collectionMint","isMut":false,"isSigner":false},{"name":"collectionMetadata","isMut":true,"isSigner":false},{"name":"editionAccount","isMut":false,"isSigner":false},{"name":"bubblegumSigner","isMut":false,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"verifyCreator","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"creator","isMut":false,"isSigner":true},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"dataHash","type":{"array":["u8",32]}},{"name":"creatorHash","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"message","type":{"defined":"MetadataArgs"}}]},{"name":"updateMetadata","accounts":[{"name":"treeAuthority","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"collectionMint","isMut":false,"isSigner":false,"isOptional":true},{"name":"collectionMetadata","isMut":false,"isSigner":false,"isOptional":true},{"name":"collectionAuthorityRecordPda","isMut":false,"isSigner":false,"isOptional":true},{"name":"leafOwner","isMut":false,"isSigner":false},{"name":"leafDelegate","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"merkleTree","isMut":true,"isSigner":false},{"name":"logWrapper","isMut":false,"isSigner":false},{"name":"compressionProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"index","type":"u32"},{"name":"currentMetadata","type":{"defined":"MetadataArgs"}},{"name":"updateArgs","type":{"defined":"UpdateArgs"}}]}],"accounts":[{"name":"TreeConfig","type":{"kind":"struct","fields":[{"name":"treeCreator","type":"publicKey"},{"name":"treeDelegate","type":"publicKey"},{"name":"totalMintCapacity","type":"u64"},{"name":"numMinted","type":"u64"},{"name":"isPublic","type":"bool"},{"name":"isDecompressible","type":{"defined":"DecompressibleState"}}]}},{"name":"Voucher","type":{"kind":"struct","fields":[{"name":"leafSchema","type":{"defined":"LeafSchema"}},{"name":"index","type":"u32"},{"name":"merkleTree","type":"publicKey"}]}}],"types":[{"name":"Creator","type":{"kind":"struct","fields":[{"name":"address","type":"publicKey"},{"name":"verified","type":"bool"},{"name":"share","type":"u8"}]}},{"name":"Uses","type":{"kind":"struct","fields":[{"name":"useMethod","type":{"defined":"UseMethod"}},{"name":"remaining","type":"u64"},{"name":"total","type":"u64"}]}},{"name":"Collection","type":{"kind":"struct","fields":[{"name":"verified","type":"bool"},{"name":"key","type":"publicKey"}]}},{"name":"MetadataArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"primarySaleHappened","type":"bool"},{"name":"isMutable","type":"bool"},{"name":"editionNonce","type":{"option":"u8"}},{"name":"tokenStandard","type":{"option":{"defined":"TokenStandard"}}},{"name":"collection","type":{"option":{"defined":"Collection"}}},{"name":"uses","type":{"option":{"defined":"Uses"}}},{"name":"tokenProgramVersion","type":{"defined":"TokenProgramVersion"}},{"name":"creators","type":{"vec":{"defined":"Creator"}}}]}},{"name":"UpdateArgs","type":{"kind":"struct","fields":[{"name":"name","type":{"option":"string"}},{"name":"symbol","type":{"option":"string"}},{"name":"uri","type":{"option":"string"}},{"name":"creators","type":{"option":{"vec":{"defined":"Creator"}}}},{"name":"sellerFeeBasisPoints","type":{"option":"u16"}},{"name":"primarySaleHappened","type":{"option":"bool"}},{"name":"isMutable","type":{"option":"bool"}}]}},{"name":"Version","type":{"kind":"enum","variants":[{"name":"V1"}]}},{"name":"LeafSchema","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"id","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"delegate","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"data_hash","type":{"array":["u8",32]}},{"name":"creator_hash","type":{"array":["u8",32]}}]}]}},{"name":"TokenProgramVersion","type":{"kind":"enum","variants":[{"name":"Original"},{"name":"Token2022"}]}},{"name":"TokenStandard","type":{"kind":"enum","variants":[{"name":"NonFungible"},{"name":"FungibleAsset"},{"name":"Fungible"},{"name":"NonFungibleEdition"}]}},{"name":"UseMethod","type":{"kind":"enum","variants":[{"name":"Burn"},{"name":"Multiple"},{"name":"Single"}]}},{"name":"BubblegumEventType","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"LeafSchemaEvent"}]}},{"name":"DecompressibleState","type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}}],"errors":[{"code":6000,"name":"AssetOwnerMismatch","msg":""},{"code":6001,"name":"PublicKeyMismatch","msg":""},{"code":6002,"name":"HashingMismatch","msg":""},{"code":6003,"name":"UnsupportedSchemaVersion","msg":""},{"code":6004,"name":"CreatorShareTotalMustBe100","msg":""},{"code":6005,"name":"DuplicateCreatorAddress","msg":""},{"code":6006,"name":"CreatorDidNotVerify","msg":"Creator did not verify the metadata"},{"code":6007,"name":"CreatorNotFound","msg":""},{"code":6008,"name":"NoCreatorsPresent","msg":"No creators in creator Vec"},{"code":6009,"name":"CreatorHashMismatch","msg":"Provided creator Vec must result in provided creator hash"},{"code":6010,"name":"DataHashMismatch","msg":"Provided metadata must result in provided data hash"},{"code":6011,"name":"CreatorsTooLong","msg":"Creators list too long"},{"code":6012,"name":"MetadataNameTooLong","msg":""},{"code":6013,"name":"MetadataSymbolTooLong","msg":""},{"code":6014,"name":"MetadataUriTooLong","msg":""},{"code":6015,"name":"MetadataBasisPointsTooHigh","msg":"Basis points cannot exceed 10000"},{"code":6016,"name":"TreeAuthorityIncorrect","msg":"Tree creator or tree delegate must sign."},{"code":6017,"name":"InsufficientMintCapacity","msg":"Not enough unapproved mints left"},{"code":6018,"name":"NumericalOverflowError","msg":""},{"code":6019,"name":"IncorrectOwner","msg":"r"},{"code":6020,"name":"CollectionCannotBeVerifiedInThisInstruction","msg":""},{"code":6021,"name":"CollectionNotFound","msg":"Collection Not Found on Metadata"},{"code":6022,"name":"AlreadyVerified","msg":""},{"code":6023,"name":"AlreadyUnverified","msg":""},{"code":6024,"name":"UpdateAuthorityIncorrect","msg":"Incorrect leaf metadata update authority."},{"code":6025,"name":"LeafAuthorityMustSign","msg":"Tx must be signed by leaf owner or leaf delegate"},{"code":6026,"name":"CollectionMustBeSized","msg":""},{"code":6027,"name":"MetadataMintMismatch","msg":"Metadata mint does not match collection mint"},{"code":6028,"name":"InvalidCollectionAuthority","msg":""},{"code":6029,"name":"InvalidDelegateRecord","msg":""},{"code":6030,"name":"CollectionMasterEditionAccountInvalid","msg":"Edition account doesnt match collection"},{"code":6031,"name":"CollectionMustBeAUniqueMasterEdition","msg":"Collection Must Be a Unique Master Edition v2"},{"code":6032,"name":"UnknownExternalError","msg":"Could not convert to BubblegumError"},{"code":6033,"name":"DecompressionDisabled","msg":"Decompression disabled for this tree."},{"code":6034,"name":"MissingCollectionMintAccount","msg":"Missing collection mint account"},{"code":6035,"name":"MissingCollectionMetadataAccount","msg":"Missing collection metadata account"},{"code":6036,"name":"CollectionMismatch","msg":"Collection mismatch"},{"code":6037,"name":"MetadataImmutable","msg":"Metadata not mutable"},{"code":6038,"name":"PrimarySaleCanOnlyBeFlippedToTrue","msg":"Can only update primary sale to true"},{"code":6039,"name":"CreatorDidNotUnverify","msg":"Creator did not unverify the metadata"}]} \ No newline at end of file diff --git a/idls/byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json b/idls/byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json new file mode 100644 index 0000000..777071d --- /dev/null +++ b/idls/byreal_clmm.REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2.json @@ -0,0 +1 @@ +{"address":"REALQqNEomY6cQGZJUGwywTBD2UmDT32rZcNnfxQ5N2","metadata":{"name":"byreal_clmm","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Byreal concentrated liquidity AMM"},"instructions":[{"name":"claim_offchain_reward","docs":["claim offchain reward from the pool"],"discriminator":[195,87,221,149,141,195,146,19],"accounts":[{"name":"claimer","docs":["the address who claim the offchain reward."],"writable":true,"signer":true},{"name":"authority","docs":["The authority make decision that who can claim the offchain reward."],"signer":true},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_id","docs":["the pool id, which is the pool state account."],"relations":["reward_config"]},{"name":"token_mint"},{"name":"claimer_token_account","docs":[""],"writable":true},{"name":"reward_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"reward_config"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"reward_config","docs":["The offchain reward config account, it also is the reward vault account."],"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_id"}]}},{"name":"token_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount","type":"u64"}]},{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"close_protocol_position","docs":["close the protocol position, send the remaining fund fee to admin fee keeper","this instruction will be delete after all protocol position is closed"],"discriminator":[201,117,152,144,85,85,108,178],"accounts":[{"name":"admin_group","docs":["amm admin group account to store admin permissions.","anyone can collect fee, but only fee-manager in admin group can receive fee"],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"fee_keeper","writable":true},{"name":"protocol_position","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"admin_group","docs":["amm admin group account to store admin permissions.","anyone can collect fee, but only fee-manager in admin group can receive fee"],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"admin_group","docs":["amm admin group account to store admin permissions.","anyone can collect fee, but only fee-manager in admin group can receive fee"],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"]},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as normal manager in admin group."],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_manager","docs":["with pool_manager permission, the pool creator can create a pool."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"offchain_reward_config","docs":["Initialize an account to store the off-chain reward config"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_state"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_pool_decay_fee","docs":["Creates a pool for the given token pair and the initial price with decay fee","# Arguments","","* `ctx`- The context of accounts","* `params` - The parameters for creating the pool with decay fee"],"discriminator":[252,154,210,191,22,217,136,252],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_manager","docs":["with pool_manager permission, the pool creator can create a pool."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"offchain_reward_config","docs":["Initialize an account to store the off-chain reward config"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_state"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"CreatePoolDecayFeeParams"}}}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards with ignoring the not support extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_liquidity","docs":["#[deprecated(note = \"Use `decrease_liquidity_v2` instead.\")]","Decreases liquidity for an existing position","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"deposit_offchain_reward","docs":["deposit offchain reward into the pool"],"discriminator":[97,125,48,169,92,241,44,142],"accounts":[{"name":"payer","docs":["the address paying to deposit the offchain reward."],"writable":true,"signer":true},{"name":"authority","docs":["The authority make decision that who can deposit the offchain reward."],"signer":true},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_id","docs":["the pool id, which is the pool state account."],"relations":["reward_config"]},{"name":"token_mint"},{"name":"payer_token_account","docs":[""],"writable":true},{"name":"reward_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"reward_config"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"reward_config","docs":["The offchain reward config account, it also is the reward vault account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_id"}]}},{"name":"token_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"increase_liquidity","docs":["#[deprecated(note = \"Use `increase_liquidity_v2` instead.\")]","Increases liquidity for an existing position, with amount paid by `payer`","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, can't be zero","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - Now, we don't use base_flag, it can be None;","We directly calculate liquidity from amount_0_max or amount_1_max according to the current price in pool.",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick","constraint = tick_array_lower.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick","constraint = tick_array_upper.load()?.pool_id == pool_state.key()"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"init_amm_admin_group","docs":["Initialize the AMM admin group account, which is used to manage the AMM protocol."],"discriminator":[209,108,32,246,157,214,237,86],"accounts":[{"name":"payer","docs":["only super admin can create admin group"],"writable":true,"signer":true,"address":"AY196f8U5EvM999PVnvLmyvaUnzL4GLiFaGKUgnJXN6o"},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"InitAdminGroupParams"}}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","docs":["A pda, reward vault"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_position","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted","This account created in the contract by cpi to avoid large stack variables"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"open_position_v2","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `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","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,184,74,214,112,86,241,199],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program_2022","docs":["Program to create mint account and mint tokens"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `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","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_pool_quote_flag","docs":["设置 pool 的 quote token 标识"],"discriminator":[250,38,116,122,249,128,108,105],"accounts":[{"name":"authority","docs":["必须是 pool_manager 权限"],"signer":true},{"name":"admin_group","pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"token1_as_quote","type":"bool"}]},{"name":"set_pool_trade_fee_rate","docs":["设置 pool 专属的 trade_fee_rate"],"discriminator":[109,117,170,34,87,202,50,20],"accounts":[{"name":"authority","docs":["必须是 pool_manager 权限(与 create_pool 一致)"],"signer":true},{"name":"admin_group","pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"trade_fee_rate","type":"u32"}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"set_swap_dynamic_fee_params","docs":["设置 swap-dynamic-fee 参数"],"discriminator":[169,23,133,74,115,251,233,52],"accounts":[{"name":"authority","docs":["必须是 pool_manager 权限 (与 create_pool 一致)"],"signer":true},{"name":"admin_group","pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"params","type":{"defined":{"name":"SetSwapDynamicFeeParamsInput"}}}]},{"name":"swap","docs":["#[deprecated(note = \"Use `swap_v2` instead.\")]","Swaps one token for as much as possible of another token across a single pool","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"tick_array","writable":true}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"swap_v3_dyn","docs":["swap_v3_dyn: 支持动态费率的 swap 指令","如果pool不支持 swap-dynamic-fee,则行为与 swap_v2 相同"],"discriminator":[229,46,213,132,105,40,40,228],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx`- The context of accounts","* `new_owner`- new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_admin_group","docs":["Update the AMM admin group account, which is used to manage the AMM protocol."],"discriminator":[61,183,185,188,82,81,141,197],"accounts":[{"name":"payer","docs":["only super admin can create admin group"],"writable":true,"signer":true,"address":"AY196f8U5EvM999PVnvLmyvaUnzL4GLiFaGKUgnJXN6o"},{"name":"admin_group","docs":["update amm admin group account to store admin permissions."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}}],"args":[{"name":"params","type":{"defined":{"name":"UpdateAdminGroupParams"}}}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx`- The context of accounts","* `param`- The value can be 0 | 1 | 2 | 3, otherwise will report a error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true},{"name":"admin_group","docs":["amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]},{"name":"withdraw_offchain_reward","docs":["withdraw offchain reward from the pool"],"discriminator":[86,53,59,76,217,38,71,213],"accounts":[{"name":"authority","docs":["The authority make decision that who can withdraw the offchain reward."],"signer":true},{"name":"admin_group","docs":["Initialize amm admin group account to store admin permissions."],"pda":{"seeds":[{"kind":"const","value":[97,100,109,105,110,95,103,114,111,117,112]}]}},{"name":"pool_id","docs":["the pool id, which is the pool state account."],"relations":["reward_config"]},{"name":"token_mint"},{"name":"receiver_token_account","docs":["the address who receive the withdrawn offchain reward."],"writable":true},{"name":"reward_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"reward_config"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"reward_config","docs":["The offchain reward config account, it also is the reward vault account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,102,102,99,104,97,105,110,95,114,101,119,97,114,100]},{"kind":"account","path":"pool_id"}]}},{"name":"token_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"amount","type":"u64"}]}],"accounts":[{"name":"AmmAdminGroup","discriminator":[128,128,234,30,61,172,188,123]},{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OffchainRewardConfig","discriminator":[118,52,115,150,99,69,164,76]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"ModifyAmmAdminGroupEvent","discriminator":[218,118,87,81,53,80,18,235]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"LOK","msg":"LOK"},{"code":6001,"name":"NotApproved","msg":"Not approved"},{"code":6002,"name":"InvalidUpdateConfigFlag","msg":"invalid update amm config flag"},{"code":6003,"name":"AccountLack","msg":"Account lack"},{"code":6004,"name":"ClosePositionErr","msg":"Remove liquitity, collect fees owed and reward then you can close position account"},{"code":6005,"name":"ZeroMintAmount","msg":"Minting amount should be greater than 0"},{"code":6006,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6007,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6008,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6009,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6010,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6011,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6012,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6013,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6014,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6015,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6016,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6017,"name":"InvalidLiquidity","msg":"Invalid liquidity when update position"},{"code":6018,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6019,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6020,"name":"TransactionTooOld","msg":"Transaction too old"},{"code":6021,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6022,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6023,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6024,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6025,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6026,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6027,"name":"NotEnoughTickArrayAccount","msg":"Not enought tick array account"},{"code":6028,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6029,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6030,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6031,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6032,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6033,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6034,"name":"InvalidRewardDesiredAmount","msg":"Invalid collect reward desired amount"},{"code":6035,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6036,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6037,"name":"NotApproveUpdateRewardEmissiones","msg":"Modification of emissiones is allowed within 72 hours from the end of the previous cycle"},{"code":6038,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6039,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6040,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6041,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6042,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6043,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6044,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6045,"name":"IllegalAccountOwner","msg":"invalid account owner"},{"code":6046,"name":"InvalidAccount","msg":"Invalid account"},{"code":6047,"name":"DecayFeeNeitherOnSellMint0NorMint1","msg":"Invalid decay fee params"},{"code":6048,"name":"SwapDynamicFeeEnabled","msg":"Swap dynamic fee is enabled, must use swap_v3_dyn instruction"},{"code":6049,"name":"InvalidPythOracleAccount","msg":"Invalid pyth oracle account"},{"code":6050,"name":"PythPriceStale","msg":"Pyth price is stale"},{"code":6051,"name":"InvalidSwapDynamicFeeParams","msg":"Invalid swap dynamic fee params"}],"types":[{"name":"AmmAdminGroup","docs":["Holds the admin group information."],"type":{"kind":"struct","fields":[{"name":"fee_keeper","docs":["the address who can hold the fee,","anyone can trigger the fee collection action,"],"type":"pubkey"},{"name":"reward_config_manager","docs":["the address who can config the reward(config, deposit, withdraw),","deposit reward, set the account who can deposit the reward, withdraw the remaining reward(withdraw)"],"type":"pubkey"},{"name":"reward_claim_manager","docs":["the address who can manage the offchain reward claim"],"type":"pubkey"},{"name":"pool_manager","docs":["the address who can manage the pool create action,","without this account's permission, no one can create a pool"],"type":"pubkey"},{"name":"emergency_manager","docs":["the address who can manage the emergency action,","emergency action includes stop/resume the pool, stop/resume withdraw lp"],"type":"pubkey"},{"name":"normal_manager","docs":["normal action manager,","such as create amm config, update amm config"],"type":"pubkey"},{"name":"pad","docs":["The space required for the account. may be used for future extensions."],"type":{"array":["pubkey",6]}}]}},{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"CreatePoolDecayFeeParams","type":{"kind":"struct","fields":[{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, in x64 format."],"type":"u128"},{"name":"open_time","docs":["The open time of the pool, can be set to a future time; it should be None or future time.","If None, the pool will be opened immediately."],"type":{"option":"u64"}},{"name":"use_decay_fee","docs":["Whether to use decay fee for the pool.","If true, the pool will use decay fee."],"type":"bool"},{"name":"decay_fee_on_sell_mint0","docs":["Whether to use decay fee on sell for mint0 and mint1.","If true, the pool will use decay fee on sell for mint0 and mint1","these two fields are only used when use_decay_fee is true, and at least one of them must be true."],"type":"bool"},{"name":"decay_fee_on_sell_mint1","type":"bool"},{"name":"init_decay_fee_rate","docs":["The initial decay fee rate for the pool, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_rate","docs":["decrease rate for the decay fee, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_interval","docs":["The interval for decreasing the decay fee, in seconds.","how to calculate the current decay fee:","interval_count = (current_time - open_time) / decay_fee_decrease_interval","current_decay_fee = init_decay_fee_rate*((1-decay_fee_decrease_rate/100)^interval_count)"],"type":"u8"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitAdminGroupParams","type":{"kind":"struct","fields":[{"name":"fee_keeper","docs":["the address who can hold the fee,","anyone can trigger the fee collection action,"],"type":"pubkey"},{"name":"reward_config_manager","docs":["the address who can config the reward(config, deposit, withdraw),","deposit reward, set the account who can deposit the reward, withdraw the remaining reward(withdraw)"],"type":"pubkey"},{"name":"reward_claim_manager","docs":["the address who can manage the offchain reward claim"],"type":"pubkey"},{"name":"pool_manager","docs":["the address who can manage the pool create action,","without this account's permission, no one can create a pool"],"type":"pubkey"},{"name":"emergency_manager","docs":["the address who can manage the emergency action,","emergency action includes stop/resume the pool, stop/resume withdraw lp"],"type":"pubkey"},{"name":"normal_manager","docs":["normal action manager,","such as create amm config, update amm config"],"type":"pubkey"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"ModifyAmmAdminGroupEvent","type":{"kind":"struct","fields":[{"name":"fee_keeper","type":"pubkey"},{"name":"reward_config_manager","type":"pubkey"},{"name":"reward_claim_manager","type":"pubkey"},{"name":"pool_manager","type":"pubkey"},{"name":"emergency_manager","type":"pubkey"},{"name":"normal_manager","type":"pubkey"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OffchainRewardConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"pool_id","docs":["the pool state address"],"type":"pubkey"},{"name":"reward_vault","docs":["the vault to hold the reward","vault address is this config address"],"type":"pubkey"},{"name":"vault_bump","docs":["Bump to identify vault PDA"],"type":{"array":["u8",1]}},{"name":"reward_mint_vec","docs":["reward token mint address list","reward token account is ATA(reward_vault, reward_mint)"],"type":{"vec":"pubkey"}}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"swap_in_amount_token_0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swap_out_amount_token_1","type":"u128"},{"name":"swap_in_amount_token_1","type":"u128"},{"name":"swap_out_amount_token_0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",3]}},{"name":"trade_fee_rate","docs":["如果该值不为0, 则会覆盖 amm config 中的 trade_fee_rate 参数,作为实际收取的 trade fee rate","The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"total_fees_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_claimed_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_token_1","type":"u64"},{"name":"total_fees_claimed_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"decay_fee_flag","docs":["--- decay fee flag","bit0, 1: use decay fee, 0: not use decay fee","bit1, 1: use decay fee on sell for mint0, 0: not use decay fee on sell for mint0","bit2, 1: use decay fee on sell for mint1, 0: not use decay fee on sell for mint1","--- swap-dynamic-fee-flag","bit3, 1: token1 as quote token; token0 as quote token","bit4, 1: 启用 swap-dynamic-fee; 0: 不启用 swap-dynamic-fee"],"type":"u8"},{"name":"decay_fee_init_fee_rate","docs":["The initial decay fee rate for the pool, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_rate","docs":["decrease rate for the decay fee, in percentage.(1=1%)"],"type":"u8"},{"name":"decay_fee_decrease_interval","docs":["The interval for decreasing the decay fee, in seconds."],"type":"u8"},{"name":"arbitrage_fee_buffer_ppm","docs":["arbitrage_fee: 手工设置的一个容忍度,价差小于该值,不收取 arbitrageFee;单位取 10^-6(percent-per-million);"],"type":"u16"},{"name":"trade_slippage_fee_base","docs":["trade_slippage_fee: 公式中的b值,单位取 1/1000"],"type":"u8"},{"name":"trade_slippage_fee_trade_size_threshold","docs":["归一化(按quote数量计算)的swap-size值; 单位取 100"],"type":"u8"},{"name":"imbalance_fee_base","docs":["公式中的b,单位取1/10"],"type":"u8"},{"name":"imbalance_fee_x","docs":["公式中的x;单位取 1/100"],"type":"u8"},{"name":"padding1_1","type":{"array":["u8",6]}},{"name":"token0_pyth_feed_id","docs":["Pyth feed id for base token."],"type":{"array":["u8",32]}},{"name":"token1_pyth_feed_id","docs":["Pyth feed id for quote token."],"type":{"array":["u8",32]}},{"name":"padding1","type":{"array":["u64",14]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SetSwapDynamicFeeParamsInput","type":{"kind":"struct","fields":[{"name":"enabled","docs":["是否启用 swap-dynamic-fee"],"type":"bool"},{"name":"arbitrage_fee_buffer_ppm","docs":["arbitrage_fee 缓冲值,单位 ppm (10^-6)"],"type":{"option":"u16"}},{"name":"trade_slippage_fee_base","docs":["trade_slippage_fee 基数,单位 1/1000"],"type":{"option":"u8"}},{"name":"trade_slippage_fee_trade_size_threshold","docs":["trade_slippage_fee 阈值,单位 100"],"type":{"option":"u8"}},{"name":"imbalance_fee_base","docs":["imbalance_fee 基数,单位 1/10"],"type":{"option":"u8"}},{"name":"imbalance_fee_x","docs":["imbalance_fee 阈值,单位 1/100"],"type":{"option":"u8"}},{"name":"token0_pyth_feed_id","docs":["token0 的 Pyth feed id"],"type":{"option":{"array":["u8",32]}}},{"name":"token1_pyth_feed_id","docs":["token1 的 Pyth feed id"],"type":{"option":{"array":["u8",32]}}}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"UpdateAdminGroupParams","type":{"kind":"struct","fields":[{"name":"fee_keeper","docs":["the address who can hold the fee,","anyone can trigger the fee collection action,"],"type":{"option":"pubkey"}},{"name":"reward_config_manager","docs":["the address who can config the reward(config, deposit, withdraw),","deposit reward, set the account who can deposit the reward, withdraw the remaining reward(withdraw)"],"type":{"option":"pubkey"}},{"name":"reward_claim_manager","docs":["the address who can manage the offchain reward claim"],"type":{"option":"pubkey"}},{"name":"pool_manager","docs":["the address who can manage the pool create action,","without this account's permission, no one can create a pool"],"type":{"option":"pubkey"}},{"name":"emergency_manager","docs":["the address who can manage the emergency action,","emergency action includes stop/resume the pool, stop/resume withdraw lp"],"type":{"option":"pubkey"}},{"name":"normal_manager","docs":["normal action manager,","such as create amm config, update amm config"],"type":{"option":"pubkey"}}]}},{"name":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/idls/carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json b/idls/carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json new file mode 100644 index 0000000..f3bbb6d --- /dev/null +++ b/idls/carrot.CarrotwivhMpDnm27EHmRLeQ683Z1PufuqEmBZvD282s.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"carrot","instructions":[{"name":"initVault","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitVaultArgs"}}]},{"name":"transferVaultAuthority","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"newAuthority","isMut":false,"isSigner":false},{"name":"oldAuthority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"pauseVault","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"PauseVaultArgs"}}]},{"name":"migrateVaultAccount","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"distributeVaultFees","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":true,"isSigner":false},{"name":"sharesDestination","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateFee","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateFeeArgs"}}]},{"name":"issue","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"asset","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"userAssetAta","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"IssueArgs"}}]},{"name":"redeem","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"asset","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"userAssetAta","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"RedeemArgs"}}]},{"name":"addAsset","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAsset","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateAssetArgs"}}]},{"name":"removeAsset","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"asset","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"removeStrategy","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateStrategy","accounts":[{"name":"vault","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"UpdateStrategyArgs"}}]},{"name":"marginfiSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":true},{"name":"marginfiBank","isMut":false,"isSigner":false},{"name":"marginfiBankLiquidityVault","isMut":false,"isSigner":false},{"name":"marginfiBankLiquidityVaultAuthority","isMut":false,"isSigner":false},{"name":"marginfiOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MarginfiSupplyStrategyInitArgs"}}]},{"name":"marginfiSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":false},{"name":"marginfiBank","isMut":true,"isSigner":false},{"name":"marginfiBankLiquidityVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MarginfiSupplyStrategyDepositArgs"}}]},{"name":"marginfiSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":false},{"name":"marginfiBank","isMut":true,"isSigner":false},{"name":"marginfiBankLiquidityVault","isMut":true,"isSigner":false},{"name":"marginfiBankLiquidityVaultAuthority","isMut":true,"isSigner":false},{"name":"marginfiOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MarginfiSupplyStrategyWithdrawArgs"}}]},{"name":"marginfiSupplyStrategyClaimEmissions","accounts":[{"name":"vault","isMut":false,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"marginfiGroup","isMut":false,"isSigner":false},{"name":"marginfiAccount","isMut":true,"isSigner":false},{"name":"marginfiBank","isMut":true,"isSigner":false},{"name":"marginfiEmissionsVault","isMut":true,"isSigner":false},{"name":"marginfiEmissionsAuth","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"marginfiProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"klendSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":true,"isSigner":false},{"name":"userMetadata","isMut":true,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"obligationFarm","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":false,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":false,"isSigner":false},{"name":"reserveFarmState","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"KlendSupplyStrategyInitArgs"}}]},{"name":"klendSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":true,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"KlendSupplyStrategyDepositArgs"}}]},{"name":"klendSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":true,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"assetTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"KlendSupplyStrategyWithdrawArgs"}}]},{"name":"klendSupplyStrategyClaimEmissions","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"kfarmsGlobalConfig","isMut":false,"isSigner":false},{"name":"kfarmsVaultsAuthority","isMut":false,"isSigner":false},{"name":"kfarmsRewardsVault","isMut":true,"isSigner":false},{"name":"kfarmsRewardsTreasuryVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"kfarmsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"solendSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":false,"isSigner":false},{"name":"assetSwitchboardOracle","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":false,"isSigner":false},{"name":"reserveDepositCollateralAta","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"solendProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SolendSupplyStrategyInitArgs"}}]},{"name":"solendSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":false,"isSigner":false},{"name":"assetSwitchboardOracle","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"depositCollateralAta","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"solendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SolendSupplyStrategyDepositArgs"}}]},{"name":"solendSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"assetPythOracle","isMut":false,"isSigner":false},{"name":"assetSwitchboardOracle","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"vaultCollateralAta","isMut":true,"isSigner":false},{"name":"withdrawCollateralAta","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"solendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SolendSupplyStrategyWithdrawArgs"}}]},{"name":"mangoSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"mangoGroup","isMut":false,"isSigner":false},{"name":"mangoAccount","isMut":true,"isSigner":false},{"name":"mangoBank","isMut":false,"isSigner":false},{"name":"mangoVault","isMut":false,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false},{"name":"switchboardOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"mangoProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MangoSupplyStrategyInitArgs"}}]},{"name":"mangoSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"mangoGroup","isMut":false,"isSigner":false},{"name":"mangoAccount","isMut":true,"isSigner":false},{"name":"mangoBank","isMut":true,"isSigner":false},{"name":"mangoVault","isMut":true,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false},{"name":"switchboardOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mangoProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MangoSupplyStrategyDepositArgs"}}]},{"name":"mangoSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"mangoGroup","isMut":false,"isSigner":false},{"name":"mangoAccount","isMut":true,"isSigner":false},{"name":"mangoBank","isMut":true,"isSigner":false},{"name":"mangoVault","isMut":true,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false},{"name":"switchboardOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mangoProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"MangoSupplyStrategyWithdrawArgs"}}]},{"name":"driftSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"driftSpotMarket","isMut":false,"isSigner":false},{"name":"driftPerpMarket","isMut":false,"isSigner":false},{"name":"driftSpotMarketVault","isMut":false,"isSigner":false},{"name":"spotPythOracle","isMut":false,"isSigner":false},{"name":"perpPythOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftSupplyStrategyInitArgs"}}]},{"name":"driftSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftSupplyStrategyDepositArgs"}}]},{"name":"driftSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftSupplyStrategyWithdrawArgs"}}]},{"name":"driftInsuranceFundStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":false,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftInsuranceFundStrategyInitArgs"}}]},{"name":"driftInsuranceFundStrategyStake","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftState","isMut":false,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftInsuranceFundStrategyStakeArgs"}}]},{"name":"driftInsuranceFundStrategyUnstake","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"driftProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"DriftInsuranceFundStrategyUnstakeArgs"}}]},{"name":"driftInsuranceFundStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftState","isMut":false,"isSigner":false},{"name":"driftInsuranceFundStake","isMut":true,"isSigner":false},{"name":"driftInsuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"clendSupplyStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"clendGroup","isMut":false,"isSigner":false},{"name":"clendAccount","isMut":true,"isSigner":true},{"name":"clendBank","isMut":false,"isSigner":false},{"name":"clendBankLiquidityVault","isMut":false,"isSigner":false},{"name":"clendBankLiquidityVaultAuthority","isMut":false,"isSigner":false},{"name":"clendOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"clendProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ClendSupplyStrategyInitArgs"}}]},{"name":"clendSupplyStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"clendGroup","isMut":false,"isSigner":false},{"name":"clendAccount","isMut":true,"isSigner":false},{"name":"clendBank","isMut":true,"isSigner":false},{"name":"clendBankLiquidityVault","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"clendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ClendSupplyStrategyDepositArgs"}}]},{"name":"clendSupplyStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategy","isMut":false,"isSigner":false},{"name":"clendGroup","isMut":false,"isSigner":false},{"name":"clendAccount","isMut":true,"isSigner":false},{"name":"clendBank","isMut":true,"isSigner":false},{"name":"clendBankLiquidityVault","isMut":true,"isSigner":false},{"name":"clendBankLiquidityVaultAuthority","isMut":true,"isSigner":false},{"name":"clendOracle","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"clendProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ClendSupplyStrategyWithdrawArgs"}}]},{"name":"chestStrategyInit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"assetTokenAccount","isMut":false,"isSigner":false},{"name":"chest","isMut":false,"isSigner":false},{"name":"coinTokenAccount","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyInitArgs"}}]},{"name":"chestStrategyDeposit","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"chest","isMut":true,"isSigner":false},{"name":"coin","isMut":true,"isSigner":false},{"name":"chestAssetReserve","isMut":true,"isSigner":false},{"name":"driftVault","isMut":true,"isSigner":false},{"name":"driftVaultDepositor","isMut":true,"isSigner":false},{"name":"driftVaultTokenAccount","isMut":true,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"driftUserStats","isMut":true,"isSigner":false},{"name":"driftSpotMarket","isMut":true,"isSigner":false},{"name":"driftSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftState","isMut":true,"isSigner":false},{"name":"vaultAssetTokenAccount","isMut":true,"isSigner":false},{"name":"vaultCoinTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"chestProgram","isMut":false,"isSigner":false},{"name":"driftProgram","isMut":false,"isSigner":false},{"name":"driftVaultsProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyDepositArgs"}}]},{"name":"chestStrategyRequestWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"chest","isMut":true,"isSigner":false},{"name":"coin","isMut":true,"isSigner":false},{"name":"chestCoinReserve","isMut":true,"isSigner":false},{"name":"redemptionRequest","isMut":true,"isSigner":false},{"name":"driftVault","isMut":true,"isSigner":false},{"name":"driftVaultDepositor","isMut":true,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"assetDestination","isMut":false,"isSigner":false},{"name":"vaultCoinTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"chestProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyRequestWithdrawArgs"}}]},{"name":"chestStrategyWithdraw","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"vaultAssetAta","isMut":true,"isSigner":false},{"name":"strategyAssetTokenAccount","isMut":true,"isSigner":false},{"name":"chest","isMut":true,"isSigner":false},{"name":"chestRedemptionRequest","isMut":false,"isSigner":false},{"name":"coin","isMut":true,"isSigner":false},{"name":"vaultCoinTokenAccount","isMut":true,"isSigner":false},{"name":"driftVault","isMut":true,"isSigner":false},{"name":"driftVaultDepositor","isMut":true,"isSigner":false},{"name":"driftUser","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"chestProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ChestStrategyWithdrawArgs"}}]},{"name":"updateSwitchboardOraclePrice","accounts":[{"name":"vault","isMut":true,"isSigner":false},{"name":"shares","isMut":false,"isSigner":false},{"name":"feed","isMut":true,"isSigner":false},{"name":"queue","isMut":false,"isSigner":false},{"name":"programState","isMut":false,"isSigner":false},{"name":"recentSlothashes","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"switchboardOnDemandProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"logProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Vault","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"shares","type":"publicKey"},{"name":"fee","type":{"defined":"Fee"}},{"name":"paused","type":"bool"},{"name":"assetIndex","type":"u16"},{"name":"strategyIndex","type":"u16"},{"name":"assets","type":{"vec":{"defined":"Asset"}}},{"name":"strategies","type":{"vec":{"defined":"StrategyRecord"}}}]}},{"name":"Strategy","type":{"kind":"struct","fields":[{"name":"metadata","type":{"defined":"StrategyMetadata"}},{"name":"strategyType","type":{"defined":"StrategyType"}}]}}],"types":[{"name":"ChestStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"failOnLowBalance","type":"bool"},{"name":"preserveRecordedBalance","type":"bool"}]}},{"name":"ChestStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"ChestStrategyRequestWithdrawArgs","type":{"kind":"struct","fields":[{"name":"assetAmount","type":"u64"}]}},{"name":"ChestStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"failOnLowBalance","type":"bool"},{"name":"preserveRecordedBalance","type":"bool"}]}},{"name":"ClendSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"ClendSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"ClendSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftInsuranceFundStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"driftMarketIndex","type":"u16"}]}},{"name":"DriftInsuranceFundStrategyStakeArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftInsuranceFundStrategyUnstakeArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DriftSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"driftSubAccountId","type":"u16"},{"name":"driftMarketIndex","type":"u16"}]}},{"name":"DriftSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"InitVaultArgs","type":{"kind":"struct","fields":[{"name":"redemptionFeeBps","type":"u16"},{"name":"managementFeeBps","type":"u16"},{"name":"performanceFeeBps","type":"u16"}]}},{"name":"IssueArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"KlendSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"KlendSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"KlendSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MangoSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MangoSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"MangoSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MarginfiSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"MarginfiSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"MarginfiSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"PauseVaultArgs","type":{"kind":"struct","fields":[{"name":"paused","type":"bool"}]}},{"name":"RedeemArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"SolendSupplyStrategyDepositArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"SolendSupplyStrategyInitArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"}]}},{"name":"SolendSupplyStrategyWithdrawArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"UpdateAssetArgs","type":{"kind":"struct","fields":[{"name":"assetId","type":"u16"},{"name":"assetNewOracle","type":"publicKey"}]}},{"name":"UpdateFeeArgs","type":{"kind":"struct","fields":[{"name":"newRedemptionFeeBps","type":{"option":"u16"}},{"name":"newManagementFeeBps","type":{"option":"u16"}},{"name":"newPerformanceFeeBps","type":{"option":"u16"}}]}},{"name":"UpdateStrategyArgs","type":{"kind":"struct","fields":[{"name":"newStrategyType","type":{"defined":"StrategyType"}}]}},{"name":"Asset","type":{"kind":"struct","fields":[{"name":"assetId","type":"u16"},{"name":"mint","type":"publicKey"},{"name":"decimals","type":"u8"},{"name":"ata","type":"publicKey"},{"name":"oracle","type":"publicKey"}]}},{"name":"StrategyRecord","type":{"kind":"struct","fields":[{"name":"strategyId","type":"u16"},{"name":"assetId","type":"u16"},{"name":"balance","type":"u64"},{"name":"netEarnings","type":"i64"}]}},{"name":"StrategyMetadata","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"strategyId","type":"u16"},{"name":"assetMint","type":"publicKey"},{"name":"vault","type":"publicKey"}]}},{"name":"Fee","type":{"kind":"struct","fields":[{"name":"redemptionFeeBps","type":"u16"},{"name":"redemptionFeeAccumulated","type":"u64"},{"name":"managementFeeBps","type":"u16"},{"name":"managementFeeLastUpdate","type":"i64"},{"name":"managementFeeAccumulated","type":"u64"},{"name":"performanceFeeBps","type":"u16"}]}},{"name":"IssueEvent","type":{"kind":"struct","fields":[{"name":"depositor","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"sharesMinted","type":"u64"},{"name":"managementFee","type":"u64"},{"name":"tvl","type":"u128"}]}},{"name":"RedeemEvent","type":{"kind":"struct","fields":[{"name":"withdrawer","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"sharesBurned","type":"u64"},{"name":"redemptionFee","type":"u64"},{"name":"managementFee","type":"u64"},{"name":"tvl","type":"u128"}]}},{"name":"StrategyDepositEvent","type":{"kind":"struct","fields":[{"name":"strategy","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"depositAmount","type":"u64"},{"name":"netEarnings","type":"i64"},{"name":"strategyBalance","type":"u64"}]}},{"name":"StrategyWithdrawEvent","type":{"kind":"struct","fields":[{"name":"strategy","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"withdrawAmount","type":"u64"},{"name":"netEarnings","type":"i64"},{"name":"strategyBalance","type":"u64"}]}},{"name":"StrategyClaimEmissionsEvent","type":{"kind":"struct","fields":[{"name":"strategy","type":"publicKey"},{"name":"mint","type":"publicKey"}]}},{"name":"DistributeVaultFeesEvent","type":{"kind":"struct","fields":[{"name":"managementFeeAmountDistributed","type":"u64"},{"name":"performanceFeeAmountDistributed","type":"u64"},{"name":"redemptionFeeAmountDistributed","type":"u64"}]}},{"name":"UpdateSwitchboardOraclePriceEvent","type":{"kind":"struct","fields":[{"name":"vaultNav","type":"i128"},{"name":"vaultTvl","type":"u128"},{"name":"sharesSupply","type":"u64"}]}},{"name":"StrategyType","type":{"kind":"enum","variants":[{"name":"MarginfiSupply","fields":[{"name":"account","type":"publicKey"},{"name":"group","type":"publicKey"},{"name":"bank","type":"publicKey"},{"name":"bankLiquidityVault","type":"publicKey"},{"name":"bankLiquidityVaultAuthority","type":"publicKey"},{"name":"oracle","type":"publicKey"}]},{"name":"KlendSupply","fields":[{"name":"reserve","type":"publicKey"},{"name":"reserveCollateralMint","type":"publicKey"},{"name":"reserveLiquiditySupply","type":"publicKey"},{"name":"reserveDestinationDepositCollateral","type":"publicKey"},{"name":"reserveFarmState","type":"publicKey"},{"name":"lendingMarket","type":"publicKey"},{"name":"oracle","type":"publicKey"},{"name":"scopePrices","type":"publicKey"}]},{"name":"SolendSupply","fields":[{"name":"reserve","type":"publicKey"},{"name":"reserveCollateralMint","type":"publicKey"},{"name":"reserveLiquiditySupply","type":"publicKey"},{"name":"depositCollateralAta","type":"publicKey"},{"name":"lendingMarket","type":"publicKey"},{"name":"lendingMarketAuthority","type":"publicKey"},{"name":"pythOracle","type":"publicKey"},{"name":"switchboardOracle","type":"publicKey"}]},{"name":"MangoSupply","fields":[{"name":"group","type":"publicKey"},{"name":"account","type":"publicKey"},{"name":"bank","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"pythOracle","type":"publicKey"},{"name":"switchboardOracle","type":"publicKey"}]},{"name":"DriftSupply","fields":[{"name":"state","type":"publicKey"},{"name":"signer","type":"publicKey"},{"name":"spotMarket","type":"publicKey"},{"name":"spotMarketVault","type":"publicKey"},{"name":"perpMarket","type":"publicKey"},{"name":"spotPythOracle","type":"publicKey"},{"name":"perpPythOracle","type":"publicKey"},{"name":"subAccountId","type":"u16"},{"name":"marketIndex","type":"u16"}]},{"name":"DriftInsuranceFund","fields":[{"name":"state","type":"publicKey"},{"name":"spotMarket","type":"publicKey"},{"name":"spotMarketVault","type":"publicKey"},{"name":"marketIndex","type":"u16"}]},{"name":"Chest","fields":[{"name":"chest","type":"publicKey"},{"name":"coin","type":"publicKey"},{"name":"driftVault","type":"publicKey"},{"name":"coinTokenAccount","type":"publicKey"},{"name":"assetDestination","type":"publicKey"},{"name":"redemptionRequest","type":{"option":"publicKey"}},{"name":"spotMarketIndex","type":"u16"}]},{"name":"ClendSupply","fields":[{"name":"account","type":"publicKey"},{"name":"group","type":"publicKey"},{"name":"bank","type":"publicKey"},{"name":"bankLiquidityVault","type":"publicKey"},{"name":"bankLiquidityVaultAuthority","type":"publicKey"},{"name":"oracle","type":"publicKey"}]}]}},{"name":"StrategyTypeSelection","type":{"kind":"enum","variants":[{"name":"MarginfiSupply"},{"name":"KlendSupply"},{"name":"SolendSupply"},{"name":"MangoSupply"},{"name":"DriftSupply"},{"name":"DriftInsuranceFund"},{"name":"Chest"},{"name":"ClendSupply"}]}},{"name":"CarrotEvent","type":{"kind":"enum","variants":[{"name":"Issue","fields":[{"defined":"IssueEvent"}]},{"name":"Redeem","fields":[{"defined":"RedeemEvent"}]},{"name":"StrategyDeposit","fields":[{"defined":"StrategyDepositEvent"}]},{"name":"StrategyWithdraw","fields":[{"defined":"StrategyWithdrawEvent"}]},{"name":"StrategyClaimEmissions","fields":[{"defined":"StrategyClaimEmissionsEvent"}]},{"name":"DistributeVaultFees","fields":[{"defined":"DistributeVaultFeesEvent"}]},{"name":"UpdateSwitchboardOraclePrice","fields":[{"defined":"UpdateSwitchboardOraclePriceEvent"}]}]}},{"name":"RoundingMode","type":{"kind":"enum","variants":[{"name":"RoundUp"},{"name":"RoundDown"},{"name":"Avg"}]}}],"errors":[{"code":6000,"name":"AssetAlreadyExists","msg":"Asset Already Exists"},{"code":6001,"name":"AssetNotFound","msg":"Asset Not Found"},{"code":6002,"name":"OracleNotFound","msg":"Oracle Not Found"},{"code":6003,"name":"OracleStalePrice","msg":"Oracle Returned Stale Price"},{"code":6004,"name":"StrategyNotFound","msg":"Strategy Not Found"},{"code":6005,"name":"AtaNotFound","msg":"Ata Not Found"},{"code":6006,"name":"StrategyAlreadyExists","msg":"Strategy Already Exists"},{"code":6007,"name":"InvalidStrategyType","msg":"Invalid Strategy Type"},{"code":6008,"name":"StrategyBalanceCalculationError","msg":"Strategy Balance Calculation Error"},{"code":6009,"name":"VaultIsPaused","msg":"Vault is Paused"},{"code":6010,"name":"InvalidVaultAuthority","msg":"Invalid Vault Authority"},{"code":6011,"name":"MigrationError","msg":"Account Migration Error"},{"code":6012,"name":"InvalidPriceConf","msg":"Invalid Price Confidence Interval"},{"code":6013,"name":"InvalidStrategyAccounts","msg":"Invalid Strategy Accounts"},{"code":6014,"name":"StrategyNotEmpty","msg":"Strategy Not Empty"},{"code":6015,"name":"AssetNotEmpty","msg":"Asset Not Empty"},{"code":6016,"name":"InvalidFeeBps","msg":"Invalid Fee Bps"},{"code":6017,"name":"InvalidReturnData","msg":"Invalid Return Data"},{"code":6018,"name":"InvalidCoinSupply","msg":"Invalid Coin Supply"},{"code":6019,"name":"InvalidNav","msg":"Invalid NAV"},{"code":6020,"name":"MathError","msg":"Math Error"},{"code":6021,"name":"ChestLowBalance","msg":"Chest Low Balance"}]} \ No newline at end of file diff --git a/idls/cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json b/idls/cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json new file mode 100644 index 0000000..1c7342c --- /dev/null +++ b/idls/cctp_v1.CCTPiPYPc6AsJuwueEnWgSgucamXDZwBd53dQ11YiKX3.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"token_messenger_minter","instructions":[{"name":"initialize","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"upgradeAuthority","isMut":false,"isSigner":true},{"name":"authorityPda","isMut":false,"isSigner":false},{"name":"tokenMessenger","isMut":true,"isSigner":false},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"tokenMessengerMinterProgramData","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitializeParams"}}]},{"name":"transferOwnership","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TransferOwnershipParams"}}]},{"name":"acceptOwnership","accounts":[{"name":"pendingOwner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AcceptOwnershipParams"}}]},{"name":"addRemoteTokenMessenger","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddRemoteTokenMessengerParams"}}]},{"name":"removeRemoteTokenMessenger","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RemoveRemoteTokenMessengerParams"}}]},{"name":"depositForBurn","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"eventRentPayer","isMut":true,"isSigner":true},{"name":"senderAuthorityPda","isMut":false,"isSigner":false},{"name":"burnTokenAccount","isMut":true,"isSigner":false},{"name":"messageTransmitter","isMut":true,"isSigner":false},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"burnTokenMint","isMut":true,"isSigner":false},{"name":"messageSentEventData","isMut":true,"isSigner":true},{"name":"messageTransmitterProgram","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DepositForBurnParams"}}],"returns":"u64"},{"name":"depositForBurnWithCaller","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"eventRentPayer","isMut":true,"isSigner":true},{"name":"senderAuthorityPda","isMut":false,"isSigner":false},{"name":"burnTokenAccount","isMut":true,"isSigner":false},{"name":"messageTransmitter","isMut":true,"isSigner":false},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"burnTokenMint","isMut":true,"isSigner":false},{"name":"messageSentEventData","isMut":true,"isSigner":true},{"name":"messageTransmitterProgram","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DepositForBurnWithCallerParams"}}],"returns":"u64"},{"name":"replaceDepositForBurn","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"eventRentPayer","isMut":true,"isSigner":true},{"name":"senderAuthorityPda","isMut":false,"isSigner":false},{"name":"messageTransmitter","isMut":true,"isSigner":false},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"messageSentEventData","isMut":true,"isSigner":true},{"name":"messageTransmitterProgram","isMut":false,"isSigner":false},{"name":"tokenMessengerMinterProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ReplaceDepositForBurnParams"}}],"returns":"u64"},{"name":"handleReceiveMessage","accounts":[{"name":"authorityPda","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"remoteTokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"tokenPair","isMut":false,"isSigner":false},{"name":"recipientTokenAccount","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"HandleReceiveMessageParams"}}]},{"name":"setTokenController","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetTokenControllerParams"}}]},{"name":"pause","accounts":[{"name":"pauser","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PauseParams"}}]},{"name":"unpause","accounts":[{"name":"pauser","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UnpauseParams"}}]},{"name":"updatePauser","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"tokenMessenger","isMut":false,"isSigner":false},{"name":"tokenMinter","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdatePauserParams"}}]},{"name":"setMaxBurnAmountPerMessage","accounts":[{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetMaxBurnAmountPerMessageParams"}}]},{"name":"addLocalToken","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"localTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddLocalTokenParams"}}]},{"name":"removeLocalToken","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RemoveLocalTokenParams"}}]},{"name":"linkTokenPair","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"tokenPair","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LinkTokenPairParams"}}]},{"name":"unlinkTokenPair","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"tokenPair","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UninkTokenPairParams"}}]},{"name":"burnTokenCustody","accounts":[{"name":"payee","isMut":true,"isSigner":true},{"name":"tokenController","isMut":false,"isSigner":true},{"name":"tokenMinter","isMut":false,"isSigner":false},{"name":"localToken","isMut":false,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"custodyTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"BurnTokenCustodyParams"}}]}],"accounts":[{"name":"TokenMessenger","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pendingOwner","type":"publicKey"},{"name":"localMessageTransmitter","type":"publicKey"},{"name":"messageBodyVersion","type":"u32"},{"name":"authorityBump","type":"u8"}]}},{"name":"RemoteTokenMessenger","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"tokenMessenger","type":"publicKey"}]}},{"name":"TokenMinter","type":{"kind":"struct","fields":[{"name":"tokenController","type":"publicKey"},{"name":"pauser","type":"publicKey"},{"name":"paused","type":"bool"},{"name":"bump","type":"u8"}]}},{"name":"TokenPair","type":{"kind":"struct","fields":[{"name":"remoteDomain","type":"u32"},{"name":"remoteToken","type":"publicKey"},{"name":"localToken","type":"publicKey"},{"name":"bump","type":"u8"}]}},{"name":"LocalToken","type":{"kind":"struct","fields":[{"name":"custody","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"burnLimitPerMessage","type":"u64"},{"name":"messagesSent","type":"u64"},{"name":"messagesReceived","type":"u64"},{"name":"amountSent","type":"u128"},{"name":"amountReceived","type":"u128"},{"name":"bump","type":"u8"},{"name":"custodyBump","type":"u8"}]}}],"types":[{"name":"AcceptOwnershipParams","type":{"kind":"struct","fields":[]}},{"name":"AddRemoteTokenMessengerParams","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"tokenMessenger","type":"publicKey"}]}},{"name":"DepositForBurnWithCallerParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destinationDomain","type":"u32"},{"name":"mintRecipient","type":"publicKey"},{"name":"destinationCaller","type":"publicKey"}]}},{"name":"DepositForBurnParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destinationDomain","type":"u32"},{"name":"mintRecipient","type":"publicKey"}]}},{"name":"HandleReceiveMessageParams","type":{"kind":"struct","fields":[{"name":"remoteDomain","type":"u32"},{"name":"sender","type":"publicKey"},{"name":"messageBody","type":"bytes"},{"name":"authorityBump","type":"u8"}]}},{"name":"InitializeParams","type":{"kind":"struct","fields":[{"name":"tokenController","type":"publicKey"},{"name":"localMessageTransmitter","type":"publicKey"},{"name":"messageBodyVersion","type":"u32"}]}},{"name":"RemoveRemoteTokenMessengerParams","type":{"kind":"struct","fields":[]}},{"name":"ReplaceDepositForBurnParams","type":{"kind":"struct","fields":[{"name":"originalMessage","type":"bytes"},{"name":"originalAttestation","type":"bytes"},{"name":"newDestinationCaller","type":"publicKey"},{"name":"newMintRecipient","type":"publicKey"}]}},{"name":"TransferOwnershipParams","type":{"kind":"struct","fields":[{"name":"newOwner","type":"publicKey"}]}},{"name":"AddLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"BurnTokenCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"LinkTokenPairParams","type":{"kind":"struct","fields":[{"name":"localToken","type":"publicKey"},{"name":"remoteDomain","type":"u32"},{"name":"remoteToken","type":"publicKey"}]}},{"name":"PauseParams","type":{"kind":"struct","fields":[]}},{"name":"RemoveLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"SetMaxBurnAmountPerMessageParams","type":{"kind":"struct","fields":[{"name":"burnLimitPerMessage","type":"u64"}]}},{"name":"SetTokenControllerParams","type":{"kind":"struct","fields":[{"name":"tokenController","type":"publicKey"}]}},{"name":"UninkTokenPairParams","type":{"kind":"struct","fields":[]}},{"name":"UnpauseParams","type":{"kind":"struct","fields":[]}},{"name":"UpdatePauserParams","type":{"kind":"struct","fields":[{"name":"newPauser","type":"publicKey"}]}},{"name":"TokenMinterError","type":{"kind":"enum","variants":[{"name":"InvalidAuthority"},{"name":"InvalidTokenMinterState"},{"name":"ProgramPaused"},{"name":"InvalidTokenPairState"},{"name":"InvalidLocalTokenState"},{"name":"InvalidPauser"},{"name":"InvalidTokenController"},{"name":"BurnAmountExceeded"},{"name":"InvalidAmount"}]}}],"events":[{"name":"OwnershipTransferStarted","fields":[{"name":"previousOwner","type":"publicKey","index":false},{"name":"newOwner","type":"publicKey","index":false}]},{"name":"OwnershipTransferred","fields":[{"name":"previousOwner","type":"publicKey","index":false},{"name":"newOwner","type":"publicKey","index":false}]},{"name":"DepositForBurn","fields":[{"name":"nonce","type":"u64","index":false},{"name":"burnToken","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"depositor","type":"publicKey","index":false},{"name":"mintRecipient","type":"publicKey","index":false},{"name":"destinationDomain","type":"u32","index":false},{"name":"destinationTokenMessenger","type":"publicKey","index":false},{"name":"destinationCaller","type":"publicKey","index":false}]},{"name":"MintAndWithdraw","fields":[{"name":"mintRecipient","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"mintToken","type":"publicKey","index":false}]},{"name":"RemoteTokenMessengerAdded","fields":[{"name":"domain","type":"u32","index":false},{"name":"tokenMessenger","type":"publicKey","index":false}]},{"name":"RemoteTokenMessengerRemoved","fields":[{"name":"domain","type":"u32","index":false},{"name":"tokenMessenger","type":"publicKey","index":false}]},{"name":"SetTokenController","fields":[{"name":"tokenController","type":"publicKey","index":false}]},{"name":"PauserChanged","fields":[{"name":"newAddress","type":"publicKey","index":false}]},{"name":"SetBurnLimitPerMessage","fields":[{"name":"token","type":"publicKey","index":false},{"name":"burnLimitPerMessage","type":"u64","index":false}]},{"name":"LocalTokenAdded","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false}]},{"name":"LocalTokenRemoved","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false}]},{"name":"TokenPairLinked","fields":[{"name":"localToken","type":"publicKey","index":false},{"name":"remoteDomain","type":"u32","index":false},{"name":"remoteToken","type":"publicKey","index":false}]},{"name":"TokenPairUnlinked","fields":[{"name":"localToken","type":"publicKey","index":false},{"name":"remoteDomain","type":"u32","index":false},{"name":"remoteToken","type":"publicKey","index":false}]},{"name":"Pause","fields":[]},{"name":"Unpause","fields":[]},{"name":"TokenCustodyBurned","fields":[{"name":"custodyTokenAccount","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"InvalidAuthority","msg":"Invalid authority"},{"code":6001,"name":"InvalidTokenMessengerState","msg":"Invalid token messenger state"},{"code":6002,"name":"InvalidTokenMessenger","msg":"Invalid token messenger"},{"code":6003,"name":"InvalidOwner","msg":"Invalid owner"},{"code":6004,"name":"MalformedMessage","msg":"Malformed message"},{"code":6005,"name":"InvalidMessageBodyVersion","msg":"Invalid message body version"},{"code":6006,"name":"InvalidAmount","msg":"Invalid amount"},{"code":6007,"name":"InvalidDestinationDomain","msg":"Invalid destination domain"},{"code":6008,"name":"InvalidDestinationCaller","msg":"Invalid destination caller"},{"code":6009,"name":"InvalidMintRecipient","msg":"Invalid mint recipient"},{"code":6010,"name":"InvalidSender","msg":"Invalid sender"},{"code":6011,"name":"InvalidTokenPair","msg":"Invalid token pair"},{"code":6012,"name":"InvalidTokenMint","msg":"Invalid token mint"}]} \ No newline at end of file diff --git a/idls/cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json b/idls/cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json new file mode 100644 index 0000000..168bde5 --- /dev/null +++ b/idls/cctp_v2.CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe.json @@ -0,0 +1 @@ +{"address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe","metadata":{"name":"token_messenger_minter_v2","version":"0.2.0","spec":"0.1.0","description":"Token Messenger and Minter for Cross-Chain Transfer Protocol V2","repository":"https://github.com/circlefin/solana-cctp-contracts"},"instructions":[{"name":"accept_ownership","discriminator":[172,23,43,13,238,213,85,150],"accounts":[{"name":"pending_owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"AcceptOwnershipParams"}}}]},{"name":"add_local_token","discriminator":[213,199,205,18,98,124,73,198],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token_mint"}]}},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token_mint"}]}},{"name":"local_token_mint"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"AddLocalTokenParams"}}}]},{"name":"add_remote_token_messenger","discriminator":[12,149,172,165,111,202,24,33],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"remote_token_messenger","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,109,111,116,101,95,116,111,107,101,110,95,109,101,115,115,101,110,103,101,114]},{"kind":"arg","path":"params.domain"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"AddRemoteTokenMessengerParams"}}}]},{"name":"burn_token_custody","discriminator":[233,136,180,175,112,41,62,71],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_mint","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"BurnTokenCustodyParams"}}}]},{"name":"denylist_account","discriminator":[101,116,197,112,81,249,75,194],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"denylister","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"denylist_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"arg","path":"params.account"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"DenylistParams"}}}]},{"name":"deposit_for_burn","discriminator":[215,60,61,46,114,55,128,176],"accounts":[{"name":"owner","signer":true,"relations":["burn_token_account"]},{"name":"event_rent_payer","writable":true,"signer":true},{"name":"sender_authority_pda","pda":{"seeds":[{"kind":"const","value":[115,101,110,100,101,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"burn_token_account","writable":true},{"name":"denylist_account","docs":["Account is denylisted if the account exists at the expected PDA."],"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"owner"}]}},{"name":"message_transmitter","writable":true},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"burn_token_mint"}]}},{"name":"burn_token_mint","writable":true},{"name":"message_sent_event_data","writable":true,"signer":true},{"name":"message_transmitter_program","address":"CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC"},{"name":"token_messenger_minter_program","address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"DepositForBurnParams"}}}]},{"name":"deposit_for_burn_with_hook","discriminator":[111,245,62,131,204,108,223,155],"accounts":[{"name":"owner","signer":true,"relations":["burn_token_account"]},{"name":"event_rent_payer","writable":true,"signer":true},{"name":"sender_authority_pda","pda":{"seeds":[{"kind":"const","value":[115,101,110,100,101,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"burn_token_account","writable":true},{"name":"denylist_account","docs":["Account is denylisted if the account exists at the expected PDA."],"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"owner"}]}},{"name":"message_transmitter","writable":true},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"burn_token_mint"}]}},{"name":"burn_token_mint","writable":true},{"name":"message_sent_event_data","writable":true,"signer":true},{"name":"message_transmitter_program","address":"CCTPV2Sm4AdWt5296sk4P66VBZ7bEhcARwFaaS9YPbeC"},{"name":"token_messenger_minter_program","address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"DepositForBurnWithHookParams"}}}]},{"name":"handle_receive_finalized_message","discriminator":[186,252,239,70,86,180,110,95],"accounts":[{"name":"authority_pda","signer":true,"pda":{"seeds":[{"kind":"const","value":[109,101,115,115,97,103,101,95,116,114,97,110,115,109,105,116,116,101,114,95,97,117,116,104,111,114,105,116,121]},{"kind":"const","value":[166,95,200,29,15,239,168,134,12,179,184,63,8,155,2,36,190,138,102,135,183,174,73,245,148,192,185,180,215,233,56,147]}],"program":{"kind":"const","value":[166,95,200,28,225,158,220,210,210,195,64,176,47,166,27,225,213,186,221,225,89,40,51,221,249,32,9,216,207,104,84,85]}}},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_pair"},{"name":"fee_recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_messenger.fee_recipient","account":"TokenMessenger"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient_token_account","writable":true},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"HandleReceiveMessageParams"}}}]},{"name":"handle_receive_unfinalized_message","discriminator":[200,169,175,20,200,58,182,61],"accounts":[{"name":"authority_pda","signer":true,"pda":{"seeds":[{"kind":"const","value":[109,101,115,115,97,103,101,95,116,114,97,110,115,109,105,116,116,101,114,95,97,117,116,104,111,114,105,116,121]},{"kind":"const","value":[166,95,200,29,15,239,168,134,12,179,184,63,8,155,2,36,190,138,102,135,183,174,73,245,148,192,185,180,215,233,56,147]}],"program":{"kind":"const","value":[166,95,200,28,225,158,220,210,210,195,64,176,47,166,27,225,213,186,221,225,89,40,51,221,249,32,9,216,207,104,84,85]}}},{"name":"token_messenger"},{"name":"remote_token_messenger"},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_pair"},{"name":"fee_recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_messenger.fee_recipient","account":"TokenMessenger"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient_token_account","writable":true},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"HandleReceiveMessageParams"}}}]},{"name":"initialize","discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"authority_pda","pda":{"seeds":[{"kind":"const","value":[115,101,110,100,101,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_messenger","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,109,101,115,115,101,110,103,101,114]}]}},{"name":"token_minter","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,109,105,110,116,101,114]}]}},{"name":"token_messenger_minter_program_data"},{"name":"token_messenger_minter_program","address":"CCTPV2vPZJS2u2BBsUoscuikbYjnpFmbFsvVuJdgUMQe"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"InitializeParams"}}}]},{"name":"link_token_pair","discriminator":[68,162,24,104,125,46,130,12],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"token_pair","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,112,97,105,114]},{"kind":"arg","path":"params.remote_domain"},{"kind":"arg","path":"params.remote_token"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"LinkTokenPairParams"}}}]},{"name":"pause","discriminator":[211,22,221,251,74,121,193,47],"accounts":[{"name":"pauser","signer":true,"relations":["token_minter"]},{"name":"token_minter","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":"params","type":{"defined":{"name":"PauseParams"}}}]},{"name":"remove_local_token","discriminator":[27,43,66,170,188,44,109,97],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,117,115,116,111,100,121]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"name":"custody_token_mint","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"params","type":{"defined":{"name":"RemoveLocalTokenParams"}}}]},{"name":"remove_remote_token_messenger","discriminator":[65,114,66,85,169,98,177,146],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"remote_token_messenger","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,109,111,116,101,95,116,111,107,101,110,95,109,101,115,115,101,110,103,101,114]},{"kind":"account","path":"remote_token_messenger.domain","account":"RemoteTokenMessenger"}]}},{"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":"params","type":{"defined":{"name":"RemoveRemoteTokenMessengerParams"}}}]},{"name":"set_fee_recipient","discriminator":[227,18,215,42,237,246,151,66],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"SetFeeRecipientParams"}}}]},{"name":"set_max_burn_amount_per_message","discriminator":[30,128,145,240,70,237,109,207],"accounts":[{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"local_token","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,97,108,95,116,111,107,101,110]},{"kind":"account","path":"local_token.mint","account":"LocalToken"}]}},{"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":"params","type":{"defined":{"name":"SetMaxBurnAmountPerMessageParams"}}}]},{"name":"set_min_fee","discriminator":[114,198,35,3,41,196,194,246],"accounts":[{"name":"min_fee_controller","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"SetMinFeeParams"}}}]},{"name":"set_min_fee_controller","discriminator":[195,142,74,84,234,94,180,113],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"SetMinFeeControllerParams"}}}]},{"name":"set_token_controller","discriminator":[88,6,98,10,79,59,15,24],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"token_minter","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":"params","type":{"defined":{"name":"SetTokenControllerParams"}}}]},{"name":"transfer_ownership","discriminator":[65,177,215,73,53,45,99,47],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"TransferOwnershipParams"}}}]},{"name":"undenylist_account","discriminator":[57,36,43,168,62,172,33,39],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"denylister","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"denylist_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,110,121,108,105,115,116,95,97,99,99,111,117,110,116]},{"kind":"arg","path":"params.account"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"UndenylistParams"}}}]},{"name":"unlink_token_pair","discriminator":[52,198,100,114,104,174,85,58],"accounts":[{"name":"payee","writable":true,"signer":true},{"name":"token_controller","signer":true,"relations":["token_minter"]},{"name":"token_minter"},{"name":"token_pair","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,112,97,105,114]},{"kind":"account","path":"token_pair.remote_domain","account":"TokenPair"},{"kind":"account","path":"token_pair.remote_token","account":"TokenPair"}]}},{"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":"params","type":{"defined":{"name":"UninkTokenPairParams"}}}]},{"name":"unpause","discriminator":[169,144,4,38,10,141,188,255],"accounts":[{"name":"pauser","signer":true,"relations":["token_minter"]},{"name":"token_minter","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":"params","type":{"defined":{"name":"UnpauseParams"}}}]},{"name":"update_denylister","discriminator":[193,66,198,201,84,57,14,222],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger","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":"params","type":{"defined":{"name":"UpdateDenylisterParams"}}}]},{"name":"update_pauser","discriminator":[140,171,211,132,57,201,16,254],"accounts":[{"name":"owner","signer":true,"relations":["token_messenger"]},{"name":"token_messenger"},{"name":"token_minter","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":"params","type":{"defined":{"name":"UpdatePauserParams"}}}]}],"accounts":[{"name":"DenylistedAccount","discriminator":[186,58,212,239,102,131,157,146]},{"name":"LocalToken","discriminator":[159,131,58,170,193,84,128,182]},{"name":"MessageTransmitter","discriminator":[71,40,180,142,19,203,35,252]},{"name":"RemoteTokenMessenger","discriminator":[105,115,174,34,95,233,138,252]},{"name":"TokenMessenger","discriminator":[162,4,242,52,147,243,221,96]},{"name":"TokenMinter","discriminator":[122,133,84,63,57,159,171,206]},{"name":"TokenPair","discriminator":[17,214,45,176,229,149,197,71]}],"events":[{"name":"Denylisted","discriminator":[20,145,173,200,182,17,234,154]},{"name":"DenylisterChanged","discriminator":[249,170,81,180,185,175,138,72]},{"name":"DepositForBurn","discriminator":[144,252,145,146,6,74,167,235]},{"name":"FeeRecipientSet","discriminator":[99,140,80,35,245,176,179,110]},{"name":"LocalTokenAdded","discriminator":[146,8,224,150,122,173,23,39]},{"name":"LocalTokenRemoved","discriminator":[181,204,1,95,2,50,66,210]},{"name":"MinFeeControllerSet","discriminator":[239,12,122,105,231,114,13,196]},{"name":"MinFeeSet","discriminator":[60,127,101,230,216,129,188,98]},{"name":"MintAndWithdraw","discriminator":[75,67,229,70,162,126,0,71]},{"name":"OwnershipTransferStarted","discriminator":[183,253,239,246,140,179,133,105]},{"name":"OwnershipTransferred","discriminator":[172,61,205,183,250,50,38,98]},{"name":"Pause","discriminator":[194,251,232,196,118,95,111,219]},{"name":"PauserChanged","discriminator":[142,157,158,87,127,8,119,55]},{"name":"RemoteTokenMessengerAdded","discriminator":[251,29,63,244,48,114,210,175]},{"name":"RemoteTokenMessengerRemoved","discriminator":[255,121,137,39,230,125,11,30]},{"name":"SetBurnLimitPerMessage","discriminator":[98,152,88,191,245,30,27,209]},{"name":"SetTokenController","discriminator":[193,44,243,83,230,72,120,216]},{"name":"TokenCustodyBurned","discriminator":[219,143,107,226,67,75,178,46]},{"name":"TokenPairLinked","discriminator":[2,14,177,64,155,93,196,141]},{"name":"TokenPairUnlinked","discriminator":[78,232,230,208,180,212,246,72]},{"name":"UnDenylisted","discriminator":[150,39,227,20,162,180,5,242]},{"name":"Unpause","discriminator":[241,149,104,90,199,136,219,146]}],"errors":[{"code":6000,"name":"InvalidAuthority","msg":"Invalid authority"},{"code":6001,"name":"InvalidTokenMinterState","msg":"Invalid token minter state"},{"code":6002,"name":"ProgramPaused","msg":"Instruction is not allowed at this time"},{"code":6003,"name":"InvalidTokenPairState","msg":"Invalid token pair state"},{"code":6004,"name":"InvalidLocalTokenState","msg":"Invalid local token state"},{"code":6005,"name":"InvalidPauser","msg":"Invalid pauser"},{"code":6006,"name":"InvalidTokenController","msg":"Invalid token controller"},{"code":6007,"name":"BurnAmountExceeded","msg":"Burn amount exceeded"},{"code":6008,"name":"InvalidAmount","msg":"Invalid amount"}],"types":[{"name":"AcceptOwnershipParams","type":{"kind":"struct","fields":[]}},{"name":"AddLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"AddRemoteTokenMessengerParams","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"BurnTokenCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"DenylistParams","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"Denylisted","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"DenylistedAccount","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"DenylisterChanged","type":{"kind":"struct","fields":[{"name":"old_denylister","type":"pubkey"},{"name":"new_denylister","type":"pubkey"}]}},{"name":"DepositForBurn","type":{"kind":"struct","fields":[{"name":"burn_token","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"depositor","type":"pubkey"},{"name":"mint_recipient","type":"pubkey"},{"name":"destination_domain","type":"u32"},{"name":"destination_token_messenger","type":"pubkey"},{"name":"destination_caller","type":"pubkey"},{"name":"max_fee","type":"u64"},{"name":"min_finality_threshold","type":"u32"},{"name":"hook_data","type":"bytes"}]}},{"name":"DepositForBurnParams","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destination_domain","type":"u32"},{"name":"mint_recipient","type":"pubkey"},{"name":"destination_caller","type":"pubkey"},{"name":"max_fee","type":"u64"},{"name":"min_finality_threshold","type":"u32"}]}},{"name":"DepositForBurnWithHookParams","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"destination_domain","type":"u32"},{"name":"mint_recipient","type":"pubkey"},{"name":"destination_caller","type":"pubkey"},{"name":"max_fee","type":"u64"},{"name":"min_finality_threshold","type":"u32"},{"name":"hook_data","type":"bytes"}]}},{"name":"FeeRecipientSet","type":{"kind":"struct","fields":[{"name":"new_fee_recipient","type":"pubkey"}]}},{"name":"HandleReceiveMessageParams","type":{"kind":"struct","fields":[{"name":"remote_domain","type":"u32"},{"name":"sender","type":"pubkey"},{"name":"finality_threshold_executed","type":"u32"},{"name":"message_body","type":"bytes"},{"name":"authority_bump","type":"u8"}]}},{"name":"InitializeParams","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"},{"name":"denylister","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"min_fee_controller","type":"pubkey"},{"name":"min_fee","type":"u32"},{"name":"message_body_version","type":"u32"}]}},{"name":"LinkTokenPairParams","type":{"kind":"struct","fields":[{"name":"local_token","type":"pubkey"},{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"}]}},{"name":"LocalToken","type":{"kind":"struct","fields":[{"name":"custody","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"burn_limit_per_message","type":"u64"},{"name":"messages_sent","type":"u64"},{"name":"messages_received","type":"u64"},{"name":"amount_sent","type":"u128"},{"name":"amount_received","type":"u128"},{"name":"bump","type":"u8"},{"name":"custody_bump","type":"u8"}]}},{"name":"LocalTokenAdded","type":{"kind":"struct","fields":[{"name":"custody","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"LocalTokenRemoved","type":{"kind":"struct","fields":[{"name":"custody","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"MessageTransmitter","docs":["Main state of the MessageTransmitter program"],"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"pending_owner","type":"pubkey"},{"name":"attester_manager","type":"pubkey"},{"name":"pauser","type":"pubkey"},{"name":"paused","type":"bool"},{"name":"local_domain","type":"u32"},{"name":"version","type":"u32"},{"name":"signature_threshold","type":"u32"},{"name":"enabled_attesters","type":{"vec":"pubkey"}},{"name":"max_message_body_size","type":"u64"}]}},{"name":"MinFeeControllerSet","type":{"kind":"struct","fields":[{"name":"new_min_fee_controller","type":"pubkey"}]}},{"name":"MinFeeSet","type":{"kind":"struct","fields":[{"name":"new_min_fee","type":"u32"}]}},{"name":"MintAndWithdraw","type":{"kind":"struct","fields":[{"name":"mint_recipient","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"mint_token","type":"pubkey"},{"name":"fee_collected","type":"u64"}]}},{"name":"OwnershipTransferStarted","type":{"kind":"struct","fields":[{"name":"previous_owner","type":"pubkey"},{"name":"new_owner","type":"pubkey"}]}},{"name":"OwnershipTransferred","type":{"kind":"struct","fields":[{"name":"previous_owner","type":"pubkey"},{"name":"new_owner","type":"pubkey"}]}},{"name":"Pause","type":{"kind":"struct","fields":[]}},{"name":"PauseParams","type":{"kind":"struct","fields":[]}},{"name":"PauserChanged","type":{"kind":"struct","fields":[{"name":"new_address","type":"pubkey"}]}},{"name":"RemoteTokenMessenger","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"RemoteTokenMessengerAdded","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"RemoteTokenMessengerRemoved","type":{"kind":"struct","fields":[{"name":"domain","type":"u32"},{"name":"token_messenger","type":"pubkey"}]}},{"name":"RemoveLocalTokenParams","type":{"kind":"struct","fields":[]}},{"name":"RemoveRemoteTokenMessengerParams","type":{"kind":"struct","fields":[]}},{"name":"SetBurnLimitPerMessage","type":{"kind":"struct","fields":[{"name":"token","type":"pubkey"},{"name":"burn_limit_per_message","type":"u64"}]}},{"name":"SetFeeRecipientParams","type":{"kind":"struct","fields":[{"name":"new_fee_recipient","type":"pubkey"}]}},{"name":"SetMaxBurnAmountPerMessageParams","type":{"kind":"struct","fields":[{"name":"burn_limit_per_message","type":"u64"}]}},{"name":"SetMinFeeControllerParams","type":{"kind":"struct","fields":[{"name":"new_min_fee_controller","type":"pubkey"}]}},{"name":"SetMinFeeParams","type":{"kind":"struct","fields":[{"name":"new_min_fee","type":"u32"}]}},{"name":"SetTokenController","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"}]}},{"name":"SetTokenControllerParams","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"}]}},{"name":"TokenCustodyBurned","type":{"kind":"struct","fields":[{"name":"custody_token_account","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"TokenMessenger","type":{"kind":"struct","fields":[{"name":"denylister","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"pending_owner","type":"pubkey"},{"name":"message_body_version","type":"u32"},{"name":"authority_bump","type":"u8"},{"name":"fee_recipient","type":"pubkey"},{"name":"min_fee_controller","type":"pubkey"},{"name":"min_fee","type":"u32"}]}},{"name":"TokenMinter","type":{"kind":"struct","fields":[{"name":"token_controller","type":"pubkey"},{"name":"pauser","type":"pubkey"},{"name":"paused","type":"bool"},{"name":"bump","type":"u8"}]}},{"name":"TokenPair","type":{"kind":"struct","fields":[{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"},{"name":"local_token","type":"pubkey"},{"name":"bump","type":"u8"}]}},{"name":"TokenPairLinked","type":{"kind":"struct","fields":[{"name":"local_token","type":"pubkey"},{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"}]}},{"name":"TokenPairUnlinked","type":{"kind":"struct","fields":[{"name":"local_token","type":"pubkey"},{"name":"remote_domain","type":"u32"},{"name":"remote_token","type":"pubkey"}]}},{"name":"TransferOwnershipParams","type":{"kind":"struct","fields":[{"name":"new_owner","type":"pubkey"}]}},{"name":"UnDenylisted","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"UndenylistParams","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"}]}},{"name":"UninkTokenPairParams","type":{"kind":"struct","fields":[]}},{"name":"Unpause","type":{"kind":"struct","fields":[]}},{"name":"UnpauseParams","type":{"kind":"struct","fields":[]}},{"name":"UpdateDenylisterParams","type":{"kind":"struct","fields":[{"name":"new_denylister","type":"pubkey"}]}},{"name":"UpdatePauserParams","type":{"kind":"struct","fields":[{"name":"new_pauser","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/idls/clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json b/idls/clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json new file mode 100644 index 0000000..9f57bed --- /dev/null +++ b/idls/clone.C1onEW2kPetmHmwe74YC1ESx3LnFEpVau6g2pg4fHycr.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"clone","instructions":[{"name":"initializeClone","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false},{"name":"collateralMint","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"cometCollateralIldLiquidatorFeeBps","type":"u16"},{"name":"cometOnassetIldLiquidatorFeeBps","type":"u16"},{"name":"borrowLiquidatorFeeBps","type":"u16"},{"name":"treasuryAddress","type":"publicKey"},{"name":"collateralOracleIndex","type":"u8"},{"name":"collateralizationRatio","type":"u8"}]},{"name":"initializePools","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeOracles","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateCloneParameters","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CloneParameters"}}]},{"name":"updatePoolParameters","accounts":[{"name":"auth","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u8"},{"name":"params","type":{"defined":"PoolParameters"}}]},{"name":"updateOracles","accounts":[{"name":"auth","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdateOracleParameters"}}]},{"name":"initializeUser","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"authority","type":"publicKey"}]},{"name":"addPool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":false,"isSigner":false},{"name":"onassetTokenAccount","isMut":false,"isSigner":false},{"name":"underlyingAssetMint","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"minOvercollateralRatio","type":"u16"},{"name":"maxLiquidationOvercollateralRatio","type":"u16"},{"name":"liquidityTradingFeeBps","type":"u16"},{"name":"treasuryTradingFeeBps","type":"u16"},{"name":"ilHealthScoreCoefficient","type":"u16"},{"name":"positionHealthScoreCoefficient","type":"u16"},{"name":"oracleInfoIndex","type":"u8"}]},{"name":"updatePrices","accounts":[{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"oracleIndices","type":"bytes"}]},{"name":"initializeBorrowPosition","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolIndex","type":"u8"},{"name":"onassetAmount","type":"u64"},{"name":"collateralAmount","type":"u64"}]},{"name":"addCollateralToBorrow","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"withdrawCollateralFromBorrow","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"payBorrowDebt","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"payerOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"borrowMore","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"oracles","isMut":false,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"addCollateralToComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawCollateralFromComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"addLiquidityToComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"poolIndex","type":"u8"},{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawLiquidityFromComet","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false}],"args":[{"name":"cometPositionIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"liquidateCometCollateralIld","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"oracles","isMut":false,"isSigner":false},{"name":"collateralMint","isMut":true,"isSigner":false},{"name":"liquidatorCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"cometPositionIndex","type":"u8"}]},{"name":"liquidateCometOnassetIld","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"oracles","isMut":false,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"liquidatorOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"liquidatorCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"cometPositionIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"liquidateBorrowPosition","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"liquidatorCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"liquidatorOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"borrowIndex","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"collectLpRewards","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"cometPositionIndex","type":"u8"}]},{"name":"payImpermanentLossDebt","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"collateralMint","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"payerCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"payerOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"user","type":"publicKey"},{"name":"cometPositionIndex","type":"u8"},{"name":"amount","type":"u64"},{"name":"paymentType","type":{"defined":"PaymentType"}}]},{"name":"closeUserAccount","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"wrapAsset","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"userAssetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"poolIndex","type":"u8"}]},{"name":"unwrapOnasset","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":true,"isSigner":false},{"name":"assetMint","isMut":false,"isSigner":false},{"name":"userAssetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"poolIndex","type":"u8"}]},{"name":"removeCometPosition","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"userAccount","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false}],"args":[{"name":"cometPositionIndex","type":"u8"}]},{"name":"swap","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"clone","isMut":true,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"oracles","isMut":true,"isSigner":false},{"name":"userCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"userOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"onassetMint","isMut":true,"isSigner":false},{"name":"collateralMint","isMut":true,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false},{"name":"treasuryOnassetTokenAccount","isMut":true,"isSigner":false},{"name":"treasuryCollateralTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"cloneStaking","isMut":false,"isSigner":false,"isOptional":true},{"name":"userStakingAccount","isMut":false,"isSigner":false,"isOptional":true},{"name":"cloneStakingProgram","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"poolIndex","type":"u8"},{"name":"quantity","type":"u64"},{"name":"quantityIsInput","type":"bool"},{"name":"quantityIsCollateral","type":"bool"},{"name":"resultThreshold","type":"u64"}]},{"name":"createTokenMetadata","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"metaplexProgram","isMut":false,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"metadataArgs","type":{"defined":"MetadataArgs"}}]},{"name":"removePool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"clone","isMut":false,"isSigner":false},{"name":"pools","isMut":true,"isSigner":false},{"name":"underlyingAssetMint","isMut":false,"isSigner":false},{"name":"underlyingAssetTokenAccount","isMut":true,"isSigner":false},{"name":"treasuryAssetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolIndex","type":"u8"}]}],"accounts":[{"name":"Clone","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"auth","type":{"array":["publicKey",10]}},{"name":"bump","type":"u8"},{"name":"collateral","type":{"defined":"Collateral"}},{"name":"cometCollateralIldLiquidatorFeeBps","type":"u16"},{"name":"cometOnassetIldLiquidatorFeeBps","type":"u16"},{"name":"borrowLiquidatorFeeBps","type":"u16"},{"name":"treasuryAddress","type":"publicKey"},{"name":"eventCounter","type":"u64"},{"name":"nonAuthLiquidationsEnabled","type":"bool"}]}},{"name":"Pools","type":{"kind":"struct","fields":[{"name":"pools","type":{"vec":{"defined":"Pool"}}}]}},{"name":"Oracles","type":{"kind":"struct","fields":[{"name":"oracles","type":{"vec":{"defined":"OracleInfo"}}}]}},{"name":"User","type":{"kind":"struct","fields":[{"name":"borrows","type":{"vec":{"defined":"Borrow"}}},{"name":"comet","type":{"defined":"Comet"}}]}}],"types":[{"name":"MetadataArgs","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"AssetInfo","type":{"kind":"struct","fields":[{"name":"onassetMint","type":"publicKey"},{"name":"oracleInfoIndex","type":"u8"},{"name":"ilHealthScoreCoefficient","type":"u16"},{"name":"positionHealthScoreCoefficient","type":"u16"},{"name":"minOvercollateralRatio","type":"u16"},{"name":"maxLiquidationOvercollateralRatio","type":"u16"}]}},{"name":"OracleInfo","type":{"kind":"struct","fields":[{"name":"source","type":{"defined":"OracleSource"}},{"name":"address","type":"publicKey"},{"name":"price","type":"i64"},{"name":"expo","type":"u8"},{"name":"status","type":{"defined":"Status"}},{"name":"lastUpdateSlot","type":"u64"},{"name":"rescaleFactor","type":"u8"}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"underlyingAssetTokenAccount","type":"publicKey"},{"name":"committedCollateralLiquidity","type":"u64"},{"name":"collateralIld","type":"i64"},{"name":"onassetIld","type":"i64"},{"name":"treasuryTradingFeeBps","type":"u16"},{"name":"liquidityTradingFeeBps","type":"u16"},{"name":"assetInfo","type":{"defined":"AssetInfo"}},{"name":"status","type":{"defined":"Status"}}]}},{"name":"Collateral","type":{"kind":"struct","fields":[{"name":"oracleInfoIndex","type":"u8"},{"name":"mint","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"collateralizationRatio","type":"u8"},{"name":"scale","type":"u8"}]}},{"name":"Comet","type":{"kind":"struct","fields":[{"name":"collateralAmount","type":"u64"},{"name":"positions","type":{"vec":{"defined":"LiquidityPosition"}}}]}},{"name":"LiquidityPosition","type":{"kind":"struct","fields":[{"name":"poolIndex","type":"u8"},{"name":"committedCollateralLiquidity","type":"u64"},{"name":"collateralIldRebate","type":"i64"},{"name":"onassetIldRebate","type":"i64"}]}},{"name":"Borrow","type":{"kind":"struct","fields":[{"name":"poolIndex","type":"u8"},{"name":"borrowedOnasset","type":"u64"},{"name":"collateralAmount","type":"u64"}]}},{"name":"PaymentType","type":{"kind":"enum","variants":[{"name":"Onasset"},{"name":"Collateral"},{"name":"CollateralFromWallet"}]}},{"name":"CloneParameters","type":{"kind":"enum","variants":[{"name":"AddAuth","fields":[{"name":"address","type":"publicKey"}]},{"name":"RemoveAuth","fields":[{"name":"address","type":"publicKey"}]},{"name":"CometCollateralLiquidationFee","fields":[{"name":"value","type":"u16"}]},{"name":"CometOnassetLiquidationFee","fields":[{"name":"value","type":"u16"}]},{"name":"BorrowLiquidationFee","fields":[{"name":"value","type":"u16"}]},{"name":"TreasuryAddress","fields":[{"name":"address","type":"publicKey"}]},{"name":"CollateralizationRatio","fields":[{"name":"value","type":"u8"}]},{"name":"NonAuthLiquidationsEnabled","fields":[{"name":"value","type":"bool"}]}]}},{"name":"UpdateOracleParameters","type":{"kind":"enum","variants":[{"name":"Add","fields":[{"name":"address","type":"publicKey"},{"name":"source","type":{"defined":"OracleSource"}},{"name":"rescale_factor","type":{"option":"u8"}}]},{"name":"Remove","fields":[{"name":"index","type":"u8"}]},{"name":"Modify","fields":[{"name":"index","type":"u8"},{"name":"address","type":{"option":"publicKey"}},{"name":"source","type":{"option":{"defined":"OracleSource"}}},{"name":"status","type":{"option":{"defined":"Status"}}}]}]}},{"name":"PoolParameters","type":{"kind":"enum","variants":[{"name":"Status","fields":[{"name":"value","type":{"defined":"Status"}}]},{"name":"TreasuryTradingFee","fields":[{"name":"value","type":"u16"}]},{"name":"LiquidityTradingFee","fields":[{"name":"value","type":"u16"}]},{"name":"OracleInfoIndex","fields":[{"name":"value","type":"u8"}]},{"name":"MinOvercollateralRatio","fields":[{"name":"value","type":"u16"}]},{"name":"MaxLiquidationOvercollateralRatio","fields":[{"name":"value","type":"u16"}]},{"name":"IlHealthScoreCoefficient","fields":[{"name":"value","type":"u16"}]},{"name":"PositionHealthScoreCoefficient","fields":[{"name":"value","type":"u16"}]}]}},{"name":"Status","type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Frozen"},{"name":"Extraction"},{"name":"Liquidation"},{"name":"Deprecation"}]}},{"name":"OracleSource","type":{"kind":"enum","variants":[{"name":"PYTH"},{"name":"SWITCHBOARD"}]}}],"events":[{"name":"SwapEvent","fields":[{"name":"eventId","type":"u64","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"inputIsCollateral","type":"bool","index":false},{"name":"input","type":"u64","index":false},{"name":"output","type":"u64","index":false},{"name":"tradingFee","type":"u64","index":false},{"name":"treasuryFee","type":"u64","index":false}]},{"name":"LiquidityDelta","fields":[{"name":"eventId","type":"u64","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"committedCollateralDelta","type":"i64","index":false},{"name":"collateralIldDelta","type":"i64","index":false},{"name":"onassetIldDelta","type":"i64","index":false}]},{"name":"PoolState","fields":[{"name":"eventId","type":"u64","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"onassetIld","type":"i64","index":false},{"name":"collateralIld","type":"i64","index":false},{"name":"committedCollateralLiquidity","type":"u64","index":false},{"name":"poolPrice","type":"u64","index":false},{"name":"poolScale","type":"u32","index":false}]},{"name":"BorrowUpdate","fields":[{"name":"eventId","type":"u64","index":false},{"name":"poolIndex","type":"u8","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"isLiquidation","type":"bool","index":false},{"name":"collateralSupplied","type":"u64","index":false},{"name":"collateralDelta","type":"i64","index":false},{"name":"borrowedAmount","type":"u64","index":false},{"name":"borrowedDelta","type":"i64","index":false}]},{"name":"CometCollateralUpdate","fields":[{"name":"eventId","type":"u64","index":false},{"name":"userAddress","type":"publicKey","index":false},{"name":"collateralSupplied","type":"u64","index":false},{"name":"collateralDelta","type":"i64","index":false}]}],"errors":[{"code":6000,"name":"Unauthorized","msg":"Unauthorized"},{"code":6001,"name":"InvalidMintCollateralRatio","msg":"Invalid Mint Collateral Ratio"},{"code":6002,"name":"IntTypeConversionError","msg":"Integer Type Conversion Error"},{"code":6003,"name":"PoolNotFound","msg":"Pool Not Found"},{"code":6004,"name":"BumpNotFound","msg":"Bump not found"},{"code":6005,"name":"InvalidTokenAmount","msg":"Invalid Token Amount"},{"code":6006,"name":"ExpectedAccountNotFound","msg":"Expected Account Not Found"},{"code":6007,"name":"OutdatedOracle","msg":"Outdated Oracle"},{"code":6008,"name":"CheckedMathError","msg":"Checked Math Error"},{"code":6009,"name":"BorrowPositionUnableToLiquidate","msg":"Mint Position Unable to Liquidate"},{"code":6010,"name":"HealthScoreTooLow","msg":"Health Score Too Low"},{"code":6011,"name":"InvalidInputCollateralAccount","msg":"Invalid input collateral account"},{"code":6012,"name":"InvalidAccountLoaderOwner","msg":"Invalid Account loader owner"},{"code":6013,"name":"InvalidInputPositionIndex","msg":"Invalid input position index"},{"code":6014,"name":"InvalidTokenAccountBalance","msg":"Invalid token account balance"},{"code":6015,"name":"InequalityComparisonViolated","msg":"Inequality comparison violated"},{"code":6016,"name":"CometNotEmpty","msg":"Comet Not Empty"},{"code":6017,"name":"NotSubjectToLiquidation","msg":"Not Subject to Liquidation"},{"code":6018,"name":"LiquidationAmountTooLarge","msg":"Liquidation amount too large"},{"code":6019,"name":"NoRemainingAccountsSupplied","msg":"No remaining accounts supplied"},{"code":6020,"name":"InvalidOvercollateralizationRatios","msg":"Invalid over-collateralization ratios"},{"code":6021,"name":"IncorrectOracleAddress","msg":"Incorrect oracle address provided"},{"code":6022,"name":"InvalidValueRange","msg":"Value is in an incorrect range"},{"code":6023,"name":"InvalidAssetStability","msg":"Asset stable requirement violated"},{"code":6024,"name":"SlippageToleranceExceeded","msg":"Slippage tolerance exceeded"},{"code":6025,"name":"RequireOnlyonUSDCollateral","msg":"Collateral must be all in onUSD"},{"code":6026,"name":"RequireAllPositionsClosed","msg":"Positions must be all closed"},{"code":6027,"name":"FailedToLoadPyth","msg":"Failed to Load Pyth Price Feed"},{"code":6028,"name":"StatusPreventsAction","msg":"Status Prevents Action"},{"code":6029,"name":"PoolEmpty","msg":"Pool is empty"},{"code":6030,"name":"NoLiquidityToWithdraw","msg":"No liquidity to withdraw"},{"code":6031,"name":"InvalidStatus","msg":"Invalid Status"},{"code":6032,"name":"AuthArrayFull","msg":"Auth Array Full"},{"code":6033,"name":"AuthNotFound","msg":"Auth Not Found"},{"code":6034,"name":"InvalidOracleIndex","msg":"Invalid oracle index"},{"code":6035,"name":"InvalidPaymentType","msg":"Invalid Payment Type"},{"code":6036,"name":"InvalidConversion","msg":"Invalid Conversion"},{"code":6037,"name":"AuthAlreadyExists","msg":"Auth Already Exists"}]} \ No newline at end of file diff --git a/idls/dflow_v4.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json b/idls/dflow_v4.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json new file mode 100644 index 0000000..d0a0765 --- /dev/null +++ b/idls/dflow_v4.DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH.json @@ -0,0 +1 @@ +{"address":"DF1ow4tspfHX9JwWJsAb9epbkA8hmpSEAtxXy1V27QBH","metadata":{"name":"swap_orchestrator","version":"0.1.0","spec":"0.1.0","description":"DFlow Aggregator program"},"instructions":[{"name":"close_empty_token_account","docs":["Closes a token account if it has a zero balance"],"discriminator":[232,75,140,136,250,78,224,188],"accounts":[{"name":"token_account","docs":["The token account to close (supports both spl_token and spl_token_2022)"],"writable":true},{"name":"authority","docs":["The authority of the token account. Must sign."],"signer":true},{"name":"destination","docs":["The account to receive the rent from closing the token account."],"writable":true},{"name":"token_program","docs":["The token program (either spl_token or spl_token_2022)"]}],"args":[]},{"name":"close_order","docs":["Closes an order, returning tokens from the order vault"],"discriminator":[90,103,209,28,7,63,168,4],"accounts":[{"name":"order","writable":true},{"name":"order_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114,95,118,97,117,108,116]},{"kind":"account","path":"order"}]}},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned."],"writable":true,"relations":["order"]},{"name":"return_rent_to","docs":["Account to which rent for the order account and vault should be returned."],"writable":true,"relations":["order"]},{"name":"closer","docs":["Account that is authorized to close the order"],"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_referral_token_account_idempotent","docs":["Create a referral token account if it doesn't already exist"],"discriminator":[46,232,41,144,85,37,170,175],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"project"},{"name":"referral_account"},{"name":"referral_token_account","docs":["The referral token account to create. This is a PDA of the Referral program whose seeds are","[b\"referral_ata\", referral_account, mint]."],"writable":true},{"name":"mint"},{"name":"system_program"},{"name":"token_program"},{"name":"referral_program"}],"args":[]},{"name":"fill_order","docs":["Fills an order, closing the order after filling it"],"discriminator":[232,122,115,25,199,143,136,162],"accounts":[{"name":"order","writable":true},{"name":"order_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114,95,118,97,117,108,116]},{"kind":"account","path":"order"}]}},{"name":"output_token_account","docs":["Account to which output from the fill should be sent."],"writable":true,"relations":["order"]},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned."],"writable":true,"relations":["order"]},{"name":"return_rent_to","docs":["Account to which rent for the order account and vault should be returned."],"writable":true,"relations":["order"]},{"name":"filler_input_token_account","writable":true},{"name":"input_mint","docs":["Input mint for the swap. Must be specified if the order inputs a mint for which the filler's","associated token account doesn't exist."],"optional":true},{"name":"filler_output_token_account","writable":true},{"name":"output_mint","docs":["Output mint for the swap. Must be specified if the order outputs native SOL or a mint for","which the filler's associated token account doesn't exist."],"optional":true},{"name":"filler","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"FillOrderParams"}}}]},{"name":"init_market_ledger_idempotent","docs":["Initialize a market ledger if it doesn't already exist"],"discriminator":[183,43,139,79,125,225,35,159],"accounts":[{"name":"predictions_program"},{"name":"market_ledger"},{"name":"market_ledger_redemption_vault"},{"name":"market_ledger_order_vault"},{"name":"market_ledger_reduce_yes_vault"},{"name":"market_ledger_reduce_no_vault"},{"name":"settlement_escrow"},{"name":"escrow_mint"},{"name":"market_yes_outcome_mint"},{"name":"market_no_outcome_mint"},{"name":"payer"},{"name":"outcome_token_program"},{"name":"escrow_token_program"},{"name":"system_program"}],"args":[{"name":"market_id","type":{"array":["u8",32]}}]},{"name":"open_order","docs":["Opens an order, escrowing the input tokens in the order vault"],"discriminator":[206,88,88,143,38,136,50,224],"accounts":[{"name":"order","docs":["Order account that the instruction will create to store the order details"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114]},{"kind":"account","path":"return_input_token_account"},{"kind":"arg","path":"params.order_account_id"}]}},{"name":"order_vault","docs":["Token account that the instruction will create to escrow the input tokens for the order"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114,95,118,97,117,108,116]},{"kind":"account","path":"order"}]}},{"name":"input_token_account","docs":["Token account from which input tokens should be withdrawn to fund the order"],"writable":true},{"name":"output_token_account","docs":["Account to which output from the fill should be sent. If the order specifies that it should","output native SOL, then this should be the user's wallet, although any account is allowed.","If the order doesn't specify that it should output native SOL, then this must be an SPL","token account, and the token account's mint determines the order's output mint."]},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned when the order is","filled or closed. If the input is native SOL, this should be the user's wallet, although any","account is allowed. If the input is wrapped SOL or an SPL token, this must be an SPL token","account for the input mint."]},{"name":"input_mint"},{"name":"user_token_authority","docs":["Authority of the input token account"],"signer":true},{"name":"fee_payer","docs":["Account that pays the fee budget for the order"],"writable":true,"signer":true},{"name":"fee_receiver","docs":["Account that receives the fee budget funds"],"writable":true},{"name":"rent_depositor","docs":["Depositor for the order account and vault account rent"],"writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"OpenOrderParams"}}}]},{"name":"swap","docs":["Executes a token swap"],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":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":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"swap2","docs":["Executes a token swap with a slippage fee"],"discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":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":"params","type":{"defined":{"name":"Swap2Params"}}}]},{"name":"swap2_with_destination","docs":["Executes a token swap with a slippage fee. Outputs to the specified destination account."],"discriminator":[95,123,213,246,122,1,86,231],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_token_account","writable":true},{"name":"destination_token_authority"},{"name":"destination_mint"},{"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":"params","type":{"defined":{"name":"Swap2Params"}}}]},{"name":"swap2_with_destination_native","docs":["Executes a token swap with a slippage fee. Outputs native SOL to the specified destination","account by unwrapping WSOL."],"discriminator":[222,100,184,146,186,196,105,165],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_account","docs":["The destination account that will receive the native SOL"],"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":"params","type":{"defined":{"name":"Swap2Params"}}}]},{"name":"swap_with_destination","docs":["Executes a token swap. Outputs to the specified destination account."],"discriminator":[168,172,24,77,197,156,135,101],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_token_account","writable":true},{"name":"destination_token_authority"},{"name":"destination_mint"},{"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":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"swap_with_destination_native","docs":["Executes a token swap. Outputs native SOL to the specified destination account by unwrapping","WSOL."],"discriminator":[205,77,127,108,241,32,196,195],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_authority","signer":true},{"name":"destination_account","docs":["The destination account that will receive the native SOL"],"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":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"transfer_fee","docs":["Transfer an SPL token fee if the receiving account can receive it"],"discriminator":[129,164,196,21,177,48,180,162],"accounts":[{"name":"from"},{"name":"to"},{"name":"authority"},{"name":"token_program"},{"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":"amount","type":"u64"}]},{"name":"transfer_sol","docs":["Transfer native SOL from one account to another"],"discriminator":[78,10,236,247,109,117,21,76],"accounts":[{"name":"from"},{"name":"to"},{"name":"system_program"}],"args":[{"name":"lamports","type":"u64"}]},{"name":"transfer_to_sponsor","docs":["Transfer an SPL token to a sponsor's token account, creating the sponsor's token account if","necessary."],"discriminator":[155,179,130,151,196,139,253,163],"accounts":[{"name":"user_token_authority"},{"name":"user_token_account"},{"name":"sponsor"},{"name":"sponsor_token_account"},{"name":"mint"},{"name":"token_program"},{"name":"associated_token_program"},{"name":"system_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"unwrap_sol","docs":["Unwrap all SOL in the provided wrapped SOL token account"],"discriminator":[99,40,14,105,45,107,172,201],"accounts":[{"name":"owner"},{"name":"wrapped_sol_associated_token_account"},{"name":"token_program"}],"args":[]},{"name":"wrap_sol","docs":["Wrap SOL, creating a wrapped SOL associated token account if necessary"],"discriminator":[47,62,155,172,131,205,37,201],"accounts":[{"name":"from"},{"name":"wrapped_sol_associated_token_account"},{"name":"native_mint"},{"name":"token_program"},{"name":"associated_token_program"},{"name":"system_program"}],"args":[{"name":"lamports","type":"u64"}]}],"accounts":[{"name":"Order","discriminator":[134,173,223,185,77,86,28,51]}],"events":[{"name":"FeeEvent","discriminator":[73,79,78,127,184,213,13,220]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]}],"errors":[{"code":15000,"name":"SwapCpiFailed","msg":"Swap CPI failed"},{"code":15001,"name":"SlippageLimitExceeded","msg":"Slippage limit exceeded"},{"code":15002,"name":"FeeAccountNotSpecified","msg":"Fee account must be specified when platform_fee_bps is nonzero"},{"code":15003,"name":"InvalidFeeAccountOwner","msg":"Invalid fee account owner"},{"code":15004,"name":"InputAmountIsZero","msg":"input_amount must be greater than 0"},{"code":15005,"name":"OutputTokenAccountMismatch","msg":"Swap output token account did not match the order's output_token_account"},{"code":15006,"name":"OrderNotFillableAfterLastFillableSlot","msg":"Order's last_fillable_slot has passed"},{"code":15007,"name":"FillOrderNotAuthorized","msg":"filler is not authorized to fill the order"},{"code":15008,"name":"MintAccountNotSpecified","msg":"Instruction must specify mint account"},{"code":15009,"name":"ReturnInputTokenAccountMismatch","msg":"return_input_token_account did not match the order's return_input_token_account"},{"code":15010,"name":"ReturnRentToMismatch","msg":"return_rent_to did not match the order's return_rent_to"},{"code":15011,"name":"CloseOrderNotAuthorized","msg":"closer is not authorized to close the order"},{"code":15012,"name":"InvalidReturnInputTokenAccount","msg":"Invalid return_input_token_account"},{"code":15013,"name":"InvalidOutputTokenAccount","msg":"Invalid output_token_account"},{"code":15014,"name":"CouldNotReturnInput","msg":"Couldn't return input from vault"},{"code":15015,"name":"LegInputOverconsumption","msg":"Leg consumed more than allowed input amount"},{"code":15016,"name":"RouteInputUnderconsumption","msg":"Route consumed less than minimum allowed amount of input"},{"code":15017,"name":"LegConsumedOutput","msg":"Leg consumed output"},{"code":15018,"name":"LegConsumedLamports","msg":"Leg consumed lamports"},{"code":15019,"name":"PumpFunAmmCreatedFeeAta","msg":"Pump.fun AMM leg created fee/buyback ATA"},{"code":15020,"name":"SkippedLeg","msg":"A leg in the route was skipped"},{"code":15021,"name":"DestinationTokenAccountDoesNotExist","msg":"Destination token account does not exist"},{"code":15022,"name":"Token2022ProgramNotProvided","msg":"Token 2022 Program account not provided"},{"code":15023,"name":"InvalidLegInputTokenAccount","msg":"Invalid leg input token account"},{"code":15024,"name":"RaydiumLaunchlabCreatedFeeAta","msg":"Raydium Launchlab leg created fee ATA"},{"code":15025,"name":"LegUnderproducedOutput","msg":"Leg produced less output than expected"},{"code":15026,"name":"NoSettlementTokensReceived","msg":"No settlement tokens were received during the swap"},{"code":15027,"name":"InsufficientAccountsForOpenPredictionsOrder","msg":"Insufficient accounts provided for OpenPredictionsOrder action"},{"code":15028,"name":"InvalidTokenAccount","msg":"Invalid token account. Must be either spl_token or spl_token_2022 account"},{"code":15029,"name":"InvalidCloseAuthorityForNativeMint","msg":"InitAtaIdempotent cannot set a close authority on a WSOL ATA"},{"code":15998,"name":"InvalidLegAction"},{"code":15999,"name":"InvalidInstructionData"}],"types":[{"name":"A","type":{"kind":"enum","variants":[{"name":"B","fields":[{"defined":{"name":"C"}}]},{"name":"J","fields":[{"defined":{"name":"J"}}]}]}},{"name":"Action","type":{"kind":"enum","variants":[{"name":"WhirlpoolsSwap","fields":[{"defined":{"name":"WhirlpoolsSwapOptions"}}]},{"name":"ClearpoolsSwap","fields":[{"defined":{"name":"ClearpoolsSwapOptions"}}]},{"name":"RaydiumAmmSwap","fields":[{"defined":{"name":"RaydiumAmmSwapOptions"}}]},{"name":"LifinityV2Swap","fields":[{"defined":{"name":"LifinityV2SwapOptions"}}]},{"name":"MeteoraDlmmSwap","fields":[{"defined":{"name":"MeteoraDlmmSwapOptions"}}]},{"name":"RaydiumClmmSwap","fields":[{"defined":{"name":"RaydiumClmmSwapOptions"}}]},{"name":"RaydiumClmmSwapV2","fields":[{"defined":{"name":"RaydiumClmmSwapV2Options"}}]},{"name":"PhoenixSwap","fields":[{"defined":{"name":"PhoenixSwapOptions"}}]},{"name":"PumpFunBuy","fields":[{"defined":{"name":"PumpFunBuyOptions"}}]},{"name":"PumpFunSell","fields":[{"defined":{"name":"PumpFunSellOptions"}}]},{"name":"GammaSwap","fields":[{"defined":{"name":"GammaSwapOptions"}}]},{"name":"ObricV2Swap","fields":[{"defined":{"name":"ObricV2SwapOptions"}}]},{"name":"PumpFunAmmBuy","fields":[{"defined":{"name":"PumpFunAmmBuyOptions"}}]},{"name":"PumpFunAmmSell","fields":[{"defined":{"name":"PumpFunAmmSellOptions"}}]},{"name":"SolFiSwap","fields":[{"defined":{"name":"SolFiSwapOptions"}}]},{"name":"RubiconSwap","fields":[{"defined":{"name":"RubiconSwapOptions"}}]},{"name":"MeteoraDammV1Swap","fields":[{"defined":{"name":"MeteoraDammV1SwapOptions"}}]},{"name":"RaydiumCpSwap","fields":[{"defined":{"name":"RaydiumCpSwapOptions"}}]},{"name":"StabbleStableSwap","fields":[{"defined":{"name":"StabbleStableSwapOptions"}}]},{"name":"TesseraVSwap","fields":[{"defined":{"name":"TesseraVSwapOptions"}}]},{"name":"MeteoraDammV2Swap","fields":[{"defined":{"name":"MeteoraDammV2SwapOptions"}}]},{"name":"RaydiumLaunchlabSwap","fields":[{"defined":{"name":"RaydiumLaunchlabSwapOptions"}}]},{"name":"MeteoraDbcSwap","fields":[{"defined":{"name":"MeteoraDbcSwapOptions"}}]},{"name":"HumidiFiSwap","fields":[{"defined":{"name":"HumidiFiSwapOptions"}}]},{"name":"WhirlpoolsSwapV2","fields":[{"defined":{"name":"WhirlpoolsSwapV2Options"}}]},{"name":"MeteoraDlmmSwapV2","fields":[{"defined":{"name":"MeteoraDlmmSwapV2Options"}}]},{"name":"ZeroFiSwap","fields":[{"defined":{"name":"ZeroFiSwapOptions"}}]},{"name":"AlphaQSwap","fields":[{"defined":{"name":"AlphaQSwapOptions"}}]},{"name":"TokenSwap","fields":[{"defined":{"name":"TokenSwapOptions"}}]},{"name":"SolFiV2Swap","fields":[{"defined":{"name":"SolFiV2SwapOptions"}}]},{"name":"MozartSwap","fields":[{"defined":{"name":"MozartSwapOptions"}}]},{"name":"DFlowDynamicRouteV1","fields":[{"defined":{"name":"DFlowDynamicRouteV1Options"}}]},{"name":"HeavenSwap","fields":[{"defined":{"name":"HeavenSwapOptions"}}]},{"name":"NexusSwap","fields":[{"defined":{"name":"NexusSwapOptions"}}]},{"name":"SarosDlmmSwap","fields":[{"defined":{"name":"SarosDlmmSwapOptions"}}]},{"name":"TransferFee","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"TransferFeeWithMint","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"RecordId","fields":[{"defined":{"name":"RecordIdOptions"}}]},{"name":"RecordId2","fields":[{"defined":{"name":"RecordId2Options"}}]},{"name":"ManifestSwap","fields":[{"defined":{"name":"ManifestSwapOptions"}}]},{"name":"BisonFiSwap","fields":[{"defined":{"name":"BisonFiSwapOptions"}}]},{"name":"SanctumInfinitySwap","fields":[{"defined":{"name":"SanctumInfinitySwapOptions"}}]},{"name":"SanctumInfinityLiquidity","fields":[{"defined":{"name":"SanctumInfinityLiquidityOptions"}}]},{"name":"OpenPredictionsOrder","fields":[{"defined":{"name":"OpenPredictionsOrderOptions"}}]},{"name":"ScorchSwap","fields":[{"defined":{"name":"ScorchSwapOptions"}}]},{"name":"IncludeAccount"},{"name":"StabbleWeightedSwap","fields":[{"defined":{"name":"StabbleWeightedSwapOptions"}}]},{"name":"VertigoSwap","fields":[{"defined":{"name":"VertigoSwapOptions"}}]},{"name":"SetMinimumLegOutputs","fields":[{"defined":{"name":"SetMinimumLegOutputsOptions"}}]},{"name":"SetMinimumLegPrices","fields":[{"defined":{"name":"SetMinimumLegPricesOptions"}}]},{"name":"SetSponsor"},{"name":"WrapSol","fields":[{"defined":{"name":"WrapSolOptions"}}]},{"name":"UnwrapSol"},{"name":"KDEXSwap","fields":[{"defined":{"name":"KDEXSwapOptions"}}]},{"name":"DeriverseSwap","fields":[{"defined":{"name":"DeriverseSwapOptions"}}]},{"name":"VaultSwap","fields":[{"defined":{"name":"VaultSwapOptions"}}]},{"name":"MetaDaoSwap","fields":[{"defined":{"name":"MetaDaoSwapOptions"}}]},{"name":"D","fields":[{"defined":{"name":"O"}}]},{"name":"XoCashExchangeSwap","fields":[{"defined":{"name":"XoCashExchangeSwapOptions"}}]},{"name":"LemmingsFiSwap","fields":[{"defined":{"name":"LemmingsFiSwapOptions"}}]},{"name":"InitAtaIdempotent"},{"name":"SetMaxUnderconsumptionBps","fields":[{"defined":{"name":"SetMaxUnderconsumptionBpsOptions"}}]},{"name":"GhostSwap","fields":[{"defined":{"name":"GhostSwapOptions"}}]},{"name":"TransferFeeV2","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"TransferFeeWithMintV2","fields":[{"defined":{"name":"TransferFeeOptions"}}]},{"name":"PumpFunBuyV2","fields":[{"defined":{"name":"PumpFunBuyV2Options"}}]},{"name":"PumpFunSellV2","fields":[{"defined":{"name":"PumpFunSellV2Options"}}]}]}},{"name":"AlphaQDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"AlphaQSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"BisonFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"BisonFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"C","type":{"kind":"struct","fields":[{"name":"_padding","type":"u8"}]}},{"name":"ClearpoolsSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"DFlowDynamicRouteV1Options","type":{"kind":"struct","fields":[{"name":"candidate_actions","type":{"vec":{"defined":{"name":"DynamicRouteV1CandidateAction"}}}},{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"DeriverseSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"DynamicRouteV1CandidateAction","type":{"kind":"enum","variants":[{"name":"SolFi","fields":[{"defined":{"name":"SolFiDynamicRouteV1Options"}}]},{"name":"Rubicon","fields":[{"defined":{"name":"RubiconDynamicRouteV1Options"}}]},{"name":"TesseraV","fields":[{"defined":{"name":"TesseraVDynamicRouteV1Options"}}]},{"name":"HumidiFi","fields":[{"defined":{"name":"HumidiFiDynamicRouteV1Options"}}]},{"name":"SolFiV2","fields":[{"defined":{"name":"SolFiV2DynamicRouteV1Options"}}]},{"name":"Mozart","fields":[{"defined":{"name":"MozartDynamicRouteV1Options"}}]},{"name":"ObricV2","fields":[{"defined":{"name":"ObricV2DynamicRouteV1Options"}}]},{"name":"Nexus","fields":[{"defined":{"name":"NexusDynamicRouteV1Options"}}]},{"name":"BisonFi","fields":[{"defined":{"name":"BisonFiDynamicRouteV1Options"}}]},{"name":"ZeroFi","fields":[{"defined":{"name":"ZeroFiDynamicRouteV1Options"}}]},{"name":"Manifest","fields":[{"defined":{"name":"ManifestDynamicRouteV1Options"}}]},{"name":"AlphaQ","fields":[{"defined":{"name":"AlphaQDynamicRouteV1Options"}}]},{"name":"LemmingsFi","fields":[{"defined":{"name":"LemmingsFiDynamicRouteV1Options"}}]}]}},{"name":"FeeEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"FillOrderParams","type":{"kind":"struct","fields":[{"name":"swap_actions","type":{"vec":{"defined":{"name":"Action"}}}},{"name":"platform_fee_ubps","type":"u32"}]}},{"name":"GammaSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"endorsed","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"GhostSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"HeavenSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"HumidiFiDynamicRouteV1Options","type":{"kind":"struct","fields":[{"name":"swap_id","type":"u64"}]}},{"name":"HumidiFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"swap_id","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"J","type":{"kind":"struct","fields":[{"name":"_padding","type":"u8"}]}},{"name":"KDEXSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"LegPrice","type":{"kind":"struct","fields":[{"name":"output_atoms_per_input_token","type":"u64"},{"name":"input_mint_decimals","type":"u8"}]}},{"name":"LemmingsFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"LemmingsFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"LifinityV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"ManifestDynamicRouteV1Options","type":{"kind":"struct","fields":[{"name":"include_global","type":"bool"}]}},{"name":"ManifestSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MetaDaoSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDammV1SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDammV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDbcSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"is_rate_limiter_applied","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDlmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_bin_arrays","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MeteoraDlmmSwapV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_bin_arrays","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"MozartDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"MozartSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"NexusDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"NexusSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"O","type":{"kind":"struct","fields":[{"name":"a","type":{"vec":{"defined":{"name":"A"}}}},{"name":"amount","type":"u64"},{"name":"orchestrator_flags","type":{"defined":{"name":"OrchestratorFlags"}}},{"name":"pfs","type":"u16"},{"name":"dfs","type":"u16"}]}},{"name":"ObricV2DynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"ObricV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"OpenOrderParams","type":{"kind":"struct","fields":[{"name":"input_amount","type":"u64"},{"name":"quoted_out_amount","docs":["Quoted output amount after platform fee"],"type":"u64"},{"name":"fee_budget","docs":["Maximum amount in lamports that the fee payer will pay to have the order filled or closed"],"type":"u64"},{"name":"order_account_id","type":"u64"},{"name":"fillable_for_slots","docs":["Number of slots after the slot in which the order is opened for which the order is fillable.","If zero, the order is only fillable in the slot in which the open transaction landed."],"type":"u32"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount."],"type":"u16"},{"name":"closer","docs":["Account that is authorized to close the order"],"type":"pubkey"},{"name":"flags","docs":["Flags for the order"],"type":"u8"}]}},{"name":"OpenPredictionsOrderOptions","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"order_outcome","type":"u8"},{"name":"quoted_out_amount","docs":["Quoted output amount for the predictions order"],"type":"u64"},{"name":"slippage_bps","docs":["Slippage for the predictions order (separate from swap slippage)"],"type":"u16"},{"name":"platform_fee_recipient_vault","type":"pubkey"},{"name":"platform_fee_scale","type":"u16"}]}},{"name":"OrchestratorFlags","type":{"kind":"struct","fields":[{"name":"flags","type":"u8"}]}},{"name":"Order","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"closer","docs":["Account that is authorized to close the order"],"type":"pubkey"},{"name":"output_token_account","docs":["Account to which output from the fill should be sent. If the order specifies that it should","output native SOL, then this should be the user's wallet, although any account is allowed.","If the order doesn't specify that it should output native SOL, then this must be an SPL","token account, and the token account's mint determines the order's output mint."],"type":"pubkey"},{"name":"return_input_token_account","docs":["Account to which leftover tokens in the order vault should be returned when the order is","filled or closed. If the input is native SOL, this should be the user's wallet, although any","account is allowed. If the input is wrapped SOL or an SPL token, this must be an SPL token","account for the input mint."],"type":"pubkey"},{"name":"return_rent_to","docs":["Account to which rent for the account should be returned when the account is closed"],"type":"pubkey"},{"name":"id","docs":["ID used to produce a unique PDA for the order account"],"type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"last_fillable_slot","docs":["Highest slot at which the order can be filled"],"type":"u64"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount for the order."],"type":"u16"},{"name":"bump","type":"u8"},{"name":"vault_bump","docs":["Bump seed for the vault token account associated with the order"],"type":"u8"},{"name":"flags","docs":["Flags for the order"],"type":"u8"},{"name":"_padding1","type":"u8"},{"name":"_padding2","type":"u8"},{"name":"_padding3","type":"u8"}]}},{"name":"PhoenixSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunAmmBuyOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunAmmSellOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunBuyOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunBuyV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunSellOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"PumpFunSellV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumAmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumClmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_remaining_accounts","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumClmmSwapV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"num_remaining_accounts","type":"u8"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumCpSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RaydiumLaunchlabSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"RecordId2Options","type":{"kind":"struct","fields":[{"name":"id","type":{"array":["u8",4]}}]}},{"name":"RecordIdOptions","type":{"kind":"struct","fields":[{"name":"id","type":{"array":["u8",76]}}]}},{"name":"RubiconDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"RubiconSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SanctumInfinityLiquidityOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"lst_value_calc_accs","type":"u8"},{"name":"lst_index","type":"u32"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SanctumInfinitySwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"src_lst_value_calc_accs","type":"u8"},{"name":"dst_lst_value_calc_accs","type":"u8"},{"name":"src_lst_index","type":"u32"},{"name":"dst_lst_index","type":"u32"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SarosDlmmSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"ScorchSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"id","type":"u128"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SetMaxUnderconsumptionBpsOptions","type":{"kind":"struct","fields":[{"name":"max_underconsumption_bps","type":"u16"}]}},{"name":"SetMinimumLegOutputsOptions","type":{"kind":"struct","fields":[{"name":"minimum_outputs","docs":["Minimum allowed output amount for each swap leg"],"type":{"vec":"u64"}}]}},{"name":"SetMinimumLegPricesOptions","type":{"kind":"struct","fields":[{"name":"minimum_prices","docs":["Minimum allowed price for each swap leg"],"type":{"vec":{"defined":{"name":"LegPrice"}}}}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"SolFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"SolFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"SolFiV2DynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"SolFiV2SwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"StabbleStableSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"StabbleWeightedSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"Swap2Params","type":{"kind":"struct","fields":[{"name":"actions","type":{"vec":{"defined":{"name":"Action"}}}},{"name":"quoted_out_amount","docs":["Quoted output amount for the swap after platform fee"],"type":"u64"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount for the swap."],"type":"u16"},{"name":"platform_fee_bps","docs":["Platform fee in basis points. If nonzero, this percentage of the output amount will be","transferred to the platform fee account, and the instruction must include the platform fee","account as the last account. The platform fee account must be a valid token account for the","output mint, and it must specify the public key of the Referral program's DFlow project as","its owner."],"type":"u16"},{"name":"positive_slippage_fee_limit_pct","docs":["Limit on the positive slippage fee in percent. The positive slippage fee is limited to the","lesser of (1) the excess actual out amount above the quoted amount and (2) this percentage","of the actual out amount after platform fee."],"type":"u8"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"amm","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"input_amount","type":"u64"},{"name":"output_mint","type":"pubkey"},{"name":"output_amount","type":"u64"}]}},{"name":"SwapParams","type":{"kind":"struct","fields":[{"name":"actions","type":{"vec":{"defined":{"name":"Action"}}}},{"name":"quoted_out_amount","docs":["Quoted output amount for the swap after platform fee"],"type":"u64"},{"name":"slippage_bps","docs":["Max allowed slippage in basis points. Along with `quoted_out_amount`, this is used to","calculate the minimum allowed output amount for the swap."],"type":"u16"},{"name":"platform_fee_bps","docs":["Platform fee in basis points. If nonzero, this percentage of the output amount will be","transferred to the platform fee account, and the instruction must include the platform fee","account as the last account. The platform fee account must be a valid token account for the","output mint, and it must specify the public key of the Referral program's DFlow project as","its owner."],"type":"u16"}]}},{"name":"TesseraVDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"TesseraVSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"TokenSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"TransferFeeOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"VaultSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"VertigoSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"WhirlpoolsSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"WhirlpoolsSwapV2Options","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"WrapSolOptions","type":{"kind":"struct","fields":[{"name":"lamports","type":"u64"}]}},{"name":"XoCashExchangeSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}},{"name":"ZeroFiDynamicRouteV1Options","type":{"kind":"struct","fields":[]}},{"name":"ZeroFiSwapOptions","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"orchestrator_flags","docs":["Optional flags for the swap"],"type":{"defined":{"name":"OrchestratorFlags"}}}]}}]} \ No newline at end of file diff --git a/idls/drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json b/idls/drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json new file mode 100644 index 0000000..ce5f81e --- /dev/null +++ b/idls/drift_v2.dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH.json @@ -0,0 +1 @@ +{"version":"2.150.0","name":"drift","instructions":[{"name":"initializeUser","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"subAccountId","type":"u16"},{"name":"name","type":{"array":["u8",32]}}]},{"name":"initializeUserStats","accounts":[{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeSignedMsgUserOrders","accounts":[{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"resizeSignedMsgUserOrders","accounts":[{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"user","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"initializeSignedMsgWsDelegates","accounts":[{"name":"signedMsgWsDelegates","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"delegates","type":{"vec":"publicKey"}}]},{"name":"changeSignedMsgWsDelegateStatus","accounts":[{"name":"signedMsgWsDelegates","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"delegate","type":"publicKey"},{"name":"add","type":"bool"}]},{"name":"initializeFuelOverflow","accounts":[{"name":"fuelOverflow","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"sweepFuel","accounts":[{"name":"fuelOverflow","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true}],"args":[]},{"name":"resetFuelSeason","accounts":[{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"initializeReferrerName","accounts":[{"name":"referrerName","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":{"array":["u8",32]}}]},{"name":"deposit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"},{"name":"reduceOnly","type":"bool"}]},{"name":"withdraw","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"},{"name":"reduceOnly","type":"bool"}]},{"name":"transferDeposit","accounts":[{"name":"fromUser","isMut":true,"isSigner":false},{"name":"toUser","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"transferPools","accounts":[{"name":"fromUser","isMut":true,"isSigner":false},{"name":"toUser","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"depositFromSpotMarketVault","isMut":true,"isSigner":false},{"name":"depositToSpotMarketVault","isMut":true,"isSigner":false},{"name":"borrowFromSpotMarketVault","isMut":true,"isSigner":false},{"name":"borrowToSpotMarketVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[{"name":"depositFromMarketIndex","type":"u16"},{"name":"depositToMarketIndex","type":"u16"},{"name":"borrowFromMarketIndex","type":"u16"},{"name":"borrowToMarketIndex","type":"u16"},{"name":"depositAmount","type":{"option":"u64"}},{"name":"borrowAmount","type":{"option":"u64"}}]},{"name":"transferPerpPosition","accounts":[{"name":"fromUser","isMut":true,"isSigner":false},{"name":"toUser","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":{"option":"i64"}}]},{"name":"placePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}}]},{"name":"cancelOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"orderId","type":{"option":"u32"}}]},{"name":"cancelOrderByUserId","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"userOrderId","type":"u8"}]},{"name":"cancelOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"marketType","type":{"option":{"defined":"MarketType"}}},{"name":"marketIndex","type":{"option":"u16"}},{"name":"direction","type":{"option":{"defined":"PositionDirection"}}}]},{"name":"cancelOrdersByIds","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"orderIds","type":{"vec":"u32"}}]},{"name":"modifyOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"orderId","type":{"option":"u32"}},{"name":"modifyOrderParams","type":{"defined":"ModifyOrderParams"}}]},{"name":"modifyOrderByUserId","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"userOrderId","type":"u8"},{"name":"modifyOrderParams","type":{"defined":"ModifyOrderParams"}}]},{"name":"placeAndTakePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"successCondition","type":{"option":"u32"}}]},{"name":"placeAndMakePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"taker","isMut":true,"isSigner":false},{"name":"takerStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"takerOrderId","type":"u32"}]},{"name":"placeAndMakeSignedMsgPerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"taker","isMut":true,"isSigner":false},{"name":"takerStats","isMut":true,"isSigner":false},{"name":"takerSignedMsgUserOrders","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"signedMsgOrderUuid","type":{"array":["u8",8]}}]},{"name":"placeSignedMsgTakerOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"ixSysvar","isMut":false,"isSigner":false,"docs":["the supplied Sysvar could be anything else.","The Instruction Sysvar has not been implemented","in the Anchor framework yet, so this is the safe approach."]}],"args":[{"name":"signedMsgOrderParamsMessageBytes","type":"bytes"},{"name":"isDelegateSigner","type":"bool"}]},{"name":"placeSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}}]},{"name":"placeAndTakeSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"fulfillmentType","type":{"option":{"defined":"SpotFulfillmentType"}}},{"name":"makerOrderId","type":{"option":"u32"}}]},{"name":"placeAndMakeSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"taker","isMut":true,"isSigner":false},{"name":"takerStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"OrderParams"}},{"name":"takerOrderId","type":"u32"},{"name":"fulfillmentType","type":{"option":{"defined":"SpotFulfillmentType"}}}]},{"name":"placeOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"vec":{"defined":"OrderParams"}}}]},{"name":"beginSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outSpotMarketVault","isMut":true,"isSigner":false},{"name":"inSpotMarketVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"amountIn","type":"u64"}]},{"name":"endSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outSpotMarketVault","isMut":true,"isSigner":false},{"name":"inSpotMarketVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"limitPrice","type":{"option":"u64"}},{"name":"reduceOnly","type":{"option":{"defined":"SwapReduceOnly"}}}]},{"name":"updateUserName","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"name","type":{"array":["u8",32]}}]},{"name":"updateUserCustomMarginRatio","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"marginRatio","type":"u32"}]},{"name":"updateUserPerpPositionCustomMarginRatio","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"perpMarketIndex","type":"u16"},{"name":"marginRatio","type":"u16"}]},{"name":"updateUserMarginTradingEnabled","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"marginTradingEnabled","type":"bool"}]},{"name":"updateUserPoolId","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"poolId","type":"u8"}]},{"name":"updateUserDelegate","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"delegate","type":"publicKey"}]},{"name":"updateUserReduceOnly","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"subAccountId","type":"u16"},{"name":"reduceOnly","type":"bool"}]},{"name":"updateUserProtectedMakerOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"protectedMakerModeConfig","isMut":true,"isSigner":false}],"args":[{"name":"subAccountId","type":"u16"},{"name":"protectedMakerOrders","type":"bool"}]},{"name":"deleteUser","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[]},{"name":"forceDeleteUser","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[]},{"name":"deleteSignedMsgUserOrders","accounts":[{"name":"signedMsgUserOrders","isMut":true,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"reclaimRent","accounts":[{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"enableUserHighLeverageMode","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false}],"args":[{"name":"subAccountId","type":"u16"}]},{"name":"fillPerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"fillerStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":{"option":"u32"}},{"name":"makerOrderId","type":{"option":"u32"}}]},{"name":"revertFill","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"fillerStats","isMut":true,"isSigner":false}],"args":[]},{"name":"fillSpotOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"fillerStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":{"option":"u32"}},{"name":"fulfillmentType","type":{"option":{"defined":"SpotFulfillmentType"}}},{"name":"makerOrderId","type":{"option":"u32"}}]},{"name":"triggerOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":"u32"}]},{"name":"forceCancelOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"updateUserIdle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"filler","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"logUserBalances","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"disableUserHighLeverageMode","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"user","isMut":true,"isSigner":false},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false}],"args":[{"name":"disableMaintenance","type":"bool"}]},{"name":"updateUserStatsReferrerStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"userStats","isMut":true,"isSigner":false}],"args":[]},{"name":"adminUpdateUserStatsPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"settlePnl","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"settleMultiplePnls","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[{"name":"marketIndexes","type":{"vec":"u16"}},{"name":"mode","type":{"defined":"SettlePnlMode"}}]},{"name":"settleFundingPayment","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false}],"args":[]},{"name":"settleExpiredMarket","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"liquidatePerp","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"liquidatorMaxBaseAssetAmount","type":"u64"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"liquidatePerpWithFill","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"liquidateSpot","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"assetMarketIndex","type":"u16"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"liquidatorMaxLiabilityTransfer","type":"u128"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"liquidateSpotWithSwapBegin","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"liabilitySpotMarketVault","isMut":true,"isSigner":false},{"name":"assetSpotMarketVault","isMut":true,"isSigner":false},{"name":"liabilityTokenAccount","isMut":true,"isSigner":false},{"name":"assetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"assetMarketIndex","type":"u16"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"swapAmount","type":"u64"}]},{"name":"liquidateSpotWithSwapEnd","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"liabilitySpotMarketVault","isMut":true,"isSigner":false},{"name":"assetSpotMarketVault","isMut":true,"isSigner":false},{"name":"liabilityTokenAccount","isMut":true,"isSigner":false},{"name":"assetTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"assetMarketIndex","type":"u16"},{"name":"liabilityMarketIndex","type":"u16"}]},{"name":"liquidateBorrowForPerpPnl","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"},{"name":"spotMarketIndex","type":"u16"},{"name":"liquidatorMaxLiabilityTransfer","type":"u128"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"liquidatePerpPnlForDeposit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"},{"name":"spotMarketIndex","type":"u16"},{"name":"liquidatorMaxPnlTransfer","type":"u128"},{"name":"limitPrice","type":{"option":"u64"}}]},{"name":"setUserStatusToBeingLiquidated","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"resolvePerpPnlDeficit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"},{"name":"perpMarketIndex","type":"u16"}]},{"name":"resolvePerpBankruptcy","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"quoteSpotMarketIndex","type":"u16"},{"name":"marketIndex","type":"u16"}]},{"name":"resolveSpotBankruptcy","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"liquidator","isMut":true,"isSigner":false},{"name":"liquidatorStats","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"settleRevenueToInsuranceFund","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"}]},{"name":"updateFundingRate","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"updatePrelaunchOracle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":true,"isSigner":false}],"args":[]},{"name":"updatePerpBidAskTwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"keeperStats","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"updateSpotMarketCumulativeInterest","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAmms","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"marketIndexes","type":{"vec":"u16"}}]},{"name":"updateSpotMarketExpiry","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"expiryTs","type":"i64"}]},{"name":"updateUserQuoteAssetInsuranceStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[]},{"name":"updateUserGovTokenInsuranceStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[]},{"name":"updateDelegateUserGovTokenInsuranceStake","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":false,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeInsuranceFundStake","accounts":[{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"addInsuranceFundStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"requestRemoveInsuranceFundStake","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"cancelRequestRemoveInsuranceFundStake","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"removeInsuranceFundStake","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"beginInsuranceFundSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"outInsuranceFundVault","isMut":true,"isSigner":false},{"name":"inInsuranceFundVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"amountIn","type":"u64"}]},{"name":"endInsuranceFundSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"outInsuranceFundVault","isMut":true,"isSigner":false},{"name":"inInsuranceFundVault","isMut":true,"isSigner":false},{"name":"outTokenAccount","isMut":true,"isSigner":false},{"name":"inTokenAccount","isMut":true,"isSigner":false},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"}]},{"name":"transferProtocolIfSharesToRevenuePool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"depositIntoInsuranceFundStake","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"insuranceFundStake","isMut":true,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"updatePythPullOracle","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"encodedVaa","isMut":false,"isSigner":false},{"name":"priceFeed","isMut":true,"isSigner":false}],"args":[{"name":"feedId","type":{"array":["u8",32]}},{"name":"params","type":"bytes"}]},{"name":"postPythPullOracleUpdateAtomic","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"guardianSet","isMut":false,"isSigner":false},{"name":"priceFeed","isMut":true,"isSigner":false}],"args":[{"name":"feedId","type":{"array":["u8",32]}},{"name":"params","type":"bytes"}]},{"name":"postMultiPythPullOracleUpdatesAtomic","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"guardianSet","isMut":false,"isSigner":false}],"args":[{"name":"params","type":"bytes"}]},{"name":"pauseSpotMarketDepositWithdraw","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":false,"isSigner":true},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":false,"isSigner":false}],"args":[]},{"name":"initialize","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"quoteAssetMint","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeSpotMarket","accounts":[{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketMint","isMut":false,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"optimalUtilization","type":"u32"},{"name":"optimalBorrowRate","type":"u32"},{"name":"maxBorrowRate","type":"u32"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"initialAssetWeight","type":"u32"},{"name":"maintenanceAssetWeight","type":"u32"},{"name":"initialLiabilityWeight","type":"u32"},{"name":"maintenanceLiabilityWeight","type":"u32"},{"name":"imfFactor","type":"u32"},{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"},{"name":"activeStatus","type":"bool"},{"name":"assetTier","type":{"defined":"AssetTier"}},{"name":"scaleInitialAssetWeightStart","type":"u64"},{"name":"withdrawGuardThreshold","type":"u64"},{"name":"orderTickSize","type":"u64"},{"name":"orderStepSize","type":"u64"},{"name":"ifTotalFactor","type":"u32"},{"name":"name","type":{"array":["u8",32]}}]},{"name":"deleteInitializedSpotMarket","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"insuranceFundVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"initializeSerumFulfillmentConfig","accounts":[{"name":"baseSpotMarket","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"serumProgram","isMut":false,"isSigner":false},{"name":"serumMarket","isMut":false,"isSigner":false},{"name":"serumOpenOrders","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"serumFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"updateSerumFulfillmentConfigStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"serumFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}}]},{"name":"initializeOpenbookV2FulfillmentConfig","accounts":[{"name":"baseSpotMarket","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"openbookV2Program","isMut":false,"isSigner":false},{"name":"openbookV2Market","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"openbookV2FulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"openbookV2FulfillmentConfigStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"openbookV2FulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}}]},{"name":"initializePhoenixFulfillmentConfig","accounts":[{"name":"baseSpotMarket","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"phoenixProgram","isMut":false,"isSigner":false},{"name":"phoenixMarket","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"phoenixFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"phoenixFulfillmentConfigStatus","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"phoenixFulfillmentConfig","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}}]},{"name":"initializePerpMarket","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"ammBaseAssetReserve","type":"u128"},{"name":"ammQuoteAssetReserve","type":"u128"},{"name":"ammPeriodicity","type":"i64"},{"name":"ammPegMultiplier","type":"u128"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"contractTier","type":{"defined":"ContractTier"}},{"name":"marginRatioInitial","type":"u32"},{"name":"marginRatioMaintenance","type":"u32"},{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"},{"name":"imfFactor","type":"u32"},{"name":"activeStatus","type":"bool"},{"name":"baseSpread","type":"u32"},{"name":"maxSpread","type":"u32"},{"name":"maxOpenInterest","type":"u128"},{"name":"maxRevenueWithdrawPerPeriod","type":"u64"},{"name":"quoteMaxInsurance","type":"u64"},{"name":"orderStepSize","type":"u64"},{"name":"orderTickSize","type":"u64"},{"name":"minOrderSize","type":"u64"},{"name":"concentrationCoefScale","type":"u128"},{"name":"curveUpdateIntensity","type":"u8"},{"name":"ammJitIntensity","type":"u8"},{"name":"name","type":{"array":["u8",32]}},{"name":"lpPoolId","type":"u8"}]},{"name":"initializeAmmCache","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"addMarketToAmmCache","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"deleteAmmCache","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[]},{"name":"updateInitialAmmCacheInfo","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[]},{"name":"initializePredictionMarket","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"deleteInitializedPerpMarket","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"}]},{"name":"moveAmmPrice","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"baseAssetReserve","type":"u128"},{"name":"quoteAssetReserve","type":"u128"},{"name":"sqrtK","type":"u128"}]},{"name":"recenterPerpMarketAmm","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"pegMultiplier","type":"u128"},{"name":"sqrtK","type":"u128"}]},{"name":"recenterPerpMarketAmmCrank","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"depth","type":{"option":"u128"}}]},{"name":"updatePerpMarketAmmSummaryStats","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdatePerpMarketSummaryStatsParams"}}]},{"name":"updatePerpMarketExpiry","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"expiryTs","type":"i64"}]},{"name":"updatePerpMarketLpPoolPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"lpPausedOperations","type":"u8"}]},{"name":"updatePerpMarketLpPoolStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[{"name":"lpStatus","type":"u8"}]},{"name":"updatePerpMarketLpPoolFeeTransferScalar","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"optionalLpFeeTransferScalar","type":{"option":"u8"}},{"name":"optionalLpNetPnlTransferScalar","type":{"option":"u8"}}]},{"name":"settleExpiredMarketPoolsToRevenuePool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"depositIntoPerpMarketFeePool","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"sourceVault","isMut":true,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"quoteSpotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"updatePerpMarketPnlPool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositIntoSpotMarketVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"sourceVault","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositIntoSpotMarketRevenuePool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"repegAmmCurve","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"newPegCandidate","type":"u128"}]},{"name":"updatePerpMarketAmmOracleTwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"resetPerpMarketAmmOracleTwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"updateK","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"sqrtK","type":"u128"}]},{"name":"updatePerpMarketMarginRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marginRatioInitial","type":"u32"},{"name":"marginRatioMaintenance","type":"u32"}]},{"name":"updatePerpMarketHighLeverageMarginRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"marginRatioInitial","type":"u16"},{"name":"marginRatioMaintenance","type":"u16"}]},{"name":"updatePerpMarketFundingPeriod","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"fundingPeriod","type":"i64"}]},{"name":"updatePerpMarketMaxImbalances","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"unrealizedMaxImbalance","type":"u64"},{"name":"maxRevenueWithdrawPerPeriod","type":"u64"},{"name":"quoteMaxInsurance","type":"u64"}]},{"name":"updatePerpMarketLiquidationFee","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"}]},{"name":"updatePerpMarketLpPoolId","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"lpPoolId","type":"u8"}]},{"name":"updateInsuranceFundUnstakingPeriod","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"insuranceFundUnstakingPeriod","type":"i64"}]},{"name":"updateSpotMarketPoolId","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"poolId","type":"u8"}]},{"name":"updateSpotMarketLiquidationFee","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"liquidatorFee","type":"u32"},{"name":"ifLiquidationFee","type":"u32"}]},{"name":"updateWithdrawGuardThreshold","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"withdrawGuardThreshold","type":"u64"}]},{"name":"updateSpotMarketIfFactor","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"},{"name":"userIfFactor","type":"u32"},{"name":"totalIfFactor","type":"u32"}]},{"name":"updateSpotMarketRevenueSettlePeriod","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"revenueSettlePeriod","type":"i64"}]},{"name":"updateSpotMarketStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"status","type":{"defined":"MarketStatus"}}]},{"name":"updateSpotMarketPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updateSpotMarketAssetTier","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"assetTier","type":{"defined":"AssetTier"}}]},{"name":"updateSpotMarketMarginWeights","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"initialAssetWeight","type":"u32"},{"name":"maintenanceAssetWeight","type":"u32"},{"name":"initialLiabilityWeight","type":"u32"},{"name":"maintenanceLiabilityWeight","type":"u32"},{"name":"imfFactor","type":"u32"}]},{"name":"updateSpotMarketBorrowRate","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"optimalUtilization","type":"u32"},{"name":"optimalBorrowRate","type":"u32"},{"name":"maxBorrowRate","type":"u32"},{"name":"minBorrowRate","type":{"option":"u8"}}]},{"name":"updateSpotMarketMaxTokenDeposits","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxTokenDeposits","type":"u64"}]},{"name":"updateSpotMarketMaxTokenBorrows","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxTokenBorrowsFraction","type":"u16"}]},{"name":"updateSpotMarketScaleInitialAssetWeightStart","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"scaleInitialAssetWeightStart","type":"u64"}]},{"name":"updateSpotMarketOracle","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oldOracle","isMut":false,"isSigner":false}],"args":[{"name":"oracle","type":"publicKey"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"skipInvariantCheck","type":"bool"}]},{"name":"updateSpotMarketStepSizeAndTickSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"stepSize","type":"u64"},{"name":"tickSize","type":"u64"}]},{"name":"updateSpotMarketMinOrderSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"orderSize","type":"u64"}]},{"name":"updateSpotMarketOrdersEnabled","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"ordersEnabled","type":"bool"}]},{"name":"updateSpotMarketIfPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updateSpotMarketName","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"name","type":{"array":["u8",32]}}]},{"name":"updatePerpMarketStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"status","type":{"defined":"MarketStatus"}}]},{"name":"updatePerpMarketPausedOperations","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updatePerpMarketContractTier","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"contractTier","type":{"defined":"ContractTier"}}]},{"name":"updatePerpMarketImfFactor","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"imfFactor","type":"u32"},{"name":"unrealizedPnlImfFactor","type":"u32"}]},{"name":"updatePerpMarketUnrealizedAssetWeight","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"unrealizedInitialAssetWeight","type":"u32"},{"name":"unrealizedMaintenanceAssetWeight","type":"u32"}]},{"name":"updatePerpMarketConcentrationCoef","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"concentrationScale","type":"u128"}]},{"name":"updatePerpMarketCurveUpdateIntensity","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"curveUpdateIntensity","type":"u8"}]},{"name":"updatePerpMarketReferencePriceOffsetDeadbandPct","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"referencePriceOffsetDeadbandPct","type":"u8"}]},{"name":"updatePerpFeeStructure","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"feeStructure","type":{"defined":"FeeStructure"}}]},{"name":"updateSpotFeeStructure","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"feeStructure","type":{"defined":"FeeStructure"}}]},{"name":"updateInitialPctToLiquidate","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"initialPctToLiquidate","type":"u16"}]},{"name":"updateLiquidationDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"liquidationDuration","type":"u8"}]},{"name":"updateLiquidationMarginBufferRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"liquidationMarginBufferRatio","type":"u32"}]},{"name":"updateOracleGuardRails","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"oracleGuardRails","type":{"defined":"OracleGuardRails"}}]},{"name":"updateStateSettlementDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"settlementDuration","type":"u16"}]},{"name":"updateStateMaxNumberOfSubAccounts","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"maxNumberOfSubAccounts","type":"u16"}]},{"name":"updateStateMaxInitializeUserFee","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"maxInitializeUserFee","type":"u16"}]},{"name":"updatePerpMarketOracle","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oldOracle","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[{"name":"oracle","type":"publicKey"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"skipInvariantCheck","type":"bool"}]},{"name":"updatePerpMarketBaseSpread","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"baseSpread","type":"u32"}]},{"name":"updateAmmJitIntensity","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"ammJitIntensity","type":"u8"}]},{"name":"updatePerpMarketMaxSpread","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxSpread","type":"u32"}]},{"name":"updatePerpMarketStepSizeAndTickSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"stepSize","type":"u64"},{"name":"tickSize","type":"u64"}]},{"name":"updatePerpMarketName","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"name","type":{"array":["u8",32]}}]},{"name":"updatePerpMarketMinOrderSize","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"orderSize","type":"u64"}]},{"name":"updatePerpMarketMaxSlippageRatio","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxSlippageRatio","type":"u16"}]},{"name":"updatePerpMarketMaxFillReserveFraction","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxFillReserveFraction","type":"u16"}]},{"name":"updatePerpMarketMaxOpenInterest","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"maxOpenInterest","type":"u128"}]},{"name":"updatePerpMarketNumberOfUsers","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"numberOfUsers","type":{"option":"u32"}},{"name":"numberOfUsersWithBase","type":{"option":"u32"}}]},{"name":"updatePerpMarketFeeAdjustment","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"feeAdjustment","type":"i16"}]},{"name":"updateSpotMarketFeeAdjustment","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false}],"args":[{"name":"feeAdjustment","type":"i16"}]},{"name":"updatePerpMarketProtectedMakerParams","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"protectedMakerLimitPriceDivisor","type":{"option":"u8"}},{"name":"protectedMakerDynamicDivisor","type":{"option":"u8"}}]},{"name":"updatePerpMarketOracleLowRiskSlotDelayOverride","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"oracleLowRiskSlotDelayOverride","type":"i8"}]},{"name":"updatePerpMarketAmmSpreadAdjustment","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"ammSpreadAdjustment","type":"i8"},{"name":"ammInventorySpreadAdjustment","type":"i8"},{"name":"referencePriceOffset","type":"i32"}]},{"name":"updatePerpMarketOracleSlotDelayOverride","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[{"name":"oracleSlotDelayOverride","type":"i8"}]},{"name":"updateAdmin","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"admin","type":"publicKey"}]},{"name":"updateDiscountMint","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"discountMint","type":"publicKey"}]},{"name":"updateExchangeStatus","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"exchangeStatus","type":"u8"}]},{"name":"updatePerpAuctionDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"minPerpAuctionDuration","type":"u8"}]},{"name":"updateSpotAuctionDuration","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"defaultSpotAuctionDuration","type":"u8"}]},{"name":"initializePrelaunchOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"prelaunchOracle","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PrelaunchOracleParams"}}]},{"name":"updatePrelaunchOracleParams","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"prelaunchOracle","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PrelaunchOracleParams"}}]},{"name":"deletePrelaunchOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"prelaunchOracle","isMut":true,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"}]},{"name":"initializePythPullOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"pythSolanaReceiver","isMut":false,"isSigner":false},{"name":"priceFeed","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"feedId","type":{"array":["u8",32]}}]},{"name":"initializePythLazerOracle","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lazerOracle","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"feedId","type":"u32"}]},{"name":"postPythLazerOracleUpdate","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pythLazerStorage","isMut":false,"isSigner":false},{"name":"ixSysvar","isMut":false,"isSigner":false}],"args":[{"name":"pythMessage","type":"bytes"}]},{"name":"initializeHighLeverageModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"}]},{"name":"updateHighLeverageModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"highLeverageModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"},{"name":"reduceOnly","type":"bool"},{"name":"currentUsers","type":{"option":"u32"}}]},{"name":"initializeProtectedMakerModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"protectedMakerModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"}]},{"name":"updateProtectedMakerModeConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"protectedMakerModeConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"maxUsers","type":"u32"},{"name":"reduceOnly","type":"bool"},{"name":"currentUsers","type":{"option":"u32"}}]},{"name":"adminDeposit","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"adminTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"amount","type":"u64"}]},{"name":"initializeIfRebalanceConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IfRebalanceConfigParams"}}]},{"name":"updateIfRebalanceConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"ifRebalanceConfig","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IfRebalanceConfigParams"}}]},{"name":"updateFeatureBitFlagsMmOracle","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"zeroMmOracleFields","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"updateFeatureBitFlagsMedianTriggerPrice","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"updateFeatureBitFlagsBuilderCodes","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"initializeRevenueShare","accounts":[{"name":"revenueShare","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeRevenueShareEscrow","accounts":[{"name":"escrow","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userStats","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"resizeRevenueShareEscrowOrders","accounts":[{"name":"escrow","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"numOrders","type":"u16"}]},{"name":"changeApprovedBuilder","accounts":[{"name":"escrow","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"builder","type":"publicKey"},{"name":"maxFeeBps","type":"u16"},{"name":"add","type":"bool"}]},{"name":"initializeLpPool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"lpPoolTokenVault","isMut":true,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"constituentCorrelations","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"lpPoolId","type":"u8"},{"name":"minMintFee","type":"i64"},{"name":"maxAum","type":"u128"},{"name":"maxSettleQuoteAmountPerMarket","type":"u64"},{"name":"whitelistMint","type":"publicKey"}]},{"name":"updateFeatureBitFlagsSettleLpPool","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"updateFeatureBitFlagsSwapLpPool","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"updateFeatureBitFlagsMintRedeemLpPool","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"state","isMut":true,"isSigner":false}],"args":[{"name":"enable","type":"bool"}]},{"name":"initializeConstituent","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"constituentCorrelations","isMut":true,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"spotMarketMint","isMut":false,"isSigner":false},{"name":"constituentVault","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"spotMarketIndex","type":"u16"},{"name":"decimals","type":"u8"},{"name":"maxWeightDeviation","type":"i64"},{"name":"swapFeeMin","type":"i64"},{"name":"swapFeeMax","type":"i64"},{"name":"maxBorrowTokenAmount","type":"u64"},{"name":"oracleStalenessThreshold","type":"u64"},{"name":"costToTrade","type":"i32"},{"name":"constituentDerivativeIndex","type":{"option":"i16"}},{"name":"constituentDerivativeDepegThreshold","type":"u64"},{"name":"derivativeWeight","type":"u64"},{"name":"volatility","type":"u64"},{"name":"gammaExecution","type":"u8"},{"name":"gammaInventory","type":"u8"},{"name":"xi","type":"u8"},{"name":"newConstituentCorrelations","type":{"vec":"i64"}}]},{"name":"updateConstituentStatus","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false}],"args":[{"name":"newStatus","type":"u8"}]},{"name":"updateConstituentPausedOperations","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false}],"args":[{"name":"pausedOperations","type":"u8"}]},{"name":"updateConstituentParams","accounts":[{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false}],"args":[{"name":"constituentParams","type":{"defined":"ConstituentParams"}}]},{"name":"updateLpPoolParams","accounts":[{"name":"lpPool","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"lpPoolParams","type":{"defined":"LpPoolParams"}}]},{"name":"addAmmConstituentMappingData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"ammConstituentMappingData","type":{"vec":{"defined":"AddAmmConstituentMappingDatum"}}}]},{"name":"updateAmmConstituentMappingData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"ammConstituentMappingData","type":{"vec":{"defined":"AddAmmConstituentMappingDatum"}}}]},{"name":"removeAmmConstituentMappingData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"ammConstituentMapping","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"perpMarketIndex","type":"u16"},{"name":"constituentIndex","type":"u16"}]},{"name":"updateConstituentCorrelationData","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentCorrelations","isMut":true,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"index1","type":"u16"},{"name":"index2","type":"u16"},{"name":"correlation","type":"i64"}]},{"name":"updateLpConstituentTargetBase","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"ammConstituentMapping","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"ammCache","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false}],"args":[]},{"name":"updateLpPoolAum","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":true,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[]},{"name":"updateAmmCache","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"state","isMut":false,"isSigner":false},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"quoteMarket","isMut":false,"isSigner":false}],"args":[]},{"name":"overrideAmmCacheInfo","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"ammCache","isMut":true,"isSigner":false}],"args":[{"name":"marketIndex","type":"u16"},{"name":"overrideParams","type":{"defined":"OverrideAmmCacheParams"}}]},{"name":"lpPoolSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"constituentCorrelations","isMut":false,"isSigner":false},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false},{"name":"userInTokenAccount","isMut":true,"isSigner":false},{"name":"userOutTokenAccount","isMut":true,"isSigner":false},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false},{"name":"inMarketMint","isMut":false,"isSigner":false},{"name":"outMarketMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]},{"name":"viewLpPoolSwapFees","accounts":[{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"constituentCorrelations","isMut":false,"isSigner":false},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"},{"name":"inTargetWeight","type":"i64"},{"name":"outTargetWeight","type":"i64"}]},{"name":"lpPoolAddLiquidity","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"inMarketMint","isMut":false,"isSigner":false},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"userInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"userLpTokenAccount","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"lpPoolTokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u128"},{"name":"minMintAmount","type":"u64"}]},{"name":"lpPoolRemoveLiquidity","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outMarketMint","isMut":false,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false},{"name":"userOutTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false},{"name":"userLpTokenAccount","isMut":true,"isSigner":false},{"name":"spotMarketTokenAccount","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false},{"name":"lpPoolTokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"ammCache","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"},{"name":"minOutAmount","type":"u128"}]},{"name":"viewLpPoolAddLiquidityFees","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"inMarketMint","isMut":false,"isSigner":false},{"name":"inConstituent","isMut":false,"isSigner":false},{"name":"lpMint","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u128"}]},{"name":"viewLpPoolRemoveLiquidityFees","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"outMarketMint","isMut":false,"isSigner":false},{"name":"outConstituent","isMut":false,"isSigner":false},{"name":"lpMint","isMut":false,"isSigner":false},{"name":"constituentTargetBase","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"inAmount","type":"u64"}]},{"name":"beginLpSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"signerOutTokenAccount","isMut":true,"isSigner":false,"docs":["Signer token accounts"]},{"name":"signerInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false,"docs":["Constituent token accounts"]},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false,"docs":["Constituents"]},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"},{"name":"amountIn","type":"u64"}]},{"name":"endLpSwap","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"signerOutTokenAccount","isMut":true,"isSigner":false,"docs":["Signer token accounts"]},{"name":"signerInTokenAccount","isMut":true,"isSigner":false},{"name":"constituentOutTokenAccount","isMut":true,"isSigner":false,"docs":["Constituent token accounts"]},{"name":"constituentInTokenAccount","isMut":true,"isSigner":false},{"name":"outConstituent","isMut":true,"isSigner":false,"docs":["Constituents"]},{"name":"inConstituent","isMut":true,"isSigner":false},{"name":"lpPool","isMut":false,"isSigner":false},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Instructions Sysvar for instruction introspection"]},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"inMarketIndex","type":"u16"},{"name":"outMarketIndex","type":"u16"}]},{"name":"updateConstituentOracleInfo","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"constituent","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[]},{"name":"depositToProgramVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"constituent","isMut":true,"isSigner":false},{"name":"constituentTokenAccount","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawFromProgramVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"driftSigner","isMut":false,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false},{"name":"constituentTokenAccount","isMut":true,"isSigner":false},{"name":"spotMarket","isMut":true,"isSigner":false},{"name":"spotMarketVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"settlePerpToLpPool","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"lpPool","isMut":true,"isSigner":false},{"name":"keeper","isMut":true,"isSigner":true},{"name":"ammCache","isMut":true,"isSigner":false},{"name":"quoteMarket","isMut":true,"isSigner":false},{"name":"constituent","isMut":true,"isSigner":false},{"name":"constituentQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"driftSigner","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"AmmCache","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"cache","type":{"vec":{"defined":"CacheInfo"}}}]}},{"name":"OpenbookV2FulfillmentConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"openbookV2ProgramId","type":"publicKey"},{"name":"openbookV2Market","type":"publicKey"},{"name":"openbookV2MarketAuthority","type":"publicKey"},{"name":"openbookV2EventHeap","type":"publicKey"},{"name":"openbookV2Bids","type":"publicKey"},{"name":"openbookV2Asks","type":"publicKey"},{"name":"openbookV2BaseVault","type":"publicKey"},{"name":"openbookV2QuoteVault","type":"publicKey"},{"name":"marketIndex","type":"u16"},{"name":"fulfillmentType","type":{"defined":"SpotFulfillmentType"}},{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"PhoenixV1FulfillmentConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"phoenixProgramId","type":"publicKey"},{"name":"phoenixLogAuthority","type":"publicKey"},{"name":"phoenixMarket","type":"publicKey"},{"name":"phoenixBaseVault","type":"publicKey"},{"name":"phoenixQuoteVault","type":"publicKey"},{"name":"marketIndex","type":"u16"},{"name":"fulfillmentType","type":{"defined":"SpotFulfillmentType"}},{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"SerumV3FulfillmentConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"serumProgramId","type":"publicKey"},{"name":"serumMarket","type":"publicKey"},{"name":"serumRequestQueue","type":"publicKey"},{"name":"serumEventQueue","type":"publicKey"},{"name":"serumBids","type":"publicKey"},{"name":"serumAsks","type":"publicKey"},{"name":"serumBaseVault","type":"publicKey"},{"name":"serumQuoteVault","type":"publicKey"},{"name":"serumOpenOrders","type":"publicKey"},{"name":"serumSignerNonce","type":"u64"},{"name":"marketIndex","type":"u16"},{"name":"fulfillmentType","type":{"defined":"SpotFulfillmentType"}},{"name":"status","type":{"defined":"SpotFulfillmentConfigStatus"}},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"HighLeverageModeConfig","type":{"kind":"struct","fields":[{"name":"maxUsers","type":"u32"},{"name":"currentUsers","type":"u32"},{"name":"reduceOnly","type":"u8"},{"name":"padding1","type":{"array":["u8",3]}},{"name":"currentMaintenanceUsers","type":"u32"},{"name":"padding2","type":{"array":["u8",24]}}]}},{"name":"IfRebalanceConfig","type":{"kind":"struct","fields":[{"name":"pubkey","type":"publicKey"},{"name":"totalInAmount","docs":["total amount to be sold"],"type":"u64"},{"name":"currentInAmount","docs":["amount already sold"],"type":"u64"},{"name":"currentOutAmount","docs":["amount already bought"],"type":"u64"},{"name":"currentOutAmountTransferred","docs":["amount already transferred to revenue pool"],"type":"u64"},{"name":"currentInAmountSinceLastTransfer","docs":["amount already bought in epoch"],"type":"u64"},{"name":"epochStartTs","docs":["start time of epoch"],"type":"i64"},{"name":"epochInAmount","docs":["amount already bought in epoch"],"type":"u64"},{"name":"epochMaxInAmount","docs":["max amount to swap in epoch"],"type":"u64"},{"name":"epochDuration","docs":["duration of epoch"],"type":"i64"},{"name":"outMarketIndex","docs":["market index to sell"],"type":"u16"},{"name":"inMarketIndex","docs":["market index to buy"],"type":"u16"},{"name":"maxSlippageBps","type":"u16"},{"name":"swapMode","type":"u8"},{"name":"status","type":"u8"},{"name":"padding2","type":{"array":["u8",32]}}]}},{"name":"InsuranceFundStake","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"ifShares","type":"u128"},{"name":"lastWithdrawRequestShares","type":"u128"},{"name":"ifBase","type":"u128"},{"name":"lastValidTs","type":"i64"},{"name":"lastWithdrawRequestValue","type":"u64"},{"name":"lastWithdrawRequestTs","type":"i64"},{"name":"costBasis","type":"i64"},{"name":"marketIndex","type":"u16"},{"name":"padding","type":{"array":["u8",14]}}]}},{"name":"ProtocolIfSharesTransferConfig","type":{"kind":"struct","fields":[{"name":"whitelistedSigners","type":{"array":["publicKey",4]}},{"name":"maxTransferPerEpoch","type":"u128"},{"name":"currentEpochTransfer","type":"u128"},{"name":"nextEpochTs","type":"i64"},{"name":"padding","type":{"array":["u128",8]}}]}},{"name":"LPPool","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["address of the vault."],"type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"whitelistMint","type":"publicKey"},{"name":"constituentTargetBase","type":"publicKey"},{"name":"constituentCorrelations","type":"publicKey"},{"name":"maxAum","docs":["The current number of VaultConstituents in the vault, each constituent is pda(LPPool.address, constituent_index)","which constituent is the quote, receives revenue pool distributions. (maybe this should just be implied idx 0)","pub quote_constituent_index: u16,","QUOTE_PRECISION: Max AUM, Prohibit minting new DLP beyond this"],"type":"u128"},{"name":"lastAum","docs":["QUOTE_PRECISION: AUM of the vault in USD, updated lazily"],"type":"u128"},{"name":"cumulativeQuoteSentToPerpMarkets","docs":["QUOTE PRECISION: Cumulative quotes from settles"],"type":"u128"},{"name":"cumulativeQuoteReceivedFromPerpMarkets","type":"u128"},{"name":"totalMintRedeemFeesPaid","docs":["QUOTE_PRECISION: Total fees paid for minting and redeeming LP tokens"],"type":"i128"},{"name":"lastAumSlot","docs":["timestamp of last AUM slot"],"type":"u64"},{"name":"maxSettleQuoteAmount","type":"u64"},{"name":"padding","docs":["timestamp of last vAMM revenue rebalance"],"type":"u64"},{"name":"mintRedeemId","docs":["Every mint/redeem has a monotonically increasing id. This is the next id to use"],"type":"u64"},{"name":"settleId","type":"u64"},{"name":"minMintFee","docs":["PERCENTAGE_PRECISION"],"type":"i64"},{"name":"tokenSupply","type":"u64"},{"name":"volatility","type":"u64"},{"name":"constituents","type":"u16"},{"name":"quoteConsituentIndex","type":"u16"},{"name":"bump","type":"u8"},{"name":"gammaExecution","type":"u8"},{"name":"xi","type":"u8"},{"name":"targetOracleDelayFeeBpsPer10Slots","type":"u8"},{"name":"targetPositionDelayFeeBpsPer10Slots","type":"u8"},{"name":"lpPoolId","type":"u8"},{"name":"padding","type":{"array":["u8",174]}}]}},{"name":"Constituent","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["address of the constituent"],"type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"lpPool","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"totalSwapFees","docs":["total fees received by the constituent. Positive = fees received, Negative = fees paid"],"type":"i128"},{"name":"spotBalance","docs":["spot borrow-lend balance for constituent"],"type":{"defined":"ConstituentSpotBalance"}},{"name":"lastSpotBalanceTokenAmount","type":"i64"},{"name":"cumulativeSpotInterestAccruedTokenAmount","type":"i64"},{"name":"maxWeightDeviation","docs":["max deviation from target_weight allowed for the constituent","precision: PERCENTAGE_PRECISION"],"type":"i64"},{"name":"swapFeeMin","docs":["min fee charged on swaps to/from this constituent","precision: PERCENTAGE_PRECISION"],"type":"i64"},{"name":"swapFeeMax","docs":["max fee charged on swaps to/from this constituent","precision: PERCENTAGE_PRECISION"],"type":"i64"},{"name":"maxBorrowTokenAmount","docs":["Max Borrow amount:","precision: token precision"],"type":"u64"},{"name":"vaultTokenBalance","docs":["ata token balance in token precision"],"type":"u64"},{"name":"lastOraclePrice","type":"i64"},{"name":"lastOracleSlot","type":"u64"},{"name":"oracleStalenessThreshold","docs":["Delay allowed for valid AUM calculation"],"type":"u64"},{"name":"flashLoanInitialTokenAmount","type":"u64"},{"name":"nextSwapId","docs":["Every swap to/from this constituent has a monotonically increasing id. This is the next id to use"],"type":"u64"},{"name":"derivativeWeight","docs":["percentable of derivatve weight to go to this specific derivative PERCENTAGE_PRECISION. Zero if no derivative weight"],"type":"u64"},{"name":"volatility","type":"u64"},{"name":"constituentDerivativeDepegThreshold","type":"u64"},{"name":"constituentDerivativeIndex","docs":["The `constituent_index` of the parent constituent. -1 if it is a parent index","Example: if in a pool with SOL (parent) and dSOL (derivative),","SOL.constituent_index = 1, SOL.constituent_derivative_index = -1,","dSOL.constituent_index = 2, dSOL.constituent_derivative_index = 1"],"type":"i16"},{"name":"spotMarketIndex","type":"u16"},{"name":"constituentIndex","type":"u16"},{"name":"decimals","type":"u8"},{"name":"bump","type":"u8"},{"name":"vaultBump","type":"u8"},{"name":"gammaInventory","type":"u8"},{"name":"gammaExecution","type":"u8"},{"name":"xi","type":"u8"},{"name":"status","type":"u8"},{"name":"pausedOperations","type":"u8"},{"name":"padding","type":{"array":["u8",162]}}]}},{"name":"AmmConstituentMapping","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"weights","type":{"vec":{"defined":"AmmConstituentDatum"}}}]}},{"name":"ConstituentTargetBase","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"targets","type":{"vec":{"defined":"TargetsDatum"}}}]}},{"name":"ConstituentCorrelations","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"correlations","type":{"vec":"i64"}}]}},{"name":"PrelaunchOracle","type":{"kind":"struct","fields":[{"name":"price","type":"i64"},{"name":"maxPrice","type":"i64"},{"name":"confidence","type":"u64"},{"name":"lastUpdateSlot","type":"u64"},{"name":"ammLastUpdateSlot","type":"u64"},{"name":"perpMarketIndex","type":"u16"},{"name":"padding","type":{"array":["u8",70]}}]}},{"name":"PerpMarket","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["The perp market's address. It is a pda of the market index"],"type":"publicKey"},{"name":"amm","docs":["The automated market maker"],"type":{"defined":"AMM"}},{"name":"pnlPool","docs":["The market's pnl pool. When users settle negative pnl, the balance increases.","When users settle positive pnl, the balance decreases. Can not go negative."],"type":{"defined":"PoolBalance"}},{"name":"name","docs":["Encoded display name for the perp market e.g. SOL-PERP"],"type":{"array":["u8",32]}},{"name":"insuranceClaim","docs":["The perp market's claim on the insurance fund"],"type":{"defined":"InsuranceClaim"}},{"name":"unrealizedPnlMaxImbalance","docs":["The max pnl imbalance before positive pnl asset weight is discounted","pnl imbalance is the difference between long and short pnl. When it's greater than 0,","the amm has negative pnl and the initial asset weight for positive pnl is discounted","precision = QUOTE_PRECISION"],"type":"u64"},{"name":"expiryTs","docs":["The ts when the market will be expired. Only set if market is in reduce only mode"],"type":"i64"},{"name":"expiryPrice","docs":["The price at which positions will be settled. Only set if market is expired","precision = PRICE_PRECISION"],"type":"i64"},{"name":"nextFillRecordId","docs":["Every trade has a fill record id. This is the next id to be used"],"type":"u64"},{"name":"nextFundingRateRecordId","docs":["Every funding rate update has a record id. This is the next id to be used"],"type":"u64"},{"name":"nextCurveRecordId","docs":["Every amm k updated has a record id. This is the next id to be used"],"type":"u64"},{"name":"imfFactor","docs":["The initial margin fraction factor. Used to increase margin ratio for large positions","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"unrealizedPnlImfFactor","docs":["The imf factor for unrealized pnl. Used to discount asset weight for large positive pnl","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"liquidatorFee","docs":["The fee the liquidator is paid for taking over perp position","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"ifLiquidationFee","docs":["The fee the insurance fund receives from liquidation","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"marginRatioInitial","docs":["The margin ratio which determines how much collateral is required to open a position","e.g. margin ratio of .1 means a user must have $100 of total collateral to open a $1000 position","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"marginRatioMaintenance","docs":["The margin ratio which determines when a user will be liquidated","e.g. margin ratio of .05 means a user must have $50 of total collateral to maintain a $1000 position","else they will be liquidated","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"unrealizedPnlInitialAssetWeight","docs":["The initial asset weight for positive pnl. Negative pnl always has an asset weight of 1","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"unrealizedPnlMaintenanceAssetWeight","docs":["The maintenance asset weight for positive pnl. Negative pnl always has an asset weight of 1","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"numberOfUsersWithBase","docs":["number of users in a position (base)"],"type":"u32"},{"name":"numberOfUsers","docs":["number of users in a position (pnl) or pnl (quote)"],"type":"u32"},{"name":"marketIndex","type":"u16"},{"name":"status","docs":["Whether a market is active, reduce only, expired, etc","Affects whether users can open/close positions"],"type":{"defined":"MarketStatus"}},{"name":"contractType","docs":["Currently only Perpetual markets are supported"],"type":{"defined":"ContractType"}},{"name":"contractTier","docs":["The contract tier determines how much insurance a market can receive, with more speculative markets receiving less insurance","It also influences the order perp markets can be liquidated, with less speculative markets being liquidated first"],"type":{"defined":"ContractTier"}},{"name":"pausedOperations","type":"u8"},{"name":"quoteSpotMarketIndex","docs":["The spot market that pnl is settled in"],"type":"u16"},{"name":"feeAdjustment","docs":["Between -100 and 100, represents what % to increase/decrease the fee by","E.g. if this is -50 and the fee is 5bps, the new fee will be 2.5bps","if this is 50 and the fee is 5bps, the new fee will be 7.5bps"],"type":"i16"},{"name":"fuelBoostPosition","docs":["fuel multiplier for perp funding","precision: 10"],"type":"u8"},{"name":"fuelBoostTaker","docs":["fuel multiplier for perp taker","precision: 10"],"type":"u8"},{"name":"fuelBoostMaker","docs":["fuel multiplier for perp maker","precision: 10"],"type":"u8"},{"name":"poolId","type":"u8"},{"name":"highLeverageMarginRatioInitial","type":"u16"},{"name":"highLeverageMarginRatioMaintenance","type":"u16"},{"name":"protectedMakerLimitPriceDivisor","type":"u8"},{"name":"protectedMakerDynamicDivisor","type":"u8"},{"name":"lpFeeTransferScalar","type":"u8"},{"name":"lpStatus","type":"u8"},{"name":"lpPausedOperations","type":"u8"},{"name":"lpExchangeFeeExcluscionScalar","type":"u8"},{"name":"lastFillPrice","type":"u64"},{"name":"lpPoolId","type":"u8"},{"name":"padding","type":{"array":["u8",23]}}]}},{"name":"ProtectedMakerModeConfig","type":{"kind":"struct","fields":[{"name":"maxUsers","type":"u32"},{"name":"currentUsers","type":"u32"},{"name":"reduceOnly","type":"u8"},{"name":"padding","type":{"array":["u8",31]}}]}},{"name":"PythLazerOracle","type":{"kind":"struct","fields":[{"name":"price","type":"i64"},{"name":"publishTime","type":"u64"},{"name":"postedSlot","type":"u64"},{"name":"exponent","type":"i32"},{"name":"padding","type":{"array":["u8",4]}},{"name":"conf","type":"u64"}]}},{"name":"RevenueShare","type":{"kind":"struct","fields":[{"name":"authority","docs":["the owner of this account, a builder or referrer"],"type":"publicKey"},{"name":"totalReferrerRewards","type":"u64"},{"name":"totalBuilderRewards","type":"u64"},{"name":"padding","type":{"array":["u8",18]}}]}},{"name":"RevenueShareEscrow","type":{"kind":"struct","fields":[{"name":"authority","docs":["the owner of this account, a user"],"type":"publicKey"},{"name":"referrer","type":"publicKey"},{"name":"referrerBoostExpireTs","type":"u32"},{"name":"referrerRewardOffset","type":"i8"},{"name":"refereeFeeNumeratorOffset","type":"i8"},{"name":"referrerBoostNumerator","type":"i8"},{"name":"reservedFixed","type":{"array":["u8",17]}},{"name":"padding0","type":"u32"},{"name":"orders","type":{"vec":{"defined":"RevenueShareOrder"}}},{"name":"padding1","type":"u32"},{"name":"approvedBuilders","type":{"vec":{"defined":"BuilderInfo"}}}]}},{"name":"SignedMsgUserOrders","docs":["* This struct is a duplicate of SignedMsgUserOrdersZeroCopy\n * It is used to give anchor an struct to generate the idl for clients\n * The struct SignedMsgUserOrdersZeroCopy is used to load the data in efficiently"],"type":{"kind":"struct","fields":[{"name":"authorityPubkey","type":"publicKey"},{"name":"padding","type":"u32"},{"name":"signedMsgOrderData","type":{"vec":{"defined":"SignedMsgOrderId"}}}]}},{"name":"SignedMsgWsDelegates","docs":["* Used to store authenticated delegates for swift-like ws connections"],"type":{"kind":"struct","fields":[{"name":"delegates","type":{"vec":"publicKey"}}]}},{"name":"SpotMarket","type":{"kind":"struct","fields":[{"name":"pubkey","docs":["The address of the spot market. It is a pda of the market index"],"type":"publicKey"},{"name":"oracle","docs":["The oracle used to price the markets deposits/borrows"],"type":"publicKey"},{"name":"mint","docs":["The token mint of the market"],"type":"publicKey"},{"name":"vault","docs":["The vault used to store the market's deposits","The amount in the vault should be equal to or greater than deposits - borrows"],"type":"publicKey"},{"name":"name","docs":["The encoded display name for the market e.g. SOL"],"type":{"array":["u8",32]}},{"name":"historicalOracleData","type":{"defined":"HistoricalOracleData"}},{"name":"historicalIndexData","type":{"defined":"HistoricalIndexData"}},{"name":"revenuePool","docs":["Revenue the protocol has collected in this markets token","e.g. for SOL-PERP, funds can be settled in usdc and will flow into the USDC revenue pool"],"type":{"defined":"PoolBalance"}},{"name":"spotFeePool","docs":["The fees collected from swaps between this market and the quote market","Is settled to the quote markets revenue pool"],"type":{"defined":"PoolBalance"}},{"name":"insuranceFund","docs":["Details on the insurance fund covering bankruptcies in this markets token","Covers bankruptcies for borrows with this markets token and perps settling in this markets token"],"type":{"defined":"InsuranceFund"}},{"name":"totalSpotFee","docs":["The total spot fees collected for this market","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"depositBalance","docs":["The sum of the scaled balances for deposits across users and pool balances","To convert to the deposit token amount, multiply by the cumulative deposit interest","precision: SPOT_BALANCE_PRECISION"],"type":"u128"},{"name":"borrowBalance","docs":["The sum of the scaled balances for borrows across users and pool balances","To convert to the borrow token amount, multiply by the cumulative borrow interest","precision: SPOT_BALANCE_PRECISION"],"type":"u128"},{"name":"cumulativeDepositInterest","docs":["The cumulative interest earned by depositors","Used to calculate the deposit token amount from the deposit balance","precision: SPOT_CUMULATIVE_INTEREST_PRECISION"],"type":"u128"},{"name":"cumulativeBorrowInterest","docs":["The cumulative interest earned by borrowers","Used to calculate the borrow token amount from the borrow balance","precision: SPOT_CUMULATIVE_INTEREST_PRECISION"],"type":"u128"},{"name":"totalSocialLoss","docs":["The total socialized loss from borrows, in the mint's token","precision: token mint precision"],"type":"u128"},{"name":"totalQuoteSocialLoss","docs":["The total socialized loss from borrows, in the quote market's token","preicision: QUOTE_PRECISION"],"type":"u128"},{"name":"withdrawGuardThreshold","docs":["no withdraw limits/guards when deposits below this threshold","precision: token mint precision"],"type":"u64"},{"name":"maxTokenDeposits","docs":["The max amount of token deposits in this market","0 if there is no limit","precision: token mint precision"],"type":"u64"},{"name":"depositTokenTwap","docs":["24hr average of deposit token amount","precision: token mint precision"],"type":"u64"},{"name":"borrowTokenTwap","docs":["24hr average of borrow token amount","precision: token mint precision"],"type":"u64"},{"name":"utilizationTwap","docs":["24hr average of utilization","which is borrow amount over token amount","precision: SPOT_UTILIZATION_PRECISION"],"type":"u64"},{"name":"lastInterestTs","docs":["Last time the cumulative deposit and borrow interest was updated"],"type":"u64"},{"name":"lastTwapTs","docs":["Last time the deposit/borrow/utilization averages were updated"],"type":"u64"},{"name":"expiryTs","docs":["The time the market is set to expire. Only set if market is in reduce only mode"],"type":"i64"},{"name":"orderStepSize","docs":["Spot orders must be a multiple of the step size","precision: token mint precision"],"type":"u64"},{"name":"orderTickSize","docs":["Spot orders must be a multiple of the tick size","precision: PRICE_PRECISION"],"type":"u64"},{"name":"minOrderSize","docs":["The minimum order size","precision: token mint precision"],"type":"u64"},{"name":"maxPositionSize","docs":["The maximum spot position size","if the limit is 0, there is no limit","precision: token mint precision"],"type":"u64"},{"name":"nextFillRecordId","docs":["Every spot trade has a fill record id. This is the next id to use"],"type":"u64"},{"name":"nextDepositRecordId","docs":["Every deposit has a deposit record id. This is the next id to use"],"type":"u64"},{"name":"initialAssetWeight","docs":["The initial asset weight used to calculate a deposits contribution to a users initial total collateral","e.g. if the asset weight is .8, $100 of deposits contributes $80 to the users initial total collateral","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"maintenanceAssetWeight","docs":["The maintenance asset weight used to calculate a deposits contribution to a users maintenance total collateral","e.g. if the asset weight is .9, $100 of deposits contributes $90 to the users maintenance total collateral","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"initialLiabilityWeight","docs":["The initial liability weight used to calculate a borrows contribution to a users initial margin requirement","e.g. if the liability weight is .9, $100 of borrows contributes $90 to the users initial margin requirement","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"maintenanceLiabilityWeight","docs":["The maintenance liability weight used to calculate a borrows contribution to a users maintenance margin requirement","e.g. if the liability weight is .8, $100 of borrows contributes $80 to the users maintenance margin requirement","precision: SPOT_WEIGHT_PRECISION"],"type":"u32"},{"name":"imfFactor","docs":["The initial margin fraction factor. Used to increase liability weight/decrease asset weight for large positions","precision: MARGIN_PRECISION"],"type":"u32"},{"name":"liquidatorFee","docs":["The fee the liquidator is paid for taking over borrow/deposit","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"ifLiquidationFee","docs":["The fee the insurance fund receives from liquidation","precision: LIQUIDATOR_FEE_PRECISION"],"type":"u32"},{"name":"optimalUtilization","docs":["The optimal utilization rate for this market.","Used to determine the markets borrow rate","precision: SPOT_UTILIZATION_PRECISION"],"type":"u32"},{"name":"optimalBorrowRate","docs":["The borrow rate for this market when the market has optimal utilization","precision: SPOT_RATE_PRECISION"],"type":"u32"},{"name":"maxBorrowRate","docs":["The borrow rate for this market when the market has 1000 utilization","precision: SPOT_RATE_PRECISION"],"type":"u32"},{"name":"decimals","docs":["The market's token mint's decimals. To from decimals to a precision, 10^decimals"],"type":"u32"},{"name":"marketIndex","type":"u16"},{"name":"ordersEnabled","docs":["Whether or not spot trading is enabled"],"type":"bool"},{"name":"oracleSource","type":{"defined":"OracleSource"}},{"name":"status","type":{"defined":"MarketStatus"}},{"name":"assetTier","docs":["The asset tier affects how a deposit can be used as collateral and the priority for a borrow being liquidated"],"type":{"defined":"AssetTier"}},{"name":"pausedOperations","type":"u8"},{"name":"ifPausedOperations","type":"u8"},{"name":"feeAdjustment","type":"i16"},{"name":"maxTokenBorrowsFraction","docs":["What fraction of max_token_deposits","disabled when 0, 1 => 1/10000 => .01% of max_token_deposits","precision: X/10000"],"type":"u16"},{"name":"flashLoanAmount","docs":["For swaps, the amount of token loaned out in the begin_swap ix","precision: token mint precision"],"type":"u64"},{"name":"flashLoanInitialTokenAmount","docs":["For swaps, the amount in the users token account in the begin_swap ix","Used to calculate how much of the token left the system in end_swap ix","precision: token mint precision"],"type":"u64"},{"name":"totalSwapFee","docs":["The total fees received from swaps","precision: token mint precision"],"type":"u64"},{"name":"scaleInitialAssetWeightStart","docs":["When to begin scaling down the initial asset weight","disabled when 0","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"minBorrowRate","docs":["The min borrow rate for this market when the market regardless of utilization","1 => 1/200 => .5%","precision: X/200"],"type":"u8"},{"name":"fuelBoostDeposits","docs":["fuel multiplier for spot deposits","precision: 10"],"type":"u8"},{"name":"fuelBoostBorrows","docs":["fuel multiplier for spot borrows","precision: 10"],"type":"u8"},{"name":"fuelBoostTaker","docs":["fuel multiplier for spot taker","precision: 10"],"type":"u8"},{"name":"fuelBoostMaker","docs":["fuel multiplier for spot maker","precision: 10"],"type":"u8"},{"name":"fuelBoostInsurance","docs":["fuel multiplier for spot insurance stake","precision: 10"],"type":"u8"},{"name":"tokenProgramFlag","type":"u8"},{"name":"poolId","type":"u8"},{"name":"padding","type":{"array":["u8",40]}}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"whitelistMint","type":"publicKey"},{"name":"discountMint","type":"publicKey"},{"name":"signer","type":"publicKey"},{"name":"srmVault","type":"publicKey"},{"name":"perpFeeStructure","type":{"defined":"FeeStructure"}},{"name":"spotFeeStructure","type":{"defined":"FeeStructure"}},{"name":"oracleGuardRails","type":{"defined":"OracleGuardRails"}},{"name":"numberOfAuthorities","type":"u64"},{"name":"numberOfSubAccounts","type":"u64"},{"name":"lpCooldownTime","type":"u64"},{"name":"liquidationMarginBufferRatio","type":"u32"},{"name":"settlementDuration","type":"u16"},{"name":"numberOfMarkets","type":"u16"},{"name":"numberOfSpotMarkets","type":"u16"},{"name":"signerNonce","type":"u8"},{"name":"minPerpAuctionDuration","type":"u8"},{"name":"defaultMarketOrderTimeInForce","type":"u8"},{"name":"defaultSpotAuctionDuration","type":"u8"},{"name":"exchangeStatus","type":"u8"},{"name":"liquidationDuration","type":"u8"},{"name":"initialPctToLiquidate","type":"u16"},{"name":"maxNumberOfSubAccounts","type":"u16"},{"name":"maxInitializeUserFee","type":"u16"},{"name":"featureBitFlags","type":"u8"},{"name":"lpPoolFeatureBitFlags","type":"u8"},{"name":"padding","type":{"array":["u8",8]}}]}},{"name":"User","type":{"kind":"struct","fields":[{"name":"authority","docs":["The owner/authority of the account"],"type":"publicKey"},{"name":"delegate","docs":["An addresses that can control the account on the authority's behalf. Has limited power, cant withdraw"],"type":"publicKey"},{"name":"name","docs":["Encoded display name e.g. \"toly\""],"type":{"array":["u8",32]}},{"name":"spotPositions","docs":["The user's spot positions"],"type":{"array":[{"defined":"SpotPosition"},8]}},{"name":"perpPositions","docs":["The user's perp positions"],"type":{"array":[{"defined":"PerpPosition"},8]}},{"name":"orders","docs":["The user's orders"],"type":{"array":[{"defined":"Order"},32]}},{"name":"lastAddPerpLpSharesTs","docs":["The last time the user added perp lp positions"],"type":"i64"},{"name":"totalDeposits","docs":["The total values of deposits the user has made","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalWithdraws","docs":["The total values of withdrawals the user has made","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalSocialLoss","docs":["The total socialized loss the users has incurred upon the protocol","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"settledPerpPnl","docs":["Fees (taker fees, maker rebate, referrer reward, filler reward) and pnl for perps","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"cumulativeSpotFees","docs":["Fees (taker fees, maker rebate, filler reward) for spot","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"cumulativePerpFunding","docs":["Cumulative funding paid/received for perps","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"liquidationMarginFreed","docs":["The amount of margin freed during liquidation. Used to force the liquidation to occur over a period of time","Defaults to zero when not being liquidated","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"lastActiveSlot","docs":["The last slot a user was active. Used to determine if a user is idle"],"type":"u64"},{"name":"nextOrderId","docs":["Every user order has an order id. This is the next order id to be used"],"type":"u32"},{"name":"maxMarginRatio","docs":["Custom max initial margin ratio for the user"],"type":"u32"},{"name":"nextLiquidationId","docs":["The next liquidation id to be used for user"],"type":"u16"},{"name":"subAccountId","docs":["The sub account id for this user"],"type":"u16"},{"name":"status","docs":["Whether the user is active, being liquidated or bankrupt"],"type":"u8"},{"name":"isMarginTradingEnabled","docs":["Whether the user has enabled margin trading"],"type":"bool"},{"name":"idle","docs":["User is idle if they haven't interacted with the protocol in 1 week and they have no orders, perp positions or borrows","Off-chain keeper bots can ignore users that are idle"],"type":"bool"},{"name":"openOrders","docs":["number of open orders"],"type":"u8"},{"name":"hasOpenOrder","docs":["Whether or not user has open order"],"type":"bool"},{"name":"openAuctions","docs":["number of open orders with auction"],"type":"u8"},{"name":"hasOpenAuction","docs":["Whether or not user has open order with auction"],"type":"bool"},{"name":"marginMode","type":{"defined":"MarginMode"}},{"name":"poolId","type":"u8"},{"name":"padding1","type":{"array":["u8",3]}},{"name":"lastFuelBonusUpdateTs","type":"u32"},{"name":"padding","type":{"array":["u8",12]}}]}},{"name":"UserStats","type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority for all of a users sub accounts"],"type":"publicKey"},{"name":"referrer","docs":["The address that referred this user"],"type":"publicKey"},{"name":"fees","docs":["Stats on the fees paid by the user"],"type":{"defined":"UserFees"}},{"name":"nextEpochTs","docs":["The timestamp of the next epoch","Epoch is used to limit referrer rewards earned in single epoch"],"type":"i64"},{"name":"makerVolume30d","docs":["Rolling 30day maker volume for user","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"takerVolume30d","docs":["Rolling 30day taker volume for user","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"fillerVolume30d","docs":["Rolling 30day filler volume for user","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"lastMakerVolume30dTs","docs":["last time the maker volume was updated"],"type":"i64"},{"name":"lastTakerVolume30dTs","docs":["last time the taker volume was updated"],"type":"i64"},{"name":"lastFillerVolume30dTs","docs":["last time the filler volume was updated"],"type":"i64"},{"name":"ifStakedQuoteAssetAmount","docs":["The amount of tokens staked in the quote spot markets if"],"type":"u64"},{"name":"numberOfSubAccounts","docs":["The current number of sub accounts"],"type":"u16"},{"name":"numberOfSubAccountsCreated","docs":["The number of sub accounts created. Can be greater than the number of sub accounts if user","has deleted sub accounts"],"type":"u16"},{"name":"referrerStatus","docs":["Flags for referrer status:","First bit (LSB): 1 if user is a referrer, 0 otherwise","Second bit: 1 if user was referred, 0 otherwise"],"type":"u8"},{"name":"disableUpdatePerpBidAskTwap","type":"bool"},{"name":"pausedOperations","type":"u8"},{"name":"fuelOverflowStatus","docs":["whether the user has a FuelOverflow account"],"type":"u8"},{"name":"fuelInsurance","docs":["accumulated fuel for token amounts of insurance"],"type":"u32"},{"name":"fuelDeposits","docs":["accumulated fuel for notional of deposits"],"type":"u32"},{"name":"fuelBorrows","docs":["accumulate fuel bonus for notional of borrows"],"type":"u32"},{"name":"fuelPositions","docs":["accumulated fuel for perp open interest"],"type":"u32"},{"name":"fuelTaker","docs":["accumulate fuel bonus for taker volume"],"type":"u32"},{"name":"fuelMaker","docs":["accumulate fuel bonus for maker volume"],"type":"u32"},{"name":"ifStakedGovTokenAmount","docs":["The amount of tokens staked in the governance spot markets if"],"type":"u64"},{"name":"lastFuelIfBonusUpdateTs","docs":["last unix ts user stats data was used to update if fuel (u32 to save space)"],"type":"u32"},{"name":"padding","type":{"array":["u8",12]}}]}},{"name":"ReferrerName","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"user","type":"publicKey"},{"name":"userStats","type":"publicKey"},{"name":"name","type":{"array":["u8",32]}}]}},{"name":"FuelOverflow","type":{"kind":"struct","fields":[{"name":"authority","docs":["The authority of this overflow account"],"type":"publicKey"},{"name":"fuelInsurance","type":"u128"},{"name":"fuelDeposits","type":"u128"},{"name":"fuelBorrows","type":"u128"},{"name":"fuelPositions","type":"u128"},{"name":"fuelTaker","type":"u128"},{"name":"fuelMaker","type":"u128"},{"name":"lastFuelSweepTs","type":"u32"},{"name":"lastResetTs","type":"u32"},{"name":"padding","type":{"array":["u128",6]}}]}}],"types":[{"name":"UpdatePerpMarketSummaryStatsParams","type":{"kind":"struct","fields":[{"name":"quoteAssetAmountWithUnsettledLp","type":{"option":"i64"}},{"name":"netUnsettledFundingPnl","type":{"option":"i64"}},{"name":"updateAmmSummaryStats","type":{"option":"bool"}},{"name":"excludeTotalLiqFee","type":{"option":"bool"}}]}},{"name":"ConstituentParams","type":{"kind":"struct","fields":[{"name":"maxWeightDeviation","type":{"option":"i64"}},{"name":"swapFeeMin","type":{"option":"i64"}},{"name":"swapFeeMax","type":{"option":"i64"}},{"name":"maxBorrowTokenAmount","type":{"option":"u64"}},{"name":"oracleStalenessThreshold","type":{"option":"u64"}},{"name":"costToTradeBps","type":{"option":"i32"}},{"name":"constituentDerivativeIndex","type":{"option":"i16"}},{"name":"derivativeWeight","type":{"option":"u64"}},{"name":"volatility","type":{"option":"u64"}},{"name":"gammaExecution","type":{"option":"u8"}},{"name":"gammaInventory","type":{"option":"u8"}},{"name":"xi","type":{"option":"u8"}}]}},{"name":"LpPoolParams","type":{"kind":"struct","fields":[{"name":"maxSettleQuoteAmount","type":{"option":"u64"}},{"name":"volatility","type":{"option":"u64"}},{"name":"gammaExecution","type":{"option":"u8"}},{"name":"xi","type":{"option":"u8"}},{"name":"maxAum","type":{"option":"u128"}},{"name":"whitelistMint","type":{"option":"publicKey"}}]}},{"name":"OverrideAmmCacheParams","type":{"kind":"struct","fields":[{"name":"quoteOwedFromLpPool","type":{"option":"i64"}},{"name":"lastSettleSlot","type":{"option":"u64"}},{"name":"lastFeePoolTokenAmount","type":{"option":"u128"}},{"name":"lastNetPnlPoolTokenAmount","type":{"option":"i128"}},{"name":"ammPositionScalar","type":{"option":"u8"}},{"name":"ammInventoryLimit","type":{"option":"i64"}}]}},{"name":"AddAmmConstituentMappingDatum","type":{"kind":"struct","fields":[{"name":"constituentIndex","type":"u16"},{"name":"perpMarketIndex","type":"u16"},{"name":"weight","type":"i64"}]}},{"name":"CacheInfo","type":{"kind":"struct","fields":[{"name":"oracle","type":"publicKey"},{"name":"lastFeePoolTokenAmount","type":"u128"},{"name":"lastNetPnlPoolTokenAmount","type":"i128"},{"name":"lastExchangeFees","type":"u128"},{"name":"lastSettleAmmExFees","type":"u128"},{"name":"lastSettleAmmPnl","type":"i128"},{"name":"position","docs":["BASE PRECISION"],"type":"i64"},{"name":"slot","type":"u64"},{"name":"lastSettleAmount","type":"u64"},{"name":"lastSettleSlot","type":"u64"},{"name":"lastSettleTs","type":"i64"},{"name":"quoteOwedFromLpPool","type":"i64"},{"name":"ammInventoryLimit","type":"i64"},{"name":"oraclePrice","type":"i64"},{"name":"oracleSlot","type":"u64"},{"name":"marketIndex","type":"u16"},{"name":"oracleSource","type":"u8"},{"name":"oracleValidity","type":"u8"},{"name":"lpStatusForPerpMarket","type":"u8"},{"name":"ammPositionScalar","type":"u8"},{"name":"padding","type":{"array":["u8",34]}}]}},{"name":"AmmCacheFixed","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","type":"u32"}]}},{"name":"LiquidatePerpRecord","type":{"kind":"struct","fields":[{"name":"marketIndex","type":"u16"},{"name":"oraclePrice","type":"i64"},{"name":"baseAssetAmount","type":"i64"},{"name":"quoteAssetAmount","type":"i64"},{"name":"lpShares","docs":["precision: AMM_RESERVE_PRECISION"],"type":"u64"},{"name":"fillRecordId","type":"u64"},{"name":"userOrderId","type":"u32"},{"name":"liquidatorOrderId","type":"u32"},{"name":"liquidatorFee","docs":["precision: QUOTE_PRECISION"],"type":"u64"},{"name":"ifFee","docs":["precision: QUOTE_PRECISION"],"type":"u64"}]}},{"name":"LiquidateSpotRecord","type":{"kind":"struct","fields":[{"name":"assetMarketIndex","type":"u16"},{"name":"assetPrice","type":"i64"},{"name":"assetTransfer","type":"u128"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"liabilityPrice","type":"i64"},{"name":"liabilityTransfer","docs":["precision: token mint precision"],"type":"u128"},{"name":"ifFee","docs":["precision: token mint precision"],"type":"u64"}]}},{"name":"LiquidateBorrowForPerpPnlRecord","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"marketOraclePrice","type":"i64"},{"name":"pnlTransfer","type":"u128"},{"name":"liabilityMarketIndex","type":"u16"},{"name":"liabilityPrice","type":"i64"},{"name":"liabilityTransfer","type":"u128"}]}},{"name":"LiquidatePerpPnlForDepositRecord","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"marketOraclePrice","type":"i64"},{"name":"pnlTransfer","type":"u128"},{"name":"assetMarketIndex","type":"u16"},{"name":"assetPrice","type":"i64"},{"name":"assetTransfer","type":"u128"}]}},{"name":"PerpBankruptcyRecord","type":{"kind":"struct","fields":[{"name":"marketIndex","type":"u16"},{"name":"pnl","type":"i128"},{"name":"ifPayment","type":"u128"},{"name":"clawbackUser","type":{"option":"publicKey"}},{"name":"clawbackUserPayment","type":{"option":"u128"}},{"name":"cumulativeFundingRateDelta","type":"i128"}]}},{"name":"SpotBankruptcyRecord","type":{"kind":"struct","fields":[{"name":"marketIndex","type":"u16"},{"name":"borrowAmount","type":"u128"},{"name":"ifPayment","type":"u128"},{"name":"cumulativeDepositInterestDelta","type":"u128"}]}},{"name":"IfRebalanceConfigParams","type":{"kind":"struct","fields":[{"name":"totalInAmount","type":"u64"},{"name":"epochMaxInAmount","type":"u64"},{"name":"epochDuration","type":"i64"},{"name":"outMarketIndex","type":"u16"},{"name":"inMarketIndex","type":"u16"},{"name":"maxSlippageBps","type":"u16"},{"name":"swapMode","type":"u8"},{"name":"status","type":"u8"}]}},{"name":"ConstituentSpotBalance","type":{"kind":"struct","fields":[{"name":"scaledBalance","docs":["The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow","interest of corresponding market.","precision: token precision"],"type":"u128"},{"name":"cumulativeDeposits","docs":["The cumulative deposits/borrows a user has made into a market","precision: token mint precision"],"type":"i64"},{"name":"marketIndex","docs":["The market index of the corresponding spot market"],"type":"u16"},{"name":"balanceType","docs":["Whether the position is deposit or borrow"],"type":{"defined":"SpotBalanceType"}},{"name":"padding","type":{"array":["u8",5]}}]}},{"name":"AmmConstituentDatum","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"constituentIndex","type":"u16"},{"name":"padding","type":{"array":["u8",4]}},{"name":"lastSlot","type":"u64"},{"name":"weight","docs":["PERCENTAGE_PRECISION. The weight this constituent has on the perp market"],"type":"i64"}]}},{"name":"AmmConstituentMappingFixed","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","type":"u32"}]}},{"name":"TargetsDatum","type":{"kind":"struct","fields":[{"name":"costToTradeBps","type":"i32"},{"name":"padding","type":{"array":["u8",4]}},{"name":"targetBase","type":"i64"},{"name":"lastOracleSlot","type":"u64"},{"name":"lastPositionSlot","type":"u64"}]}},{"name":"ConstituentTargetBaseFixed","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","docs":["total elements in the flattened `data` vec"],"type":"u32"}]}},{"name":"ConstituentCorrelationsFixed","type":{"kind":"struct","fields":[{"name":"lpPool","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pad","type":{"array":["u8",3]}},{"name":"len","docs":["total elements in the flattened `data` vec"],"type":"u32"}]}},{"name":"MarketIdentifier","type":{"kind":"struct","fields":[{"name":"marketType","type":{"defined":"MarketType"}},{"name":"marketIndex","type":"u16"}]}},{"name":"HistoricalOracleData","type":{"kind":"struct","fields":[{"name":"lastOraclePrice","docs":["precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOracleConf","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastOracleDelay","docs":["number of slots since last update"],"type":"i64"},{"name":"lastOraclePriceTwap","docs":["precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOraclePriceTwap5min","docs":["precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOraclePriceTwapTs","docs":["unix_timestamp of last snapshot"],"type":"i64"}]}},{"name":"HistoricalIndexData","type":{"kind":"struct","fields":[{"name":"lastIndexBidPrice","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexAskPrice","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexPriceTwap","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexPriceTwap5min","docs":["precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastIndexPriceTwapTs","docs":["unix_timestamp of last snapshot"],"type":"i64"}]}},{"name":"PrelaunchOracleParams","type":{"kind":"struct","fields":[{"name":"perpMarketIndex","type":"u16"},{"name":"price","type":{"option":"i64"}},{"name":"maxPrice","type":{"option":"i64"}}]}},{"name":"OrderParams","type":{"kind":"struct","fields":[{"name":"orderType","type":{"defined":"OrderType"}},{"name":"marketType","type":{"defined":"MarketType"}},{"name":"direction","type":{"defined":"PositionDirection"}},{"name":"userOrderId","type":"u8"},{"name":"baseAssetAmount","type":"u64"},{"name":"price","type":"u64"},{"name":"marketIndex","type":"u16"},{"name":"reduceOnly","type":"bool"},{"name":"postOnly","type":{"defined":"PostOnlyParam"}},{"name":"bitFlags","type":"u8"},{"name":"maxTs","type":{"option":"i64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerCondition","type":{"defined":"OrderTriggerCondition"}},{"name":"oraclePriceOffset","type":{"option":"i32"}},{"name":"auctionDuration","type":{"option":"u8"}},{"name":"auctionStartPrice","type":{"option":"i64"}},{"name":"auctionEndPrice","type":{"option":"i64"}}]}},{"name":"SignedMsgOrderParamsMessage","type":{"kind":"struct","fields":[{"name":"signedMsgOrderParams","type":{"defined":"OrderParams"}},{"name":"subAccountId","type":"u16"},{"name":"slot","type":"u64"},{"name":"uuid","type":{"array":["u8",8]}},{"name":"takeProfitOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"stopLossOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"maxMarginRatio","type":{"option":"u16"}},{"name":"builderIdx","type":{"option":"u8"}},{"name":"builderFeeTenthBps","type":{"option":"u16"}},{"name":"isolatedPositionDeposit","type":{"option":"u64"}}]}},{"name":"SignedMsgOrderParamsDelegateMessage","type":{"kind":"struct","fields":[{"name":"signedMsgOrderParams","type":{"defined":"OrderParams"}},{"name":"takerPubkey","type":"publicKey"},{"name":"slot","type":"u64"},{"name":"uuid","type":{"array":["u8",8]}},{"name":"takeProfitOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"stopLossOrderParams","type":{"option":{"defined":"SignedMsgTriggerOrderParams"}}},{"name":"maxMarginRatio","type":{"option":"u16"}},{"name":"builderIdx","type":{"option":"u8"}},{"name":"builderFeeTenthBps","type":{"option":"u16"}},{"name":"isolatedPositionDeposit","type":{"option":"u64"}}]}},{"name":"SignedMsgTriggerOrderParams","type":{"kind":"struct","fields":[{"name":"triggerPrice","type":"u64"},{"name":"baseAssetAmount","type":"u64"}]}},{"name":"ModifyOrderParams","type":{"kind":"struct","fields":[{"name":"direction","type":{"option":{"defined":"PositionDirection"}}},{"name":"baseAssetAmount","type":{"option":"u64"}},{"name":"price","type":{"option":"u64"}},{"name":"reduceOnly","type":{"option":"bool"}},{"name":"postOnly","type":{"option":{"defined":"PostOnlyParam"}}},{"name":"bitFlags","type":{"option":"u8"}},{"name":"maxTs","type":{"option":"i64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerCondition","type":{"option":{"defined":"OrderTriggerCondition"}}},{"name":"oraclePriceOffset","type":{"option":"i32"}},{"name":"auctionDuration","type":{"option":"u8"}},{"name":"auctionStartPrice","type":{"option":"i64"}},{"name":"auctionEndPrice","type":{"option":"i64"}},{"name":"policy","type":{"option":"u8"}}]}},{"name":"InsuranceClaim","type":{"kind":"struct","fields":[{"name":"revenueWithdrawSinceLastSettle","docs":["The amount of revenue last settled","Positive if funds left the perp market,","negative if funds were pulled into the perp market","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"maxRevenueWithdrawPerPeriod","docs":["The max amount of revenue that can be withdrawn per period","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"quoteMaxInsurance","docs":["The max amount of insurance that perp market can use to resolve bankruptcy and pnl deficits","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"quoteSettledInsurance","docs":["The amount of insurance that has been used to resolve bankruptcy and pnl deficits","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"lastRevenueWithdrawTs","docs":["The last time revenue was settled in/out of market"],"type":"i64"}]}},{"name":"PoolBalance","type":{"kind":"struct","fields":[{"name":"scaledBalance","docs":["To get the pool's token amount, you must multiply the scaled balance by the market's cumulative","deposit interest","precision: SPOT_BALANCE_PRECISION"],"type":"u128"},{"name":"marketIndex","docs":["The spot market the pool is for"],"type":"u16"},{"name":"padding","type":{"array":["u8",6]}}]}},{"name":"AMM","type":{"kind":"struct","fields":[{"name":"oracle","docs":["oracle price data public key"],"type":"publicKey"},{"name":"historicalOracleData","docs":["stores historically witnessed oracle data"],"type":{"defined":"HistoricalOracleData"}},{"name":"baseAssetAmountPerLp","docs":["accumulated base asset amount since inception per lp share","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteAssetAmountPerLp","docs":["accumulated quote asset amount since inception per lp share","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"feePool","docs":["partition of fees from perp market trading moved from pnl settlements"],"type":{"defined":"PoolBalance"}},{"name":"baseAssetReserve","docs":["`x` reserves for constant product mm formula (x * y = k)","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"quoteAssetReserve","docs":["`y` reserves for constant product mm formula (x * y = k)","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"concentrationCoef","docs":["determines how close the min/max base asset reserve sit vs base reserves","allow for decreasing slippage without increasing liquidity and v.v.","precision: PERCENTAGE_PRECISION"],"type":"u128"},{"name":"minBaseAssetReserve","docs":["minimum base_asset_reserve allowed before AMM is unavailable","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"maxBaseAssetReserve","docs":["maximum base_asset_reserve allowed before AMM is unavailable","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"sqrtK","docs":["`sqrt(k)` in constant product mm formula (x * y = k). stored to avoid drift caused by integer math issues","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"pegMultiplier","docs":["normalizing numerical factor for y, its use offers lowest slippage in cp-curve when market is balanced","precision: PEG_PRECISION"],"type":"u128"},{"name":"terminalQuoteAssetReserve","docs":["y when market is balanced. stored to save computation","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"baseAssetAmountLong","docs":["always non-negative. tracks number of total longs in market (regardless of counterparty)","precision: BASE_PRECISION"],"type":"i128"},{"name":"baseAssetAmountShort","docs":["always non-positive. tracks number of total shorts in market (regardless of counterparty)","precision: BASE_PRECISION"],"type":"i128"},{"name":"baseAssetAmountWithAmm","docs":["tracks net position (longs-shorts) in market with AMM as counterparty","precision: BASE_PRECISION"],"type":"i128"},{"name":"baseAssetAmountWithUnsettledLp","docs":["tracks net position (longs-shorts) in market with LPs as counterparty","precision: BASE_PRECISION"],"type":"i128"},{"name":"maxOpenInterest","docs":["max allowed open interest, blocks trades that breach this value","precision: BASE_PRECISION"],"type":"u128"},{"name":"quoteAssetAmount","docs":["sum of all user's perp quote_asset_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteEntryAmountLong","docs":["sum of all long user's quote_entry_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteEntryAmountShort","docs":["sum of all short user's quote_entry_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteBreakEvenAmountLong","docs":["sum of all long user's quote_break_even_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"quoteBreakEvenAmountShort","docs":["sum of all short user's quote_break_even_amount in market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"userLpShares","docs":["total user lp shares of sqrt_k (protocol owned liquidity = sqrt_k - last_funding_rate)","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"lastFundingRate","docs":["last funding rate in this perp market (unit is quote per base)","precision: FUNDING_RATE_PRECISION"],"type":"i64"},{"name":"lastFundingRateLong","docs":["last funding rate for longs in this perp market (unit is quote per base)","precision: FUNDING_RATE_PRECISION"],"type":"i64"},{"name":"lastFundingRateShort","docs":["last funding rate for shorts in this perp market (unit is quote per base)","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"last24hAvgFundingRate","docs":["estimate of last 24h of funding rate perp market (unit is quote per base)","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"totalFee","docs":["total fees collected by this perp market","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"totalMmFee","docs":["total fees collected by the vAMM's bid/ask spread","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"totalExchangeFee","docs":["total fees collected by exchange fee schedule","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"totalFeeMinusDistributions","docs":["total fees minus any recognized upnl and pool withdraws","precision: QUOTE_PRECISION"],"type":"i128"},{"name":"totalFeeWithdrawn","docs":["sum of all fees from fee pool withdrawn to revenue pool","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"totalLiquidationFee","docs":["all fees collected by market for liquidations","precision: QUOTE_PRECISION"],"type":"u128"},{"name":"cumulativeFundingRateLong","docs":["accumulated funding rate for longs since inception in market"],"type":"i128"},{"name":"cumulativeFundingRateShort","docs":["accumulated funding rate for shorts since inception in market"],"type":"i128"},{"name":"totalSocialLoss","docs":["accumulated social loss paid by users since inception in market"],"type":"u128"},{"name":"askBaseAssetReserve","docs":["transformed base_asset_reserve for users going long","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"askQuoteAssetReserve","docs":["transformed quote_asset_reserve for users going long","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"bidBaseAssetReserve","docs":["transformed base_asset_reserve for users going short","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"bidQuoteAssetReserve","docs":["transformed quote_asset_reserve for users going short","precision: AMM_RESERVE_PRECISION"],"type":"u128"},{"name":"lastOracleNormalisedPrice","docs":["the last seen oracle price partially shrunk toward the amm reserve price","precision: PRICE_PRECISION"],"type":"i64"},{"name":"lastOracleReservePriceSpreadPct","docs":["the gap between the oracle price and the reserve price = y * peg_multiplier / x"],"type":"i64"},{"name":"lastBidPriceTwap","docs":["average estimate of bid price over funding_period","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastAskPriceTwap","docs":["average estimate of ask price over funding_period","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastMarkPriceTwap","docs":["average estimate of (bid+ask)/2 price over funding_period","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastMarkPriceTwap5min","docs":["average estimate of (bid+ask)/2 price over FIVE_MINUTES"],"type":"u64"},{"name":"lastUpdateSlot","docs":["the last blockchain slot the amm was updated"],"type":"u64"},{"name":"lastOracleConfPct","docs":["the pct size of the oracle confidence interval","precision: PERCENTAGE_PRECISION"],"type":"u64"},{"name":"netRevenueSinceLastFunding","docs":["the total_fee_minus_distribution change since the last funding update","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"lastFundingRateTs","docs":["the last funding rate update unix_timestamp"],"type":"i64"},{"name":"fundingPeriod","docs":["the peridocity of the funding rate updates"],"type":"i64"},{"name":"orderStepSize","docs":["the base step size (increment) of orders","precision: BASE_PRECISION"],"type":"u64"},{"name":"orderTickSize","docs":["the price tick size of orders","precision: PRICE_PRECISION"],"type":"u64"},{"name":"minOrderSize","docs":["the minimum base size of an order","precision: BASE_PRECISION"],"type":"u64"},{"name":"mmOracleSlot","docs":["the max base size a single user can have","precision: BASE_PRECISION"],"type":"u64"},{"name":"volume24h","docs":["estimated total of volume in market","QUOTE_PRECISION"],"type":"u64"},{"name":"longIntensityVolume","docs":["the volume intensity of long fills against AMM"],"type":"u64"},{"name":"shortIntensityVolume","docs":["the volume intensity of short fills against AMM"],"type":"u64"},{"name":"lastTradeTs","docs":["the blockchain unix timestamp at the time of the last trade"],"type":"i64"},{"name":"markStd","docs":["estimate of standard deviation of the fill (mark) prices","precision: PRICE_PRECISION"],"type":"u64"},{"name":"oracleStd","docs":["estimate of standard deviation of the oracle price at each update","precision: PRICE_PRECISION"],"type":"u64"},{"name":"lastMarkPriceTwapTs","docs":["the last unix_timestamp the mark twap was updated"],"type":"i64"},{"name":"baseSpread","docs":["the minimum spread the AMM can quote. also used as step size for some spread logic increases."],"type":"u32"},{"name":"maxSpread","docs":["the maximum spread the AMM can quote"],"type":"u32"},{"name":"longSpread","docs":["the spread for asks vs the reserve price"],"type":"u32"},{"name":"shortSpread","docs":["the spread for bids vs the reserve price"],"type":"u32"},{"name":"mmOraclePrice","docs":["MM oracle price"],"type":"i64"},{"name":"maxFillReserveFraction","docs":["the fraction of total available liquidity a single fill on the AMM can consume"],"type":"u16"},{"name":"maxSlippageRatio","docs":["the maximum slippage a single fill on the AMM can push"],"type":"u16"},{"name":"curveUpdateIntensity","docs":["the update intensity of AMM formulaic updates (adjusting k). 0-100"],"type":"u8"},{"name":"ammJitIntensity","docs":["the jit intensity of AMM. larger intensity means larger participation in jit. 0 means no jit participation.","(0, 100] is intensity for protocol-owned AMM. (100, 200] is intensity for user LP-owned AMM."],"type":"u8"},{"name":"oracleSource","docs":["the oracle provider information. used to decode/scale the oracle public key"],"type":{"defined":"OracleSource"}},{"name":"lastOracleValid","docs":["tracks whether the oracle was considered valid at the last AMM update"],"type":"bool"},{"name":"targetBaseAssetAmountPerLp","docs":["the target value for `base_asset_amount_per_lp`, used during AMM JIT with LP split","precision: BASE_PRECISION"],"type":"i32"},{"name":"perLpBase","docs":["expo for unit of per_lp, base 10 (if per_lp_base=X, then per_lp unit is 10^X)"],"type":"i8"},{"name":"oracleLowRiskSlotDelayOverride","docs":["the override for the state.min_perp_auction_duration","0 is no override, -1 is disable speed bump, 1-100 is literal speed bump"],"type":"i8"},{"name":"ammSpreadAdjustment","docs":["signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double)"],"type":"i8"},{"name":"oracleSlotDelayOverride","type":"i8"},{"name":"mmOracleSequenceId","type":"u64"},{"name":"netUnsettledFundingPnl","type":"i64"},{"name":"quoteAssetAmountWithUnsettledLp","type":"i64"},{"name":"referencePriceOffset","type":"i32"},{"name":"ammInventorySpreadAdjustment","docs":["signed scale amm_spread similar to fee_adjustment logic (-100 = 0, 100 = double)"],"type":"i8"},{"name":"referencePriceOffsetDeadbandPct","type":"u8"},{"name":"padding","type":{"array":["u8",2]}},{"name":"lastFundingOracleTwap","type":"i64"}]}},{"name":"RevenueShareOrder","type":{"kind":"struct","fields":[{"name":"feesAccrued","docs":["fees accrued so far for this order slot. This is not exclusively fees from this order_id","and may include fees from other orders in the same market. This may be swept to the","builder's SpotPosition during settle_pnl."],"type":"u64"},{"name":"orderId","docs":["the order_id of the current active order in this slot. It's only relevant while bit_flag = Open"],"type":"u32"},{"name":"feeTenthBps","docs":["the builder fee on this order, in tenths of a bps, e.g. 100 = 0.01%"],"type":"u16"},{"name":"marketIndex","type":"u16"},{"name":"subAccountId","docs":["the subaccount_id of the user who created this order. It's only relevant while bit_flag = Open"],"type":"u16"},{"name":"builderIdx","docs":["the index of the RevenueShareEscrow.approved_builders list, that this order's fee will settle to. Ignored","if bit_flag = Referral."],"type":"u8"},{"name":"bitFlags","docs":["bitflags that describe the state of the order.","[`RevenueShareOrderBitFlag::Init`]: this order slot is available for use.","[`RevenueShareOrderBitFlag::Open`]: this order slot is occupied, `order_id` is the `sub_account_id`'s active order.","[`RevenueShareOrderBitFlag::Completed`]: this order has been filled or canceled, and is waiting to be settled into.","the builder's account order_id and sub_account_id are no longer relevant, it may be merged with other orders.","[`RevenueShareOrderBitFlag::Referral`]: this order stores referral rewards waiting to be settled for this market.","If it is set, no other bitflag should be set."],"type":"u8"},{"name":"userOrderIndex","docs":["the index into the User's orders list when this RevenueShareOrder was created, make sure to verify that order_id matches."],"type":"u8"},{"name":"marketType","type":{"defined":"MarketType"}},{"name":"padding","type":{"array":["u8",10]}}]}},{"name":"BuilderInfo","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"maxFeeTenthBps","type":"u16"},{"name":"padding","type":{"array":["u8",6]}}]}},{"name":"RevenueShareEscrowFixed","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"referrer","type":"publicKey"},{"name":"referrerBoostExpireTs","type":"u32"},{"name":"referrerRewardOffset","type":"i8"},{"name":"refereeFeeNumeratorOffset","type":"i8"},{"name":"referrerBoostNumerator","type":"i8"},{"name":"reservedFixed","type":{"array":["u8",17]}}]}},{"name":"SignedMsgOrderId","type":{"kind":"struct","fields":[{"name":"uuid","type":{"array":["u8",8]}},{"name":"maxSlot","type":"u64"},{"name":"orderId","type":"u32"},{"name":"padding","type":"u32"}]}},{"name":"SignedMsgUserOrdersFixed","type":{"kind":"struct","fields":[{"name":"userPubkey","type":"publicKey"},{"name":"padding","type":"u32"},{"name":"len","type":"u32"}]}},{"name":"InsuranceFund","type":{"kind":"struct","fields":[{"name":"vault","type":"publicKey"},{"name":"totalShares","type":"u128"},{"name":"userShares","type":"u128"},{"name":"sharesBase","type":"u128"},{"name":"unstakingPeriod","type":"i64"},{"name":"lastRevenueSettleTs","type":"i64"},{"name":"revenueSettlePeriod","type":"i64"},{"name":"totalFactor","type":"u32"},{"name":"userFactor","type":"u32"}]}},{"name":"OracleGuardRails","type":{"kind":"struct","fields":[{"name":"priceDivergence","type":{"defined":"PriceDivergenceGuardRails"}},{"name":"validity","type":{"defined":"ValidityGuardRails"}}]}},{"name":"PriceDivergenceGuardRails","type":{"kind":"struct","fields":[{"name":"markOraclePercentDivergence","type":"u64"},{"name":"oracleTwap5minPercentDivergence","type":"u64"}]}},{"name":"ValidityGuardRails","type":{"kind":"struct","fields":[{"name":"slotsBeforeStaleForAmm","type":"i64"},{"name":"slotsBeforeStaleForMargin","type":"i64"},{"name":"confidenceIntervalMaxSize","type":"u64"},{"name":"tooVolatileRatio","type":"i64"}]}},{"name":"FeeStructure","type":{"kind":"struct","fields":[{"name":"feeTiers","type":{"array":[{"defined":"FeeTier"},10]}},{"name":"fillerRewardStructure","type":{"defined":"OrderFillerRewardStructure"}},{"name":"referrerRewardEpochUpperBound","type":"u64"},{"name":"flatFillerFee","type":"u64"}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"feeNumerator","type":"u32"},{"name":"feeDenominator","type":"u32"},{"name":"makerRebateNumerator","type":"u32"},{"name":"makerRebateDenominator","type":"u32"},{"name":"referrerRewardNumerator","type":"u32"},{"name":"referrerRewardDenominator","type":"u32"},{"name":"refereeFeeNumerator","type":"u32"},{"name":"refereeFeeDenominator","type":"u32"}]}},{"name":"OrderFillerRewardStructure","type":{"kind":"struct","fields":[{"name":"rewardNumerator","type":"u32"},{"name":"rewardDenominator","type":"u32"},{"name":"timeBasedRewardLowerBound","type":"u128"}]}},{"name":"UserFees","type":{"kind":"struct","fields":[{"name":"totalFeePaid","docs":["Total taker fee paid","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalFeeRebate","docs":["Total maker fee rebate","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalTokenDiscount","docs":["Total discount from holding token","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalRefereeDiscount","docs":["Total discount from being referred","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"totalReferrerReward","docs":["Total reward to referrer","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"currentEpochReferrerReward","docs":["Total reward to referrer this epoch","precision: QUOTE_PRECISION"],"type":"u64"}]}},{"name":"SpotPosition","type":{"kind":"struct","fields":[{"name":"scaledBalance","docs":["The scaled balance of the position. To get the token amount, multiply by the cumulative deposit/borrow","interest of corresponding market.","precision: SPOT_BALANCE_PRECISION"],"type":"u64"},{"name":"openBids","docs":["How many spot non reduce only trigger orders the user has open","precision: token mint precision"],"type":"i64"},{"name":"openAsks","docs":["How many spot non reduce only trigger orders the user has open","precision: token mint precision"],"type":"i64"},{"name":"cumulativeDeposits","docs":["The cumulative deposits/borrows a user has made into a market","precision: token mint precision"],"type":"i64"},{"name":"marketIndex","docs":["The market index of the corresponding spot market"],"type":"u16"},{"name":"balanceType","docs":["Whether the position is deposit or borrow"],"type":{"defined":"SpotBalanceType"}},{"name":"openOrders","docs":["Number of open orders"],"type":"u8"},{"name":"padding","type":{"array":["u8",4]}}]}},{"name":"PerpPosition","type":{"kind":"struct","fields":[{"name":"lastCumulativeFundingRate","docs":["The perp market's last cumulative funding rate. Used to calculate the funding payment owed to user","precision: FUNDING_RATE_PRECISION"],"type":"i64"},{"name":"baseAssetAmount","docs":["the size of the users perp position","precision: BASE_PRECISION"],"type":"i64"},{"name":"quoteAssetAmount","docs":["Used to calculate the users pnl. Upon entry, is equal to base_asset_amount * avg entry price - fees","Updated when the user open/closes position or settles pnl. Includes fees/funding","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"quoteBreakEvenAmount","docs":["The amount of quote the user would need to exit their position at to break even","Updated when the user open/closes position or settles pnl. Includes fees/funding","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"quoteEntryAmount","docs":["The amount quote the user entered the position with. Equal to base asset amount * avg entry price","Updated when the user open/closes position. Excludes fees/funding","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"openBids","docs":["The amount of non reduce only trigger orders the user has open","precision: BASE_PRECISION"],"type":"i64"},{"name":"openAsks","docs":["The amount of non reduce only trigger orders the user has open","precision: BASE_PRECISION"],"type":"i64"},{"name":"settledPnl","docs":["The amount of pnl settled in this market since opening the position","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"lpShares","docs":["The number of lp (liquidity provider) shares the user has in this perp market","LP shares allow users to provide liquidity via the AMM","precision: BASE_PRECISION"],"type":"u64"},{"name":"lastBaseAssetAmountPerLp","docs":["The last base asset amount per lp the amm had","Used to settle the users lp position","precision: BASE_PRECISION"],"type":"i64"},{"name":"lastQuoteAssetAmountPerLp","docs":["The last quote asset amount per lp the amm had","Used to settle the users lp position","precision: QUOTE_PRECISION"],"type":"i64"},{"name":"padding","type":{"array":["u8",2]}},{"name":"maxMarginRatio","type":"u16"},{"name":"marketIndex","docs":["The market index for the perp market"],"type":"u16"},{"name":"openOrders","docs":["The number of open orders"],"type":"u8"},{"name":"perLpBase","type":"i8"}]}},{"name":"Order","type":{"kind":"struct","fields":[{"name":"slot","docs":["The slot the order was placed"],"type":"u64"},{"name":"price","docs":["The limit price for the order (can be 0 for market orders)","For orders with an auction, this price isn't used until the auction is complete","precision: PRICE_PRECISION"],"type":"u64"},{"name":"baseAssetAmount","docs":["The size of the order","precision for perps: BASE_PRECISION","precision for spot: token mint precision"],"type":"u64"},{"name":"baseAssetAmountFilled","docs":["The amount of the order filled","precision for perps: BASE_PRECISION","precision for spot: token mint precision"],"type":"u64"},{"name":"quoteAssetAmountFilled","docs":["The amount of quote filled for the order","precision: QUOTE_PRECISION"],"type":"u64"},{"name":"triggerPrice","docs":["At what price the order will be triggered. Only relevant for trigger orders","precision: PRICE_PRECISION"],"type":"u64"},{"name":"auctionStartPrice","docs":["The start price for the auction. Only relevant for market/oracle orders","precision: PRICE_PRECISION"],"type":"i64"},{"name":"auctionEndPrice","docs":["The end price for the auction. Only relevant for market/oracle orders","precision: PRICE_PRECISION"],"type":"i64"},{"name":"maxTs","docs":["The time when the order will expire"],"type":"i64"},{"name":"oraclePriceOffset","docs":["If set, the order limit price is the oracle price + this offset","precision: PRICE_PRECISION"],"type":"i32"},{"name":"orderId","docs":["The id for the order. Each users has their own order id space"],"type":"u32"},{"name":"marketIndex","docs":["The perp/spot market index"],"type":"u16"},{"name":"status","docs":["Whether the order is open or unused"],"type":{"defined":"OrderStatus"}},{"name":"orderType","docs":["The type of order"],"type":{"defined":"OrderType"}},{"name":"marketType","docs":["Whether market is spot or perp"],"type":{"defined":"MarketType"}},{"name":"userOrderId","docs":["User generated order id. Can make it easier to place/cancel orders"],"type":"u8"},{"name":"existingPositionDirection","docs":["What the users position was when the order was placed"],"type":{"defined":"PositionDirection"}},{"name":"direction","docs":["Whether the user is going long or short. LONG = bid, SHORT = ask"],"type":{"defined":"PositionDirection"}},{"name":"reduceOnly","docs":["Whether the order is allowed to only reduce position size"],"type":"bool"},{"name":"postOnly","docs":["Whether the order must be a maker"],"type":"bool"},{"name":"immediateOrCancel","docs":["Whether the order must be canceled the same slot it is placed"],"type":"bool"},{"name":"triggerCondition","docs":["Whether the order is triggered above or below the trigger price. Only relevant for trigger orders"],"type":{"defined":"OrderTriggerCondition"}},{"name":"auctionDuration","docs":["How many slots the auction lasts"],"type":"u8"},{"name":"postedSlotTail","docs":["Last 8 bits of the slot the order was posted on-chain (not order slot for signed msg orders)"],"type":"u8"},{"name":"bitFlags","docs":["Bitflags for further classification","0: is_signed_message"],"type":"u8"},{"name":"padding","type":{"array":["u8",1]}}]}},{"name":"SwapDirection","type":{"kind":"enum","variants":[{"name":"Add"},{"name":"Remove"}]}},{"name":"ModifyOrderId","type":{"kind":"enum","variants":[{"name":"UserOrderId","fields":["u8"]},{"name":"OrderId","fields":["u32"]}]}},{"name":"PositionDirection","type":{"kind":"enum","variants":[{"name":"Long"},{"name":"Short"}]}},{"name":"SpotFulfillmentType","type":{"kind":"enum","variants":[{"name":"SerumV3"},{"name":"Match"},{"name":"PhoenixV1"},{"name":"OpenbookV2"}]}},{"name":"SwapReduceOnly","type":{"kind":"enum","variants":[{"name":"In"},{"name":"Out"}]}},{"name":"TwapPeriod","type":{"kind":"enum","variants":[{"name":"FundingPeriod"},{"name":"FiveMin"}]}},{"name":"LiquidationMultiplierType","type":{"kind":"enum","variants":[{"name":"Discount"},{"name":"Premium"}]}},{"name":"SettlementDirection","type":{"kind":"enum","variants":[{"name":"ToLpPool"},{"name":"FromLpPool"},{"name":"None"}]}},{"name":"MarginRequirementType","type":{"kind":"enum","variants":[{"name":"Initial"},{"name":"Fill"},{"name":"Maintenance"}]}},{"name":"OracleValidity","type":{"kind":"enum","variants":[{"name":"NonPositive"},{"name":"TooVolatile"},{"name":"TooUncertain"},{"name":"StaleForMargin"},{"name":"InsufficientDataPoints"},{"name":"StaleForAMM","fields":[{"name":"immediate","type":"bool"},{"name":"lowRisk","type":"bool"}]},{"name":"Valid"}]}},{"name":"DriftAction","type":{"kind":"enum","variants":[{"name":"UpdateFunding"},{"name":"SettlePnl"},{"name":"TriggerOrder"},{"name":"FillOrderMatch"},{"name":"FillOrderAmmLowRisk"},{"name":"FillOrderAmmImmediate"},{"name":"Liquidate"},{"name":"MarginCalc"},{"name":"UpdateTwap"},{"name":"UpdateAMMCurve"},{"name":"OracleOrderPrice"},{"name":"UseMMOraclePrice"},{"name":"UpdateAmmCache"},{"name":"UpdateLpPoolAum"},{"name":"LpPoolSwap"}]}},{"name":"LogMode","type":{"kind":"enum","variants":[{"name":"None"},{"name":"ExchangeOracle"},{"name":"MMOracle"},{"name":"SafeMMOracle"},{"name":"Margin"}]}},{"name":"PositionUpdateType","type":{"kind":"enum","variants":[{"name":"Open"},{"name":"Increase"},{"name":"Reduce"},{"name":"Close"},{"name":"Flip"}]}},{"name":"DepositExplanation","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Transfer"},{"name":"Borrow"},{"name":"RepayBorrow"},{"name":"Reward"}]}},{"name":"DepositDirection","type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Withdraw"}]}},{"name":"OrderAction","type":{"kind":"enum","variants":[{"name":"Place"},{"name":"Cancel"},{"name":"Fill"},{"name":"Trigger"},{"name":"Expire"}]}},{"name":"OrderActionExplanation","type":{"kind":"enum","variants":[{"name":"None"},{"name":"InsufficientFreeCollateral"},{"name":"OraclePriceBreachedLimitPrice"},{"name":"MarketOrderFilledToLimitPrice"},{"name":"OrderExpired"},{"name":"Liquidation"},{"name":"OrderFilledWithAMM"},{"name":"OrderFilledWithAMMJit"},{"name":"OrderFilledWithMatch"},{"name":"OrderFilledWithMatchJit"},{"name":"MarketExpired"},{"name":"RiskingIncreasingOrder"},{"name":"ReduceOnlyOrderIncreasedPosition"},{"name":"OrderFillWithSerum"},{"name":"NoBorrowLiquidity"},{"name":"OrderFillWithPhoenix"},{"name":"OrderFilledWithAMMJitLPSplit"},{"name":"OrderFilledWithLPJit"},{"name":"DeriskLp"},{"name":"OrderFilledWithOpenbookV2"},{"name":"TransferPerpPosition"}]}},{"name":"LPAction","type":{"kind":"enum","variants":[{"name":"AddLiquidity"},{"name":"RemoveLiquidity"},{"name":"SettleLiquidity"},{"name":"RemoveLiquidityDerisk"}]}},{"name":"LiquidationType","type":{"kind":"enum","variants":[{"name":"LiquidatePerp"},{"name":"LiquidateSpot"},{"name":"LiquidateBorrowForPerpPnl"},{"name":"LiquidatePerpPnlForDeposit"},{"name":"PerpBankruptcy"},{"name":"SpotBankruptcy"}]}},{"name":"SettlePnlExplanation","type":{"kind":"enum","variants":[{"name":"None"},{"name":"ExpiredPosition"}]}},{"name":"StakeAction","type":{"kind":"enum","variants":[{"name":"Stake"},{"name":"UnstakeRequest"},{"name":"UnstakeCancelRequest"},{"name":"Unstake"},{"name":"UnstakeTransfer"},{"name":"StakeTransfer"},{"name":"AdminDeposit"}]}},{"name":"FillMode","type":{"kind":"enum","variants":[{"name":"Fill"},{"name":"PlaceAndMake"},{"name":"PlaceAndTake","fields":["bool","u8"]},{"name":"Liquidation"}]}},{"name":"PerpFulfillmentMethod","type":{"kind":"enum","variants":[{"name":"AMM","fields":[{"option":"u64"}]},{"name":"Match","fields":["publicKey","u16","u64"]}]}},{"name":"SpotFulfillmentMethod","type":{"kind":"enum","variants":[{"name":"ExternalMarket"},{"name":"Match","fields":["publicKey","u16"]}]}},{"name":"ConstituentStatus","type":{"kind":"enum","variants":[{"name":"ReduceOnly"},{"name":"Decommissioned"}]}},{"name":"MarginCalculationMode","type":{"kind":"enum","variants":[{"name":"Standard","fields":[{"name":"trackOpenOrdersFraction","type":"bool"}]},{"name":"Liquidation","fields":[{"name":"marketToTrackMarginRequirement","type":{"option":{"defined":"MarketIdentifier"}}}]}]}},{"name":"OracleSource","type":{"kind":"enum","variants":[{"name":"Pyth"},{"name":"Switchboard"},{"name":"QuoteAsset"},{"name":"Pyth1K"},{"name":"Pyth1M"},{"name":"PythStableCoin"},{"name":"Prelaunch"},{"name":"PythPull"},{"name":"Pyth1KPull"},{"name":"Pyth1MPull"},{"name":"PythStableCoinPull"},{"name":"SwitchboardOnDemand"},{"name":"PythLazer"},{"name":"PythLazer1K"},{"name":"PythLazer1M"},{"name":"PythLazerStableCoin"}]}},{"name":"OrderParamsBitFlag","type":{"kind":"enum","variants":[{"name":"ImmediateOrCancel"},{"name":"UpdateHighLeverageMode"}]}},{"name":"PostOnlyParam","type":{"kind":"enum","variants":[{"name":"None"},{"name":"MustPostOnly"},{"name":"TryPostOnly"},{"name":"Slide"}]}},{"name":"ModifyOrderPolicy","type":{"kind":"enum","variants":[{"name":"MustModify"},{"name":"ExcludePreviousFill"}]}},{"name":"PlaceAndTakeOrderSuccessCondition","type":{"kind":"enum","variants":[{"name":"PartialFill"},{"name":"FullFill"}]}},{"name":"PerpOperation","type":{"kind":"enum","variants":[{"name":"UpdateFunding"},{"name":"AmmFill"},{"name":"Fill"},{"name":"SettlePnl"},{"name":"SettlePnlWithPosition"},{"name":"Liquidation"},{"name":"AmmImmediateFill"},{"name":"SettleRevPool"}]}},{"name":"SpotOperation","type":{"kind":"enum","variants":[{"name":"UpdateCumulativeInterest"},{"name":"Fill"},{"name":"Deposit"},{"name":"Withdraw"},{"name":"Liquidation"}]}},{"name":"InsuranceFundOperation","type":{"kind":"enum","variants":[{"name":"Init"},{"name":"Add"},{"name":"RequestRemove"},{"name":"Remove"}]}},{"name":"PerpLpOperation","type":{"kind":"enum","variants":[{"name":"TrackAmmRevenue"},{"name":"SettleQuoteOwed"}]}},{"name":"ConstituentLpOperation","type":{"kind":"enum","variants":[{"name":"Swap"},{"name":"Deposit"},{"name":"Withdraw"}]}},{"name":"MarketStatus","type":{"kind":"enum","variants":[{"name":"Initialized"},{"name":"Active"},{"name":"FundingPaused"},{"name":"AmmPaused"},{"name":"FillPaused"},{"name":"WithdrawPaused"},{"name":"ReduceOnly"},{"name":"Settlement"},{"name":"Delisted"}]}},{"name":"LpStatus","type":{"kind":"enum","variants":[{"name":"Uncollateralized"},{"name":"Active"},{"name":"Decommissioning"}]}},{"name":"ContractType","type":{"kind":"enum","variants":[{"name":"Perpetual"},{"name":"Future"},{"name":"Prediction"}]}},{"name":"ContractTier","type":{"kind":"enum","variants":[{"name":"A"},{"name":"B"},{"name":"C"},{"name":"Speculative"},{"name":"HighlySpeculative"},{"name":"Isolated"}]}},{"name":"RevenueShareOrderBitFlag","type":{"kind":"enum","variants":[{"name":"Init"},{"name":"Open"},{"name":"Completed"},{"name":"Referral"}]}},{"name":"SettlePnlMode","type":{"kind":"enum","variants":[{"name":"MustSettle"},{"name":"TrySettle"}]}},{"name":"SpotBalanceType","type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Borrow"}]}},{"name":"SpotFulfillmentConfigStatus","type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}},{"name":"AssetTier","type":{"kind":"enum","variants":[{"name":"Collateral"},{"name":"Protected"},{"name":"Cross"},{"name":"Isolated"},{"name":"Unlisted"}]}},{"name":"TokenProgramFlag","type":{"kind":"enum","variants":[{"name":"Token2022"},{"name":"TransferHook"}]}},{"name":"ExchangeStatus","type":{"kind":"enum","variants":[{"name":"DepositPaused"},{"name":"WithdrawPaused"},{"name":"AmmPaused"},{"name":"FillPaused"},{"name":"LiqPaused"},{"name":"FundingPaused"},{"name":"SettlePnlPaused"},{"name":"AmmImmediateFillPaused"}]}},{"name":"FeatureBitFlags","type":{"kind":"enum","variants":[{"name":"MmOracleUpdate"},{"name":"MedianTriggerPrice"},{"name":"BuilderCodes"},{"name":"BuilderReferral"}]}},{"name":"LpPoolFeatureBitFlags","type":{"kind":"enum","variants":[{"name":"SettleLpPool"},{"name":"SwapLpPool"},{"name":"MintRedeemLpPool"}]}},{"name":"UserStatus","type":{"kind":"enum","variants":[{"name":"BeingLiquidated"},{"name":"Bankrupt"},{"name":"ReduceOnly"},{"name":"AdvancedLp"},{"name":"ProtectedMakerOrders"}]}},{"name":"AssetType","type":{"kind":"enum","variants":[{"name":"Base"},{"name":"Quote"}]}},{"name":"OrderStatus","type":{"kind":"enum","variants":[{"name":"Init"},{"name":"Open"},{"name":"Filled"},{"name":"Canceled"}]}},{"name":"OrderType","type":{"kind":"enum","variants":[{"name":"Market"},{"name":"Limit"},{"name":"TriggerMarket"},{"name":"TriggerLimit"},{"name":"Oracle"}]}},{"name":"OrderTriggerCondition","type":{"kind":"enum","variants":[{"name":"Above"},{"name":"Below"},{"name":"TriggeredAbove"},{"name":"TriggeredBelow"}]}},{"name":"MarketType","type":{"kind":"enum","variants":[{"name":"Spot"},{"name":"Perp"}]}},{"name":"OrderBitFlag","type":{"kind":"enum","variants":[{"name":"SignedMessage"},{"name":"OracleTriggerMarket"},{"name":"SafeTriggerOrder"},{"name":"NewTriggerReduceOnly"},{"name":"HasBuilder"}]}},{"name":"ReferrerStatus","type":{"kind":"enum","variants":[{"name":"IsReferrer"},{"name":"IsReferred"},{"name":"BuilderReferral"}]}},{"name":"MarginMode","type":{"kind":"enum","variants":[{"name":"Default"},{"name":"HighLeverage"},{"name":"HighLeverageMaintenance"}]}},{"name":"FuelOverflowStatus","type":{"kind":"enum","variants":[{"name":"Exists"}]}},{"name":"UserStatsPausedOperations","type":{"kind":"enum","variants":[{"name":"UpdateBidAskTwap"},{"name":"AmmAtomicFill"},{"name":"AmmAtomicRiskIncreasingFill"}]}},{"name":"SignatureVerificationError","type":{"kind":"enum","variants":[{"name":"InvalidEd25519InstructionProgramId"},{"name":"InvalidEd25519InstructionDataLength"},{"name":"InvalidSignatureIndex"},{"name":"InvalidSignatureOffset"},{"name":"InvalidPublicKeyOffset"},{"name":"InvalidMessageOffset"},{"name":"InvalidMessageDataSize"},{"name":"InvalidInstructionIndex"},{"name":"MessageOffsetOverflow"},{"name":"InvalidMessageHex"},{"name":"InvalidMessageData"},{"name":"LoadInstructionAtFailed"}]}}],"events":[{"name":"NewUserRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"subAccountId","type":"u16","index":false},{"name":"name","type":{"array":["u8",32]},"index":false},{"name":"referrer","type":"publicKey","index":false}]},{"name":"DepositRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"direction","type":{"defined":"DepositDirection"},"index":false},{"name":"depositRecordId","type":"u64","index":false},{"name":"amount","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"marketDepositBalance","type":"u128","index":false},{"name":"marketWithdrawBalance","type":"u128","index":false},{"name":"marketCumulativeDepositInterest","type":"u128","index":false},{"name":"marketCumulativeBorrowInterest","type":"u128","index":false},{"name":"totalDepositsAfter","type":"u64","index":false},{"name":"totalWithdrawsAfter","type":"u64","index":false},{"name":"explanation","type":{"defined":"DepositExplanation"},"index":false},{"name":"transferUser","type":{"option":"publicKey"},"index":false},{"name":"signer","type":{"option":"publicKey"},"index":false},{"name":"userTokenAmountAfter","type":"i128","index":false}]},{"name":"SpotInterestRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"depositBalance","type":"u128","index":false},{"name":"cumulativeDepositInterest","type":"u128","index":false},{"name":"borrowBalance","type":"u128","index":false},{"name":"cumulativeBorrowInterest","type":"u128","index":false},{"name":"optimalUtilization","type":"u32","index":false},{"name":"optimalBorrowRate","type":"u32","index":false},{"name":"maxBorrowRate","type":"u32","index":false}]},{"name":"FundingPaymentRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"fundingPayment","type":"i64","index":false},{"name":"baseAssetAmount","type":"i64","index":false},{"name":"userLastCumulativeFunding","type":"i64","index":false},{"name":"ammCumulativeFundingLong","type":"i128","index":false},{"name":"ammCumulativeFundingShort","type":"i128","index":false}]},{"name":"FundingRateRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"recordId","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"fundingRate","type":"i64","index":false},{"name":"fundingRateLong","type":"i128","index":false},{"name":"fundingRateShort","type":"i128","index":false},{"name":"cumulativeFundingRateLong","type":"i128","index":false},{"name":"cumulativeFundingRateShort","type":"i128","index":false},{"name":"oraclePriceTwap","type":"i64","index":false},{"name":"markPriceTwap","type":"u64","index":false},{"name":"periodRevenue","type":"i64","index":false},{"name":"baseAssetAmountWithAmm","type":"i128","index":false},{"name":"baseAssetAmountWithUnsettledLp","type":"i128","index":false}]},{"name":"CurveRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"recordId","type":"u64","index":false},{"name":"pegMultiplierBefore","type":"u128","index":false},{"name":"baseAssetReserveBefore","type":"u128","index":false},{"name":"quoteAssetReserveBefore","type":"u128","index":false},{"name":"sqrtKBefore","type":"u128","index":false},{"name":"pegMultiplierAfter","type":"u128","index":false},{"name":"baseAssetReserveAfter","type":"u128","index":false},{"name":"quoteAssetReserveAfter","type":"u128","index":false},{"name":"sqrtKAfter","type":"u128","index":false},{"name":"baseAssetAmountLong","type":"u128","index":false},{"name":"baseAssetAmountShort","type":"u128","index":false},{"name":"baseAssetAmountWithAmm","type":"i128","index":false},{"name":"totalFee","type":"i128","index":false},{"name":"totalFeeMinusDistributions","type":"i128","index":false},{"name":"adjustmentCost","type":"i128","index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"fillRecord","type":"u128","index":false},{"name":"numberOfUsers","type":"u32","index":false},{"name":"marketIndex","type":"u16","index":false}]},{"name":"SignedMsgOrderRecord","fields":[{"name":"user","type":"publicKey","index":false},{"name":"hash","type":"string","index":false},{"name":"matchingOrderParams","type":{"defined":"OrderParams"},"index":false},{"name":"userOrderId","type":"u32","index":false},{"name":"signedMsgOrderMaxSlot","type":"u64","index":false},{"name":"signedMsgOrderUuid","type":{"array":["u8",8]},"index":false},{"name":"ts","type":"i64","index":false}]},{"name":"OrderRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"order","type":{"defined":"Order"},"index":false}]},{"name":"OrderActionRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"action","type":{"defined":"OrderAction"},"index":false},{"name":"actionExplanation","type":{"defined":"OrderActionExplanation"},"index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"marketType","type":{"defined":"MarketType"},"index":false},{"name":"filler","type":{"option":"publicKey"},"index":false},{"name":"fillerReward","type":{"option":"u64"},"index":false},{"name":"fillRecordId","type":{"option":"u64"},"index":false},{"name":"baseAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"quoteAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"takerFee","type":{"option":"u64"},"index":false},{"name":"makerFee","type":{"option":"i64"},"index":false},{"name":"referrerReward","type":{"option":"u32"},"index":false},{"name":"quoteAssetAmountSurplus","type":{"option":"i64"},"index":false},{"name":"spotFulfillmentMethodFee","type":{"option":"u64"},"index":false},{"name":"taker","type":{"option":"publicKey"},"index":false},{"name":"takerOrderId","type":{"option":"u32"},"index":false},{"name":"takerOrderDirection","type":{"option":{"defined":"PositionDirection"}},"index":false},{"name":"takerOrderBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"takerOrderCumulativeBaseAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"takerOrderCumulativeQuoteAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"maker","type":{"option":"publicKey"},"index":false},{"name":"makerOrderId","type":{"option":"u32"},"index":false},{"name":"makerOrderDirection","type":{"option":{"defined":"PositionDirection"}},"index":false},{"name":"makerOrderBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"makerOrderCumulativeBaseAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"makerOrderCumulativeQuoteAssetAmountFilled","type":{"option":"u64"},"index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"bitFlags","type":"u8","index":false},{"name":"takerExistingQuoteEntryAmount","type":{"option":"u64"},"index":false},{"name":"takerExistingBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"makerExistingQuoteEntryAmount","type":{"option":"u64"},"index":false},{"name":"makerExistingBaseAssetAmount","type":{"option":"u64"},"index":false},{"name":"triggerPrice","type":{"option":"u64"},"index":false},{"name":"builderIdx","type":{"option":"u8"},"index":false},{"name":"builderFee","type":{"option":"u64"},"index":false}]},{"name":"LPRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"action","type":{"defined":"LPAction"},"index":false},{"name":"nShares","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"deltaBaseAssetAmount","type":"i64","index":false},{"name":"deltaQuoteAssetAmount","type":"i64","index":false},{"name":"pnl","type":"i64","index":false}]},{"name":"LiquidationRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"liquidationType","type":{"defined":"LiquidationType"},"index":false},{"name":"user","type":"publicKey","index":false},{"name":"liquidator","type":"publicKey","index":false},{"name":"marginRequirement","type":"u128","index":false},{"name":"totalCollateral","type":"i128","index":false},{"name":"marginFreed","type":"u64","index":false},{"name":"liquidationId","type":"u16","index":false},{"name":"bankrupt","type":"bool","index":false},{"name":"canceledOrderIds","type":{"vec":"u32"},"index":false},{"name":"liquidatePerp","type":{"defined":"LiquidatePerpRecord"},"index":false},{"name":"liquidateSpot","type":{"defined":"LiquidateSpotRecord"},"index":false},{"name":"liquidateBorrowForPerpPnl","type":{"defined":"LiquidateBorrowForPerpPnlRecord"},"index":false},{"name":"liquidatePerpPnlForDeposit","type":{"defined":"LiquidatePerpPnlForDepositRecord"},"index":false},{"name":"perpBankruptcy","type":{"defined":"PerpBankruptcyRecord"},"index":false},{"name":"spotBankruptcy","type":{"defined":"SpotBankruptcyRecord"},"index":false}]},{"name":"SettlePnlRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"pnl","type":"i128","index":false},{"name":"baseAssetAmount","type":"i64","index":false},{"name":"quoteAssetAmountAfter","type":"i64","index":false},{"name":"quoteEntryAmount","type":"i64","index":false},{"name":"settlePrice","type":"i64","index":false},{"name":"explanation","type":{"defined":"SettlePnlExplanation"},"index":false}]},{"name":"InsuranceFundRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"spotMarketIndex","type":"u16","index":false},{"name":"perpMarketIndex","type":"u16","index":false},{"name":"userIfFactor","type":"u32","index":false},{"name":"totalIfFactor","type":"u32","index":false},{"name":"vaultAmountBefore","type":"u64","index":false},{"name":"insuranceVaultAmountBefore","type":"u64","index":false},{"name":"totalIfSharesBefore","type":"u128","index":false},{"name":"totalIfSharesAfter","type":"u128","index":false},{"name":"amount","type":"i64","index":false}]},{"name":"InsuranceFundStakeRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"action","type":{"defined":"StakeAction"},"index":false},{"name":"amount","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"insuranceVaultAmountBefore","type":"u64","index":false},{"name":"ifSharesBefore","type":"u128","index":false},{"name":"userIfSharesBefore","type":"u128","index":false},{"name":"totalIfSharesBefore","type":"u128","index":false},{"name":"ifSharesAfter","type":"u128","index":false},{"name":"userIfSharesAfter","type":"u128","index":false},{"name":"totalIfSharesAfter","type":"u128","index":false}]},{"name":"InsuranceFundSwapRecord","fields":[{"name":"rebalanceConfig","type":"publicKey","index":false},{"name":"inIfTotalSharesBefore","type":"u128","index":false},{"name":"outIfTotalSharesBefore","type":"u128","index":false},{"name":"inIfUserSharesBefore","type":"u128","index":false},{"name":"outIfUserSharesBefore","type":"u128","index":false},{"name":"inIfTotalSharesAfter","type":"u128","index":false},{"name":"outIfTotalSharesAfter","type":"u128","index":false},{"name":"inIfUserSharesAfter","type":"u128","index":false},{"name":"outIfUserSharesAfter","type":"u128","index":false},{"name":"ts","type":"i64","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"outOraclePrice","type":"u64","index":false},{"name":"outOraclePriceTwap","type":"i64","index":false},{"name":"inVaultAmountBefore","type":"u64","index":false},{"name":"outVaultAmountBefore","type":"u64","index":false},{"name":"inFundVaultAmountAfter","type":"u64","index":false},{"name":"outFundVaultAmountAfter","type":"u64","index":false},{"name":"inMarketIndex","type":"u16","index":false},{"name":"outMarketIndex","type":"u16","index":false}]},{"name":"TransferProtocolIfSharesToRevenuePoolRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"amount","type":"u64","index":false},{"name":"shares","type":"u128","index":false},{"name":"ifVaultAmountBefore","type":"u64","index":false},{"name":"protocolSharesBefore","type":"u128","index":false},{"name":"transferAmount","type":"u64","index":false}]},{"name":"SwapRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"user","type":"publicKey","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"outMarketIndex","type":"u16","index":false},{"name":"inMarketIndex","type":"u16","index":false},{"name":"outOraclePrice","type":"i64","index":false},{"name":"inOraclePrice","type":"i64","index":false},{"name":"fee","type":"u64","index":false}]},{"name":"SpotMarketVaultDepositRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"depositBalance","type":"u128","index":false},{"name":"cumulativeDepositInterestBefore","type":"u128","index":false},{"name":"cumulativeDepositInterestAfter","type":"u128","index":false},{"name":"depositTokenAmountBefore","type":"u64","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"DeleteUserRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"userAuthority","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"subAccountId","type":"u16","index":false},{"name":"keeper","type":{"option":"publicKey"},"index":false}]},{"name":"FuelSweepRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"userStatsFuelInsurance","type":"u32","index":false},{"name":"userStatsFuelDeposits","type":"u32","index":false},{"name":"userStatsFuelBorrows","type":"u32","index":false},{"name":"userStatsFuelPositions","type":"u32","index":false},{"name":"userStatsFuelTaker","type":"u32","index":false},{"name":"userStatsFuelMaker","type":"u32","index":false},{"name":"fuelOverflowFuelInsurance","type":"u128","index":false},{"name":"fuelOverflowFuelDeposits","type":"u128","index":false},{"name":"fuelOverflowFuelBorrows","type":"u128","index":false},{"name":"fuelOverflowFuelPositions","type":"u128","index":false},{"name":"fuelOverflowFuelTaker","type":"u128","index":false},{"name":"fuelOverflowFuelMaker","type":"u128","index":false}]},{"name":"FuelSeasonRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"fuelInsurance","type":"u128","index":false},{"name":"fuelDeposits","type":"u128","index":false},{"name":"fuelBorrows","type":"u128","index":false},{"name":"fuelPositions","type":"u128","index":false},{"name":"fuelTaker","type":"u128","index":false},{"name":"fuelMaker","type":"u128","index":false},{"name":"fuelTotal","type":"u128","index":false}]},{"name":"RevenueShareSettleRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"builder","type":{"option":"publicKey"},"index":false},{"name":"referrer","type":{"option":"publicKey"},"index":false},{"name":"feeSettled","type":"u64","index":false},{"name":"marketIndex","type":"u16","index":false},{"name":"marketType","type":{"defined":"MarketType"},"index":false},{"name":"builderSubAccountId","type":"u16","index":false},{"name":"builderTotalReferrerRewards","type":"u64","index":false},{"name":"builderTotalBuilderRewards","type":"u64","index":false}]},{"name":"LPSettleRecord","fields":[{"name":"recordId","type":"u64","index":false},{"name":"lastTs","type":"i64","index":false},{"name":"lastSlot","type":"u64","index":false},{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"perpMarketIndex","type":"u16","index":false},{"name":"settleToLpAmount","type":"i64","index":false},{"name":"perpAmmPnlDelta","type":"i64","index":false},{"name":"perpAmmExFeeDelta","type":"i64","index":false},{"name":"lpAum","type":"u128","index":false},{"name":"lpPrice","type":"u128","index":false},{"name":"lpPool","type":"publicKey","index":false}]},{"name":"LPSwapRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"outAmount","type":"u128","index":false},{"name":"inAmount","type":"u128","index":false},{"name":"outFee","type":"i128","index":false},{"name":"inFee","type":"i128","index":false},{"name":"outSpotMarketIndex","type":"u16","index":false},{"name":"inSpotMarketIndex","type":"u16","index":false},{"name":"outConstituentIndex","type":"u16","index":false},{"name":"inConstituentIndex","type":"u16","index":false},{"name":"outOraclePrice","type":"i64","index":false},{"name":"inOraclePrice","type":"i64","index":false},{"name":"lastAum","type":"u128","index":false},{"name":"lastAumSlot","type":"u64","index":false},{"name":"inMarketCurrentWeight","type":"i64","index":false},{"name":"outMarketCurrentWeight","type":"i64","index":false},{"name":"inMarketTargetWeight","type":"i64","index":false},{"name":"outMarketTargetWeight","type":"i64","index":false},{"name":"inSwapId","type":"u64","index":false},{"name":"outSwapId","type":"u64","index":false},{"name":"lpPool","type":"publicKey","index":false}]},{"name":"LPMintRedeemRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"description","type":"u8","index":false},{"name":"amount","type":"u128","index":false},{"name":"fee","type":"i128","index":false},{"name":"spotMarketIndex","type":"u16","index":false},{"name":"constituentIndex","type":"u16","index":false},{"name":"oraclePrice","type":"i64","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"lpAmount","type":"u64","index":false},{"name":"lpFee","type":"i64","index":false},{"name":"lpPrice","type":"u128","index":false},{"name":"mintRedeemId","type":"u64","index":false},{"name":"lastAum","type":"u128","index":false},{"name":"lastAumSlot","type":"u64","index":false},{"name":"inMarketCurrentWeight","type":"i64","index":false},{"name":"inMarketTargetWeight","type":"i64","index":false},{"name":"lpPool","type":"publicKey","index":false}]},{"name":"LPBorrowLendDepositRecord","fields":[{"name":"ts","type":"i64","index":false},{"name":"slot","type":"u64","index":false},{"name":"spotMarketIndex","type":"u16","index":false},{"name":"constituentIndex","type":"u16","index":false},{"name":"direction","type":{"defined":"DepositDirection"},"index":false},{"name":"tokenBalance","type":"i64","index":false},{"name":"lastTokenBalance","type":"i64","index":false},{"name":"interestAccruedTokenAmount","type":"i64","index":false},{"name":"amountDepositWithdraw","type":"u64","index":false},{"name":"lpPool","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"InvalidSpotMarketAuthority","msg":"Invalid Spot Market Authority"},{"code":6001,"name":"InvalidInsuranceFundAuthority","msg":"Clearing house not insurance fund authority"},{"code":6002,"name":"InsufficientDeposit","msg":"Insufficient deposit"},{"code":6003,"name":"InsufficientCollateral","msg":"Insufficient collateral"},{"code":6004,"name":"SufficientCollateral","msg":"Sufficient collateral"},{"code":6005,"name":"MaxNumberOfPositions","msg":"Max number of positions taken"},{"code":6006,"name":"AdminControlsPricesDisabled","msg":"Admin Controls Prices Disabled"},{"code":6007,"name":"MarketDelisted","msg":"Market Delisted"},{"code":6008,"name":"MarketIndexAlreadyInitialized","msg":"Market Index Already Initialized"},{"code":6009,"name":"UserAccountAndUserPositionsAccountMismatch","msg":"User Account And User Positions Account Mismatch"},{"code":6010,"name":"UserHasNoPositionInMarket","msg":"User Has No Position In Market"},{"code":6011,"name":"InvalidInitialPeg","msg":"Invalid Initial Peg"},{"code":6012,"name":"InvalidRepegRedundant","msg":"AMM repeg already configured with amt given"},{"code":6013,"name":"InvalidRepegDirection","msg":"AMM repeg incorrect repeg direction"},{"code":6014,"name":"InvalidRepegProfitability","msg":"AMM repeg out of bounds pnl"},{"code":6015,"name":"SlippageOutsideLimit","msg":"Slippage Outside Limit Price"},{"code":6016,"name":"OrderSizeTooSmall","msg":"Order Size Too Small"},{"code":6017,"name":"InvalidUpdateK","msg":"Price change too large when updating K"},{"code":6018,"name":"AdminWithdrawTooLarge","msg":"Admin tried to withdraw amount larger than fees collected"},{"code":6019,"name":"MathError","msg":"Math Error"},{"code":6020,"name":"BnConversionError","msg":"Conversion to u128/u64 failed with an overflow or underflow"},{"code":6021,"name":"ClockUnavailable","msg":"Clock unavailable"},{"code":6022,"name":"UnableToLoadOracle","msg":"Unable To Load Oracles"},{"code":6023,"name":"PriceBandsBreached","msg":"Price Bands Breached"},{"code":6024,"name":"ExchangePaused","msg":"Exchange is paused"},{"code":6025,"name":"InvalidWhitelistToken","msg":"Invalid whitelist token"},{"code":6026,"name":"WhitelistTokenNotFound","msg":"Whitelist token not found"},{"code":6027,"name":"InvalidDiscountToken","msg":"Invalid discount token"},{"code":6028,"name":"DiscountTokenNotFound","msg":"Discount token not found"},{"code":6029,"name":"ReferrerNotFound","msg":"Referrer not found"},{"code":6030,"name":"ReferrerStatsNotFound","msg":"ReferrerNotFound"},{"code":6031,"name":"ReferrerMustBeWritable","msg":"ReferrerMustBeWritable"},{"code":6032,"name":"ReferrerStatsMustBeWritable","msg":"ReferrerMustBeWritable"},{"code":6033,"name":"ReferrerAndReferrerStatsAuthorityUnequal","msg":"ReferrerAndReferrerStatsAuthorityUnequal"},{"code":6034,"name":"InvalidReferrer","msg":"InvalidReferrer"},{"code":6035,"name":"InvalidOracle","msg":"InvalidOracle"},{"code":6036,"name":"OracleNotFound","msg":"OracleNotFound"},{"code":6037,"name":"LiquidationsBlockedByOracle","msg":"Liquidations Blocked By Oracle"},{"code":6038,"name":"MaxDeposit","msg":"Can not deposit more than max deposit"},{"code":6039,"name":"CantDeleteUserWithCollateral","msg":"Can not delete user that still has collateral"},{"code":6040,"name":"InvalidFundingProfitability","msg":"AMM funding out of bounds pnl"},{"code":6041,"name":"CastingFailure","msg":"Casting Failure"},{"code":6042,"name":"InvalidOrder","msg":"InvalidOrder"},{"code":6043,"name":"InvalidOrderMaxTs","msg":"InvalidOrderMaxTs"},{"code":6044,"name":"InvalidOrderMarketType","msg":"InvalidOrderMarketType"},{"code":6045,"name":"InvalidOrderForInitialMarginReq","msg":"InvalidOrderForInitialMarginReq"},{"code":6046,"name":"InvalidOrderNotRiskReducing","msg":"InvalidOrderNotRiskReducing"},{"code":6047,"name":"InvalidOrderSizeTooSmall","msg":"InvalidOrderSizeTooSmall"},{"code":6048,"name":"InvalidOrderNotStepSizeMultiple","msg":"InvalidOrderNotStepSizeMultiple"},{"code":6049,"name":"InvalidOrderBaseQuoteAsset","msg":"InvalidOrderBaseQuoteAsset"},{"code":6050,"name":"InvalidOrderIOC","msg":"InvalidOrderIOC"},{"code":6051,"name":"InvalidOrderPostOnly","msg":"InvalidOrderPostOnly"},{"code":6052,"name":"InvalidOrderIOCPostOnly","msg":"InvalidOrderIOCPostOnly"},{"code":6053,"name":"InvalidOrderTrigger","msg":"InvalidOrderTrigger"},{"code":6054,"name":"InvalidOrderAuction","msg":"InvalidOrderAuction"},{"code":6055,"name":"InvalidOrderOracleOffset","msg":"InvalidOrderOracleOffset"},{"code":6056,"name":"InvalidOrderMinOrderSize","msg":"InvalidOrderMinOrderSize"},{"code":6057,"name":"PlacePostOnlyLimitFailure","msg":"Failed to Place Post-Only Limit Order"},{"code":6058,"name":"UserHasNoOrder","msg":"User has no order"},{"code":6059,"name":"OrderAmountTooSmall","msg":"Order Amount Too Small"},{"code":6060,"name":"MaxNumberOfOrders","msg":"Max number of orders taken"},{"code":6061,"name":"OrderDoesNotExist","msg":"Order does not exist"},{"code":6062,"name":"OrderNotOpen","msg":"Order not open"},{"code":6063,"name":"FillOrderDidNotUpdateState","msg":"FillOrderDidNotUpdateState"},{"code":6064,"name":"ReduceOnlyOrderIncreasedRisk","msg":"Reduce only order increased risk"},{"code":6065,"name":"UnableToLoadAccountLoader","msg":"Unable to load AccountLoader"},{"code":6066,"name":"TradeSizeTooLarge","msg":"Trade Size Too Large"},{"code":6067,"name":"UserCantReferThemselves","msg":"User cant refer themselves"},{"code":6068,"name":"DidNotReceiveExpectedReferrer","msg":"Did not receive expected referrer"},{"code":6069,"name":"CouldNotDeserializeReferrer","msg":"Could not deserialize referrer"},{"code":6070,"name":"CouldNotDeserializeReferrerStats","msg":"Could not deserialize referrer stats"},{"code":6071,"name":"UserOrderIdAlreadyInUse","msg":"User Order Id Already In Use"},{"code":6072,"name":"NoPositionsLiquidatable","msg":"No positions liquidatable"},{"code":6073,"name":"InvalidMarginRatio","msg":"Invalid Margin Ratio"},{"code":6074,"name":"CantCancelPostOnlyOrder","msg":"Cant Cancel Post Only Order"},{"code":6075,"name":"InvalidOracleOffset","msg":"InvalidOracleOffset"},{"code":6076,"name":"CantExpireOrders","msg":"CantExpireOrders"},{"code":6077,"name":"CouldNotLoadMarketData","msg":"CouldNotLoadMarketData"},{"code":6078,"name":"PerpMarketNotFound","msg":"PerpMarketNotFound"},{"code":6079,"name":"InvalidMarketAccount","msg":"InvalidMarketAccount"},{"code":6080,"name":"UnableToLoadPerpMarketAccount","msg":"UnableToLoadMarketAccount"},{"code":6081,"name":"MarketWrongMutability","msg":"MarketWrongMutability"},{"code":6082,"name":"UnableToCastUnixTime","msg":"UnableToCastUnixTime"},{"code":6083,"name":"CouldNotFindSpotPosition","msg":"CouldNotFindSpotPosition"},{"code":6084,"name":"NoSpotPositionAvailable","msg":"NoSpotPositionAvailable"},{"code":6085,"name":"InvalidSpotMarketInitialization","msg":"InvalidSpotMarketInitialization"},{"code":6086,"name":"CouldNotLoadSpotMarketData","msg":"CouldNotLoadSpotMarketData"},{"code":6087,"name":"SpotMarketNotFound","msg":"SpotMarketNotFound"},{"code":6088,"name":"InvalidSpotMarketAccount","msg":"InvalidSpotMarketAccount"},{"code":6089,"name":"UnableToLoadSpotMarketAccount","msg":"UnableToLoadSpotMarketAccount"},{"code":6090,"name":"SpotMarketWrongMutability","msg":"SpotMarketWrongMutability"},{"code":6091,"name":"SpotMarketInterestNotUpToDate","msg":"SpotInterestNotUpToDate"},{"code":6092,"name":"SpotMarketInsufficientDeposits","msg":"SpotMarketInsufficientDeposits"},{"code":6093,"name":"UserMustSettleTheirOwnPositiveUnsettledPNL","msg":"UserMustSettleTheirOwnPositiveUnsettledPNL"},{"code":6094,"name":"CantUpdatePoolBalanceType","msg":"CantUpdatePoolBalanceType"},{"code":6095,"name":"InsufficientCollateralForSettlingPNL","msg":"InsufficientCollateralForSettlingPNL"},{"code":6096,"name":"AMMNotUpdatedInSameSlot","msg":"AMMNotUpdatedInSameSlot"},{"code":6097,"name":"AuctionNotComplete","msg":"AuctionNotComplete"},{"code":6098,"name":"MakerNotFound","msg":"MakerNotFound"},{"code":6099,"name":"MakerStatsNotFound","msg":"MakerNotFound"},{"code":6100,"name":"MakerMustBeWritable","msg":"MakerMustBeWritable"},{"code":6101,"name":"MakerStatsMustBeWritable","msg":"MakerMustBeWritable"},{"code":6102,"name":"MakerOrderNotFound","msg":"MakerOrderNotFound"},{"code":6103,"name":"CouldNotDeserializeMaker","msg":"CouldNotDeserializeMaker"},{"code":6104,"name":"CouldNotDeserializeMakerStats","msg":"CouldNotDeserializeMaker"},{"code":6105,"name":"AuctionPriceDoesNotSatisfyMaker","msg":"AuctionPriceDoesNotSatisfyMaker"},{"code":6106,"name":"MakerCantFulfillOwnOrder","msg":"MakerCantFulfillOwnOrder"},{"code":6107,"name":"MakerOrderMustBePostOnly","msg":"MakerOrderMustBePostOnly"},{"code":6108,"name":"CantMatchTwoPostOnlys","msg":"CantMatchTwoPostOnlys"},{"code":6109,"name":"OrderBreachesOraclePriceLimits","msg":"OrderBreachesOraclePriceLimits"},{"code":6110,"name":"OrderMustBeTriggeredFirst","msg":"OrderMustBeTriggeredFirst"},{"code":6111,"name":"OrderNotTriggerable","msg":"OrderNotTriggerable"},{"code":6112,"name":"OrderDidNotSatisfyTriggerCondition","msg":"OrderDidNotSatisfyTriggerCondition"},{"code":6113,"name":"PositionAlreadyBeingLiquidated","msg":"PositionAlreadyBeingLiquidated"},{"code":6114,"name":"PositionDoesntHaveOpenPositionOrOrders","msg":"PositionDoesntHaveOpenPositionOrOrders"},{"code":6115,"name":"AllOrdersAreAlreadyLiquidations","msg":"AllOrdersAreAlreadyLiquidations"},{"code":6116,"name":"CantCancelLiquidationOrder","msg":"CantCancelLiquidationOrder"},{"code":6117,"name":"UserIsBeingLiquidated","msg":"UserIsBeingLiquidated"},{"code":6118,"name":"LiquidationsOngoing","msg":"LiquidationsOngoing"},{"code":6119,"name":"WrongSpotBalanceType","msg":"WrongSpotBalanceType"},{"code":6120,"name":"UserCantLiquidateThemself","msg":"UserCantLiquidateThemself"},{"code":6121,"name":"InvalidPerpPositionToLiquidate","msg":"InvalidPerpPositionToLiquidate"},{"code":6122,"name":"InvalidBaseAssetAmountForLiquidatePerp","msg":"InvalidBaseAssetAmountForLiquidatePerp"},{"code":6123,"name":"InvalidPositionLastFundingRate","msg":"InvalidPositionLastFundingRate"},{"code":6124,"name":"InvalidPositionDelta","msg":"InvalidPositionDelta"},{"code":6125,"name":"UserBankrupt","msg":"UserBankrupt"},{"code":6126,"name":"UserNotBankrupt","msg":"UserNotBankrupt"},{"code":6127,"name":"UserHasInvalidBorrow","msg":"UserHasInvalidBorrow"},{"code":6128,"name":"DailyWithdrawLimit","msg":"DailyWithdrawLimit"},{"code":6129,"name":"DefaultError","msg":"DefaultError"},{"code":6130,"name":"InsufficientLPTokens","msg":"Insufficient LP tokens"},{"code":6131,"name":"CantLPWithPerpPosition","msg":"Cant LP with a market position"},{"code":6132,"name":"UnableToBurnLPTokens","msg":"Unable to burn LP tokens"},{"code":6133,"name":"TryingToRemoveLiquidityTooFast","msg":"Trying to remove liqudity too fast after adding it"},{"code":6134,"name":"InvalidSpotMarketVault","msg":"Invalid Spot Market Vault"},{"code":6135,"name":"InvalidSpotMarketState","msg":"Invalid Spot Market State"},{"code":6136,"name":"InvalidSerumProgram","msg":"InvalidSerumProgram"},{"code":6137,"name":"InvalidSerumMarket","msg":"InvalidSerumMarket"},{"code":6138,"name":"InvalidSerumBids","msg":"InvalidSerumBids"},{"code":6139,"name":"InvalidSerumAsks","msg":"InvalidSerumAsks"},{"code":6140,"name":"InvalidSerumOpenOrders","msg":"InvalidSerumOpenOrders"},{"code":6141,"name":"FailedSerumCPI","msg":"FailedSerumCPI"},{"code":6142,"name":"FailedToFillOnExternalMarket","msg":"FailedToFillOnExternalMarket"},{"code":6143,"name":"InvalidFulfillmentConfig","msg":"InvalidFulfillmentConfig"},{"code":6144,"name":"InvalidFeeStructure","msg":"InvalidFeeStructure"},{"code":6145,"name":"InsufficientIFShares","msg":"Insufficient IF shares"},{"code":6146,"name":"MarketActionPaused","msg":"the Market has paused this action"},{"code":6147,"name":"MarketPlaceOrderPaused","msg":"the Market status doesnt allow placing orders"},{"code":6148,"name":"MarketFillOrderPaused","msg":"the Market status doesnt allow filling orders"},{"code":6149,"name":"MarketWithdrawPaused","msg":"the Market status doesnt allow withdraws"},{"code":6150,"name":"ProtectedAssetTierViolation","msg":"Action violates the Protected Asset Tier rules"},{"code":6151,"name":"IsolatedAssetTierViolation","msg":"Action violates the Isolated Asset Tier rules"},{"code":6152,"name":"UserCantBeDeleted","msg":"User Cant Be Deleted"},{"code":6153,"name":"ReduceOnlyWithdrawIncreasedRisk","msg":"Reduce Only Withdraw Increased Risk"},{"code":6154,"name":"MaxOpenInterest","msg":"Max Open Interest"},{"code":6155,"name":"CantResolvePerpBankruptcy","msg":"Cant Resolve Perp Bankruptcy"},{"code":6156,"name":"LiquidationDoesntSatisfyLimitPrice","msg":"Liquidation Doesnt Satisfy Limit Price"},{"code":6157,"name":"MarginTradingDisabled","msg":"Margin Trading Disabled"},{"code":6158,"name":"InvalidMarketStatusToSettlePnl","msg":"Invalid Market Status to Settle Perp Pnl"},{"code":6159,"name":"PerpMarketNotInSettlement","msg":"PerpMarketNotInSettlement"},{"code":6160,"name":"PerpMarketNotInReduceOnly","msg":"PerpMarketNotInReduceOnly"},{"code":6161,"name":"PerpMarketSettlementBufferNotReached","msg":"PerpMarketSettlementBufferNotReached"},{"code":6162,"name":"PerpMarketSettlementUserHasOpenOrders","msg":"PerpMarketSettlementUserHasOpenOrders"},{"code":6163,"name":"PerpMarketSettlementUserHasActiveLP","msg":"PerpMarketSettlementUserHasActiveLP"},{"code":6164,"name":"UnableToSettleExpiredUserPosition","msg":"UnableToSettleExpiredUserPosition"},{"code":6165,"name":"UnequalMarketIndexForSpotTransfer","msg":"UnequalMarketIndexForSpotTransfer"},{"code":6166,"name":"InvalidPerpPositionDetected","msg":"InvalidPerpPositionDetected"},{"code":6167,"name":"InvalidSpotPositionDetected","msg":"InvalidSpotPositionDetected"},{"code":6168,"name":"InvalidAmmDetected","msg":"InvalidAmmDetected"},{"code":6169,"name":"InvalidAmmForFillDetected","msg":"InvalidAmmForFillDetected"},{"code":6170,"name":"InvalidAmmLimitPriceOverride","msg":"InvalidAmmLimitPriceOverride"},{"code":6171,"name":"InvalidOrderFillPrice","msg":"InvalidOrderFillPrice"},{"code":6172,"name":"SpotMarketBalanceInvariantViolated","msg":"SpotMarketBalanceInvariantViolated"},{"code":6173,"name":"SpotMarketVaultInvariantViolated","msg":"SpotMarketVaultInvariantViolated"},{"code":6174,"name":"InvalidPDA","msg":"InvalidPDA"},{"code":6175,"name":"InvalidPDASigner","msg":"InvalidPDASigner"},{"code":6176,"name":"RevenueSettingsCannotSettleToIF","msg":"RevenueSettingsCannotSettleToIF"},{"code":6177,"name":"NoRevenueToSettleToIF","msg":"NoRevenueToSettleToIF"},{"code":6178,"name":"NoAmmPerpPnlDeficit","msg":"NoAmmPerpPnlDeficit"},{"code":6179,"name":"SufficientPerpPnlPool","msg":"SufficientPerpPnlPool"},{"code":6180,"name":"InsufficientPerpPnlPool","msg":"InsufficientPerpPnlPool"},{"code":6181,"name":"PerpPnlDeficitBelowThreshold","msg":"PerpPnlDeficitBelowThreshold"},{"code":6182,"name":"MaxRevenueWithdrawPerPeriodReached","msg":"MaxRevenueWithdrawPerPeriodReached"},{"code":6183,"name":"MaxIFWithdrawReached","msg":"InvalidSpotPositionDetected"},{"code":6184,"name":"NoIFWithdrawAvailable","msg":"NoIFWithdrawAvailable"},{"code":6185,"name":"InvalidIFUnstake","msg":"InvalidIFUnstake"},{"code":6186,"name":"InvalidIFUnstakeSize","msg":"InvalidIFUnstakeSize"},{"code":6187,"name":"InvalidIFUnstakeCancel","msg":"InvalidIFUnstakeCancel"},{"code":6188,"name":"InvalidIFForNewStakes","msg":"InvalidIFForNewStakes"},{"code":6189,"name":"InvalidIFRebase","msg":"InvalidIFRebase"},{"code":6190,"name":"InvalidInsuranceUnstakeSize","msg":"InvalidInsuranceUnstakeSize"},{"code":6191,"name":"InvalidOrderLimitPrice","msg":"InvalidOrderLimitPrice"},{"code":6192,"name":"InvalidIFDetected","msg":"InvalidIFDetected"},{"code":6193,"name":"InvalidAmmMaxSpreadDetected","msg":"InvalidAmmMaxSpreadDetected"},{"code":6194,"name":"InvalidConcentrationCoef","msg":"InvalidConcentrationCoef"},{"code":6195,"name":"InvalidSrmVault","msg":"InvalidSrmVault"},{"code":6196,"name":"InvalidVaultOwner","msg":"InvalidVaultOwner"},{"code":6197,"name":"InvalidMarketStatusForFills","msg":"InvalidMarketStatusForFills"},{"code":6198,"name":"IFWithdrawRequestInProgress","msg":"IFWithdrawRequestInProgress"},{"code":6199,"name":"NoIFWithdrawRequestInProgress","msg":"NoIFWithdrawRequestInProgress"},{"code":6200,"name":"IFWithdrawRequestTooSmall","msg":"IFWithdrawRequestTooSmall"},{"code":6201,"name":"IncorrectSpotMarketAccountPassed","msg":"IncorrectSpotMarketAccountPassed"},{"code":6202,"name":"BlockchainClockInconsistency","msg":"BlockchainClockInconsistency"},{"code":6203,"name":"InvalidIFSharesDetected","msg":"InvalidIFSharesDetected"},{"code":6204,"name":"NewLPSizeTooSmall","msg":"NewLPSizeTooSmall"},{"code":6205,"name":"MarketStatusInvalidForNewLP","msg":"MarketStatusInvalidForNewLP"},{"code":6206,"name":"InvalidMarkTwapUpdateDetected","msg":"InvalidMarkTwapUpdateDetected"},{"code":6207,"name":"MarketSettlementAttemptOnActiveMarket","msg":"MarketSettlementAttemptOnActiveMarket"},{"code":6208,"name":"MarketSettlementRequiresSettledLP","msg":"MarketSettlementRequiresSettledLP"},{"code":6209,"name":"MarketSettlementAttemptTooEarly","msg":"MarketSettlementAttemptTooEarly"},{"code":6210,"name":"MarketSettlementTargetPriceInvalid","msg":"MarketSettlementTargetPriceInvalid"},{"code":6211,"name":"UnsupportedSpotMarket","msg":"UnsupportedSpotMarket"},{"code":6212,"name":"SpotOrdersDisabled","msg":"SpotOrdersDisabled"},{"code":6213,"name":"MarketBeingInitialized","msg":"Market Being Initialized"},{"code":6214,"name":"InvalidUserSubAccountId","msg":"Invalid Sub Account Id"},{"code":6215,"name":"InvalidTriggerOrderCondition","msg":"Invalid Trigger Order Condition"},{"code":6216,"name":"InvalidSpotPosition","msg":"Invalid Spot Position"},{"code":6217,"name":"CantTransferBetweenSameUserAccount","msg":"Cant transfer between same user account"},{"code":6218,"name":"InvalidPerpPosition","msg":"Invalid Perp Position"},{"code":6219,"name":"UnableToGetLimitPrice","msg":"Unable To Get Limit Price"},{"code":6220,"name":"InvalidLiquidation","msg":"Invalid Liquidation"},{"code":6221,"name":"SpotFulfillmentConfigDisabled","msg":"Spot Fulfillment Config Disabled"},{"code":6222,"name":"InvalidMaker","msg":"Invalid Maker"},{"code":6223,"name":"FailedUnwrap","msg":"Failed Unwrap"},{"code":6224,"name":"MaxNumberOfUsers","msg":"Max Number Of Users"},{"code":6225,"name":"InvalidOracleForSettlePnl","msg":"InvalidOracleForSettlePnl"},{"code":6226,"name":"MarginOrdersOpen","msg":"MarginOrdersOpen"},{"code":6227,"name":"TierViolationLiquidatingPerpPnl","msg":"TierViolationLiquidatingPerpPnl"},{"code":6228,"name":"CouldNotLoadUserData","msg":"CouldNotLoadUserData"},{"code":6229,"name":"UserWrongMutability","msg":"UserWrongMutability"},{"code":6230,"name":"InvalidUserAccount","msg":"InvalidUserAccount"},{"code":6231,"name":"CouldNotLoadUserStatsData","msg":"CouldNotLoadUserData"},{"code":6232,"name":"UserStatsWrongMutability","msg":"UserWrongMutability"},{"code":6233,"name":"InvalidUserStatsAccount","msg":"InvalidUserAccount"},{"code":6234,"name":"UserNotFound","msg":"UserNotFound"},{"code":6235,"name":"UnableToLoadUserAccount","msg":"UnableToLoadUserAccount"},{"code":6236,"name":"UserStatsNotFound","msg":"UserStatsNotFound"},{"code":6237,"name":"UnableToLoadUserStatsAccount","msg":"UnableToLoadUserStatsAccount"},{"code":6238,"name":"UserNotInactive","msg":"User Not Inactive"},{"code":6239,"name":"RevertFill","msg":"RevertFill"},{"code":6240,"name":"InvalidMarketAccountforDeletion","msg":"Invalid MarketAccount for Deletion"},{"code":6241,"name":"InvalidSpotFulfillmentParams","msg":"Invalid Spot Fulfillment Params"},{"code":6242,"name":"FailedToGetMint","msg":"Failed to Get Mint"},{"code":6243,"name":"FailedPhoenixCPI","msg":"FailedPhoenixCPI"},{"code":6244,"name":"FailedToDeserializePhoenixMarket","msg":"FailedToDeserializePhoenixMarket"},{"code":6245,"name":"InvalidPricePrecision","msg":"InvalidPricePrecision"},{"code":6246,"name":"InvalidPhoenixProgram","msg":"InvalidPhoenixProgram"},{"code":6247,"name":"InvalidPhoenixMarket","msg":"InvalidPhoenixMarket"},{"code":6248,"name":"InvalidSwap","msg":"InvalidSwap"},{"code":6249,"name":"SwapLimitPriceBreached","msg":"SwapLimitPriceBreached"},{"code":6250,"name":"SpotMarketReduceOnly","msg":"SpotMarketReduceOnly"},{"code":6251,"name":"FundingWasNotUpdated","msg":"FundingWasNotUpdated"},{"code":6252,"name":"ImpossibleFill","msg":"ImpossibleFill"},{"code":6253,"name":"CantUpdatePerpBidAskTwap","msg":"CantUpdatePerpBidAskTwap"},{"code":6254,"name":"UserReduceOnly","msg":"UserReduceOnly"},{"code":6255,"name":"InvalidMarginCalculation","msg":"InvalidMarginCalculation"},{"code":6256,"name":"CantPayUserInitFee","msg":"CantPayUserInitFee"},{"code":6257,"name":"CantReclaimRent","msg":"CantReclaimRent"},{"code":6258,"name":"InsuranceFundOperationPaused","msg":"InsuranceFundOperationPaused"},{"code":6259,"name":"NoUnsettledPnl","msg":"NoUnsettledPnl"},{"code":6260,"name":"PnlPoolCantSettleUser","msg":"PnlPoolCantSettleUser"},{"code":6261,"name":"OracleNonPositive","msg":"OracleInvalid"},{"code":6262,"name":"OracleTooVolatile","msg":"OracleTooVolatile"},{"code":6263,"name":"OracleTooUncertain","msg":"OracleTooUncertain"},{"code":6264,"name":"OracleStaleForMargin","msg":"OracleStaleForMargin"},{"code":6265,"name":"OracleInsufficientDataPoints","msg":"OracleInsufficientDataPoints"},{"code":6266,"name":"OracleStaleForAMM","msg":"OracleStaleForAMM"},{"code":6267,"name":"UnableToParsePullOracleMessage","msg":"Unable to parse pull oracle message"},{"code":6268,"name":"MaxBorrows","msg":"Can not borow more than max borrows"},{"code":6269,"name":"OracleUpdatesNotMonotonic","msg":"Updates must be monotonically increasing"},{"code":6270,"name":"OraclePriceFeedMessageMismatch","msg":"Trying to update price feed with the wrong feed id"},{"code":6271,"name":"OracleUnsupportedMessageType","msg":"The message in the update must be a PriceFeedMessage"},{"code":6272,"name":"OracleDeserializeMessageFailed","msg":"Could not deserialize the message in the update"},{"code":6273,"name":"OracleWrongGuardianSetOwner","msg":"Wrong guardian set owner in update price atomic"},{"code":6274,"name":"OracleWrongWriteAuthority","msg":"Oracle post update atomic price feed account must be drift program"},{"code":6275,"name":"OracleWrongVaaOwner","msg":"Oracle vaa owner must be wormhole program"},{"code":6276,"name":"OracleTooManyPriceAccountUpdates","msg":"Multi updates must have 2 or fewer accounts passed in remaining accounts"},{"code":6277,"name":"OracleMismatchedVaaAndPriceUpdates","msg":"Don't have the same remaining accounts number and pyth updates left"},{"code":6278,"name":"OracleBadRemainingAccountPublicKey","msg":"Remaining account passed does not match oracle update derived pda"},{"code":6279,"name":"FailedOpenbookV2CPI","msg":"FailedOpenbookV2CPI"},{"code":6280,"name":"InvalidOpenbookV2Program","msg":"InvalidOpenbookV2Program"},{"code":6281,"name":"InvalidOpenbookV2Market","msg":"InvalidOpenbookV2Market"},{"code":6282,"name":"NonZeroTransferFee","msg":"Non zero transfer fee"},{"code":6283,"name":"LiquidationOrderFailedToFill","msg":"Liquidation order failed to fill"},{"code":6284,"name":"InvalidPredictionMarketOrder","msg":"Invalid prediction market order"},{"code":6285,"name":"InvalidVerificationIxIndex","msg":"Ed25519 Ix must be before place and make SignedMsg order ix"},{"code":6286,"name":"SigVerificationFailed","msg":"SignedMsg message verificaiton failed"},{"code":6287,"name":"MismatchedSignedMsgOrderParamsMarketIndex","msg":"Market index mismatched b/w taker and maker SignedMsg order params"},{"code":6288,"name":"InvalidSignedMsgOrderParam","msg":"Invalid SignedMsg order param"},{"code":6289,"name":"PlaceAndTakeOrderSuccessConditionFailed","msg":"Place and take order success condition failed"},{"code":6290,"name":"InvalidHighLeverageModeConfig","msg":"Invalid High Leverage Mode Config"},{"code":6291,"name":"InvalidRFQUserAccount","msg":"Invalid RFQ User Account"},{"code":6292,"name":"RFQUserAccountWrongMutability","msg":"RFQUserAccount should be mutable"},{"code":6293,"name":"RFQUserAccountFull","msg":"RFQUserAccount has too many active RFQs"},{"code":6294,"name":"RFQOrderNotFilled","msg":"RFQ order not filled as expected"},{"code":6295,"name":"InvalidRFQOrder","msg":"RFQ orders must be jit makers"},{"code":6296,"name":"InvalidRFQMatch","msg":"RFQ matches must be valid"},{"code":6297,"name":"InvalidSignedMsgUserAccount","msg":"Invalid SignedMsg user account"},{"code":6298,"name":"SignedMsgUserAccountWrongMutability","msg":"SignedMsg account wrong mutability"},{"code":6299,"name":"SignedMsgUserOrdersAccountFull","msg":"SignedMsgUserAccount has too many active orders"},{"code":6300,"name":"SignedMsgOrderDoesNotExist","msg":"Order with SignedMsg uuid does not exist"},{"code":6301,"name":"InvalidSignedMsgOrderId","msg":"SignedMsg order id cannot be 0s"},{"code":6302,"name":"InvalidPoolId","msg":"Invalid pool id"},{"code":6303,"name":"InvalidProtectedMakerModeConfig","msg":"Invalid Protected Maker Mode Config"},{"code":6304,"name":"InvalidPythLazerStorageOwner","msg":"Invalid pyth lazer storage owner"},{"code":6305,"name":"UnverifiedPythLazerMessage","msg":"Verification of pyth lazer message failed"},{"code":6306,"name":"InvalidPythLazerMessage","msg":"Invalid pyth lazer message"},{"code":6307,"name":"PythLazerMessagePriceFeedMismatch","msg":"Pyth lazer message does not correspond to correct fed id"},{"code":6308,"name":"InvalidLiquidateSpotWithSwap","msg":"InvalidLiquidateSpotWithSwap"},{"code":6309,"name":"SignedMsgUserContextUserMismatch","msg":"User in SignedMsg message does not match user in ix context"},{"code":6310,"name":"UserFuelOverflowThresholdNotMet","msg":"User fuel overflow threshold not met"},{"code":6311,"name":"FuelOverflowAccountNotFound","msg":"FuelOverflow account not found"},{"code":6312,"name":"InvalidTransferPerpPosition","msg":"Invalid Transfer Perp Position"},{"code":6313,"name":"InvalidSignedMsgUserOrdersResize","msg":"Invalid SignedMsgUserOrders resize"},{"code":6314,"name":"CouldNotDeserializeHighLeverageModeConfig","msg":"Could not deserialize high leverage mode config"},{"code":6315,"name":"InvalidIfRebalanceConfig","msg":"Invalid If Rebalance Config"},{"code":6316,"name":"InvalidIfRebalanceSwap","msg":"Invalid If Rebalance Swap"},{"code":6317,"name":"InvalidRevenueShareResize","msg":"Invalid RevenueShare resize"},{"code":6318,"name":"BuilderRevoked","msg":"Builder has been revoked"},{"code":6319,"name":"InvalidBuilderFee","msg":"Builder fee is greater than max fee bps"},{"code":6320,"name":"RevenueShareEscrowAuthorityMismatch","msg":"RevenueShareEscrow authority mismatch"},{"code":6321,"name":"RevenueShareEscrowOrdersAccountFull","msg":"RevenueShareEscrow has too many active orders"},{"code":6322,"name":"InvalidRevenueShareAccount","msg":"Invalid RevenueShareAccount"},{"code":6323,"name":"CannotRevokeBuilderWithOpenOrders","msg":"Cannot revoke builder with open orders"},{"code":6324,"name":"UnableToLoadRevenueShareAccount","msg":"Unable to load builder account"},{"code":6325,"name":"InvalidConstituent","msg":"Invalid Constituent"},{"code":6326,"name":"InvalidAmmConstituentMappingArgument","msg":"Invalid Amm Constituent Mapping argument"},{"code":6327,"name":"ConstituentNotFound","msg":"Constituent not found"},{"code":6328,"name":"ConstituentCouldNotLoad","msg":"Constituent could not load"},{"code":6329,"name":"ConstituentWrongMutability","msg":"Constituent wrong mutability"},{"code":6330,"name":"WrongNumberOfConstituents","msg":"Wrong number of constituents passed to instruction"},{"code":6331,"name":"InsufficientConstituentTokenBalance","msg":"Insufficient constituent token balance"},{"code":6332,"name":"AMMCacheStale","msg":"Amm Cache data too stale"},{"code":6333,"name":"LpPoolAumDelayed","msg":"LP Pool AUM not updated recently"},{"code":6334,"name":"ConstituentOracleStale","msg":"Constituent oracle is stale"},{"code":6335,"name":"LpInvariantFailed","msg":"LP Invariant failed"},{"code":6336,"name":"InvalidConstituentDerivativeWeights","msg":"Invalid constituent derivative weights"},{"code":6337,"name":"MaxDlpAumBreached","msg":"Max DLP AUM Breached"},{"code":6338,"name":"SettleLpPoolDisabled","msg":"Settle Lp Pool Disabled"},{"code":6339,"name":"MintRedeemLpPoolDisabled","msg":"Mint/Redeem Lp Pool Disabled"},{"code":6340,"name":"LpPoolSettleInvariantBreached","msg":"Settlement amount exceeded"},{"code":6341,"name":"InvalidConstituentOperation","msg":"Invalid constituent operation"},{"code":6342,"name":"Unauthorized","msg":"Unauthorized for operation"},{"code":6343,"name":"InvalidLpPoolId","msg":"Invalid Lp Pool Id for Operation"},{"code":6344,"name":"MarketIndexNotFoundAmmCache","msg":"MarketIndexNotFoundAmmCache"}]} \ No newline at end of file diff --git a/idls/fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json b/idls/fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json new file mode 100644 index 0000000..9991644 --- /dev/null +++ b/idls/fusion_amm.fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9.json @@ -0,0 +1 @@ +{"address":"fUSioN9YKKSa3CUC2YUc4tPkHJ5Y6XW1yz8y6F7qWz9","metadata":{"name":"fusionamm","version":"1.1.4","spec":"0.1.0"},"instructions":[{"name":"close_bundled_position","docs":["Close a bundled position in a FusionPool.","","### Authority","- `position_bundle_authority` - authority that owns the token corresponding to this desired position bundle.","","### Parameters","- `bundle_index` - The bundle index that we'd like to close.","","#### Special Errors","- `InvalidBundleIndex` - If the provided bundle index is out of bounds.","- `ClosePositionNotEmpty` - The provided position account is not empty."],"discriminator":[41,36,216,245,27,85,103,67],"accounts":[{"name":"bundled_position","writable":true},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"receiver","writable":true}],"args":[{"name":"bundle_index","type":"u16"}]},{"name":"close_limit_order","docs":["Close a limit order in a FusionPool. Burns the limit order token in the owner's wallet.","Mint and TokenAccount are based on Token-2022. And Mint account will be also closed.","","### Authority","- \"limit_order_authority\" - The authority that owns the limit order token.","","#### Special Errors","- `CloseLimitOrderNotEmpty` - The provided limit order account is not empty."],"discriminator":[76,124,128,15,213,87,37,250],"accounts":[{"name":"limit_order_authority","signer":true},{"name":"receiver","writable":true},{"name":"limit_order","writable":true},{"name":"limit_order_mint","writable":true},{"name":"limit_order_token_account","writable":true},{"name":"token_2022_program"}],"args":[]},{"name":"close_position","docs":["Close a position in a FusionPool. Burns the position token in the owner's wallet.","Mint and TokenAccount are based on Token-2022. And Mint account will be also closed.","","### Authority","- \"position_authority\" - The authority that owns the position token.","","#### Special Errors","- `ClosePositionNotEmpty` - The provided position account is not empty."],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","writable":true},{"name":"position_mint","writable":true},{"name":"position_token_account","writable":true},{"name":"token_2022_program"}],"args":[]},{"name":"collect_fees","docs":["Collect fees accrued for this position.","","### Authority","- `position_authority` - authority that owns the token corresponding to this desired position."],"discriminator":[164,152,207,99,30,186,19,182],"accounts":[{"name":"fusion_pool"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"collect_protocol_fees","docs":["Collect the protocol fees accrued in this FusionPool","","### Authority","- `collect_protocol_fees_authority` - assigned authority in the FusionPoolConfig that can collect protocol fees"],"discriminator":[22,67,23,98,150,178,70,220],"accounts":[{"name":"fusion_pools_config"},{"name":"fusion_pool","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_destination_a","writable":true},{"name":"token_destination_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"decrease_limit_order","docs":["Remove tokens from a limit order in the FusionPool.","","### Parameters","- `amount` - The total amount of tokens the user is willing to withdraw."],"discriminator":[117,157,60,103,66,49,163,0],"accounts":[{"name":"limit_order_authority","signer":true},{"name":"fusion_pool","writable":true},{"name":"limit_order","writable":true},{"name":"limit_order_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"}],"args":[{"name":"amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"decrease_liquidity","docs":["Withdraw liquidity from a position in the FusionPool. This call also updates the position's accrued fees.","","### Authority","- `position_authority` - authority that owns the token corresponding to this desired position.","","### Parameters","- `liquidity_amount` - The total amount of Liquidity the user desires to withdraw.","- `token_min_a` - The minimum amount of tokenA the user is willing to withdraw.","- `token_min_b` - The minimum amount of tokenB the user is willing to withdraw.","","#### Special Errors","- `LiquidityZero` - Provided liquidity amount is zero.","- `LiquidityTooHigh` - Provided liquidity exceeds u128::max.","- `TokenMinSubceeded` - The required token to perform this operation subceeds the user defined amount."],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"fusion_pool","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_min_a","type":"u64"},{"name":"token_min_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"delete_position_bundle","docs":["Delete a PositionBundle account. Burns the position bundle token in the owner's wallet.","","### Authority","- `position_bundle_owner` - The owner that owns the position bundle token.","","### Special Errors","- `PositionBundleNotDeletable` - The provided position bundle has open positions."],"discriminator":[100,25,99,2,217,239,124,173],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner","signer":true},{"name":"receiver","writable":true},{"name":"token_program"}],"args":[]},{"name":"delete_token_badge","discriminator":[53,146,68,8,18,117,17,185],"accounts":[{"name":"fusion_pools_config"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true},{"name":"receiver","writable":true}],"args":[]},{"name":"idl_include","discriminator":[223,253,121,121,60,193,129,31],"accounts":[{"name":"tick_array"},{"name":"system_program"}],"args":[]},{"name":"increase_limit_order","docs":["Add tokens to a limit order in the FusionPool.","","### Parameters","- `amount` - The total amount of tokens the user is willing to deposit."],"discriminator":[177,144,89,236,250,186,125,99],"accounts":[{"name":"limit_order_authority","signer":true},{"name":"fusion_pool","writable":true},{"name":"limit_order","writable":true},{"name":"limit_order_token_account"},{"name":"token_mint"},{"name":"token_owner_account","writable":true},{"name":"token_vault","writable":true},{"name":"tick_array","writable":true},{"name":"token_program"},{"name":"memo_program"}],"args":[{"name":"amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"increase_liquidity","docs":["Add liquidity to a position in the FusionPool. This call also updates the position's accrued fees.","","### Authority","- `position_authority` - authority that owns the token corresponding to this desired position.","","### Parameters","- `liquidity_amount` - The total amount of Liquidity the user is willing to deposit.","- `token_max_a` - The maximum amount of tokenA the user is willing to deposit.","- `token_max_b` - The maximum amount of tokenB the user is willing to deposit.","","#### Special Errors","- `LiquidityZero` - Provided liquidity amount is zero.","- `LiquidityTooHigh` - Provided liquidity exceeds u128::max.","- `TokenMaxExceeded` - The required token to perform this operation exceeds the user defined amount."],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"fusion_pool","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"initialize_config","docs":["Initializes a FusionPoolsConfig account that hosts info & authorities","required to govern a set of FusionPools.","","### Parameters","- `fee_authority` - Authority authorized to initialize fee-tiers and set customs fees.","- `collect_protocol_fees_authority` - Authority authorized to collect protocol fees.","- `token_badge_authority`","- `default_protocol_fee_rate`","- `default_order_protocol_fee_rate`"],"discriminator":[208,127,21,1,194,190,196,70],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"funder","writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"token_badge_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"initialize_pool","docs":["Initializes a FusionPool account.","","### Parameters","- `tick_spacing` - The desired tick spacing for this pool.","- `fee_rate` - The desired fee rate for this pool.","- `initial_sqrt_price` - The desired initial sqrt-price for this pool","","#### Special Errors","`InvalidTokenMintOrder` - The order of mints have to be ordered by","`SqrtPriceOutOfBounds` - provided initial_sqrt_price is not between 2^-64 to 2^64",""],"discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"fusion_pools_config"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_badge_a"},{"name":"token_badge_b"},{"name":"funder","writable":true,"signer":true},{"name":"fusion_pool","writable":true},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program"},{"name":"rent"}],"args":[{"name":"tick_spacing","type":"u16"},{"name":"fee_rate","type":"u16"},{"name":"initial_sqrt_price","type":"u128"}]},{"name":"initialize_position_bundle","docs":["Initializes a PositionBundle account that bundles several positions.","A unique token will be minted to represent the position bundle in the users wallet."],"discriminator":[117,45,241,149,24,18,194,65],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"token_program"},{"name":"system_program"},{"name":"rent"},{"name":"associated_token_program"}],"args":[]},{"name":"initialize_position_bundle_with_metadata","docs":["Initializes a PositionBundle account that bundles several positions.","A unique token will be minted to represent the position bundle in the users wallet.","Additional Metaplex metadata is appended to identify the token."],"discriminator":[93,124,16,179,249,131,115,245],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_metadata","docs":["https://github.com/metaplex-foundation/metaplex-program-library/blob/773a574c4b34e5b9f248a81306ec24db064e255f/token-metadata/program/src/utils/metadata.rs#L100"],"writable":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"metadata_update_auth"},{"name":"token_program"},{"name":"system_program"},{"name":"rent"},{"name":"associated_token_program"},{"name":"metadata_program"}],"args":[]},{"name":"initialize_tick_array","docs":["Initializes a tick_array account to represent a tick-range in a FusionPool.","","### Parameters","- `start_tick_index` - The starting tick index for this tick-array.","Has to be a multiple of TickArray size & the tick spacing of this pool.","","#### Special Errors","- `InvalidStartTick` - if the provided start tick is out of bounds or is not a multiple of","TICK_ARRAY_SIZE * tick spacing."],"discriminator":[11,188,193,214,141,91,149,184],"accounts":[{"name":"fusion_pool"},{"name":"funder","writable":true,"signer":true},{"name":"tick_array","writable":true},{"name":"system_program"}],"args":[{"name":"start_tick_index","type":"i32"}]},{"name":"initialize_token_badge","discriminator":[253,77,205,95,27,224,89,223],"accounts":[{"name":"fusion_pools_config"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true},{"name":"funder","writable":true,"signer":true},{"name":"system_program"}],"args":[]},{"name":"lock_position","docs":["Lock the position to prevent liquidity decrease.","","### Authority","- `position_authority` - The authority that owns the position token.","","#### Special Errors","- `PositionAlreadyLocked` - The provided position is already locked.","- `PositionNotLockable` - The provided position is not lockable (e.g. An empty position)."],"discriminator":[227,62,2,252,247,10,171,185],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"position_authority","signer":true},{"name":"position"},{"name":"position_mint"},{"name":"position_token_account","writable":true},{"name":"position_lock","writable":true},{"name":"fusion_pool"},{"name":"token_2022_program"},{"name":"system_program"}],"args":[{"name":"lock_type","type":{"defined":{"name":"PositionLockType"}}}]},{"name":"open_bundled_position","docs":["Open a bundled position in a FusionPool. No new tokens are issued","because the owner of the position bundle becomes the owner of the position.","The position will start off with 0 liquidity.","","### Authority","- `position_bundle_authority` - authority that owns the token corresponding to this desired position bundle.","","### Parameters","- `bundle_index` - The bundle index that we'd like to open.","- `tick_lower_index` - The tick specifying the lower end of the position range.","- `tick_upper_index` - The tick specifying the upper end of the position range.","","#### Special Errors","- `InvalidBundleIndex` - If the provided bundle index is out of bounds.","- `InvalidTickIndex` - If a provided tick is out of bounds, out of order or not a multiple of","the tick-spacing in this pool."],"discriminator":[169,113,126,171,213,172,212,49],"accounts":[{"name":"bundled_position","writable":true},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"fusion_pool"},{"name":"funder","writable":true,"signer":true},{"name":"system_program"},{"name":"rent"}],"args":[{"name":"bundle_index","type":"u16"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_limit_order","docs":["Open a limit order in a FusionPool. A unique token will be minted to represent the limit order","in the users wallet. The limit order will start off with 0 amount.","","### Parameters","- `tick_index` - The tick specifying the limit order execution price.","- `a_to_b` - The limit order swap direction.","- `with_token_metadata_extension` - If true, the token metadata extension will be initialized."],"discriminator":[157,32,218,183,71,29,18,147],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"limit_order","writable":true},{"name":"limit_order_mint","writable":true,"signer":true},{"name":"limit_order_token_account","writable":true},{"name":"fusion_pool"},{"name":"token_2022_program"},{"name":"system_program"},{"name":"associated_token_program"},{"name":"metadata_update_auth"}],"args":[{"name":"tick_index","type":"i32"},{"name":"a_to_b","type":"bool"},{"name":"with_token_metadata_extension","type":"bool"}]},{"name":"open_position","docs":["Open a position in a FusionPool. A unique token will be minted to represent the position","in the users wallet. Additional TokenMetadata extension is initialized to identify the token.","Mint and TokenAccount are based on Token-2022.","The position will start off with 0 liquidity.","","### Parameters","- `tick_lower_index` - The tick specifying the lower end of the position range.","- `tick_upper_index` - The tick specifying the upper end of the position range.","- `with_token_metadata_extension` - If true, the token metadata extension will be initialized.","","#### Special Errors","- `InvalidTickIndex` - If a provided tick is out of bounds, out of order or not a multiple of","the tick-spacing in this pool."],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true},{"name":"position_mint","writable":true,"signer":true},{"name":"position_token_account","writable":true},{"name":"fusion_pool"},{"name":"token_2022_program"},{"name":"system_program"},{"name":"associated_token_program"},{"name":"metadata_update_auth"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"with_token_metadata_extension","type":"bool"}]},{"name":"reset_pool_price","docs":["Resets the pool price to the provided value if the pool is empty.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `sqrt_price` - The new sqrt_price of the pool.","","#### Special Errors","- `ResetPriceForNonEmptyPool` - Thrown if the pool is not empty."],"discriminator":[93,158,158,189,131,42,15,22],"accounts":[{"name":"fee_authority","signer":true},{"name":"fusion_pools_config"},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"fusion_pool","writable":true}],"args":[{"name":"sqrt_price","type":"u128"}]},{"name":"set_collect_protocol_fees_authority","docs":["Sets the fee authority to collect protocol fees for a FusionPoolConfig.","Only the current collect protocol fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can collect protocol fees in the FusionPoolConfig"],"discriminator":[34,150,93,244,139,225,233,67],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"new_collect_protocol_fees_authority"}],"args":[]},{"name":"set_default_protocol_fee_rate","docs":["Sets the default protocol fee rate for a FusionPoolConfig","Protocol fee rate is represented as a basis point.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `default_protocol_fee_rate` - Rate that is referenced during the initialization of a FusionPool using this config.","","#### Special Errors","- `ProtocolFeeRateMaxExceeded` - If the provided default_protocol_fee_rate exceeds MAX_PROTOCOL_FEE_RATE."],"discriminator":[107,205,249,226,151,35,86,0],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"set_fee_authority","docs":["Sets the fee authority for a FusionPoolConfig.","The fee authority can set the fee & protocol fee rate for individual pools or","set the default fee rate for newly minted pools.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig"],"discriminator":[31,1,50,87,237,101,97,132],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"fee_authority","signer":true},{"name":"new_fee_authority"}],"args":[]},{"name":"set_fee_rate","docs":["Sets the fee rate for a FusionPool.","Fee rate is represented as hundredths of a basis point.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `fee_rate` - The rate that the pool will use to calculate fees going onwards.","","#### Special Errors","- `FeeRateMaxExceeded` - If the provided fee_rate exceeds MAX_FEE_RATE."],"discriminator":[53,243,137,65,8,140,158,6],"accounts":[{"name":"fusion_pools_config"},{"name":"fusion_pool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"set_position_range","docs":["Set the position range to a new one.","","### Authority","- `position_authority` - The authority that owns the position token.","","### Parameters","- `tick_lower_index` - The tick specifying the lower index of the position.","- `tick_upper_index` - The tick specifying the upper index of the position."],"discriminator":[192,22,176,176,155,49,153,96],"accounts":[{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account","writable":true},{"name":"fusion_pool"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"set_protocol_fee_rate","docs":["Sets the protocol fee rate for a FusionPool.","Protocol fee rate is represented as a basis point.","Only the current fee authority has permission to invoke this instruction.","","### Authority","- \"fee_authority\" - Set authority that can modify pool fees in the FusionPoolConfig","","### Parameters","- `protocol_fee_rate` - The rate that the pool will use to calculate protocol fees going onwards.","","#### Special Errors","- `ProtocolFeeRateMaxExceeded` - If the provided default_protocol_fee_rate exceeds MAX_PROTOCOL_FEE_RATE."],"discriminator":[95,7,4,50,154,79,156,131],"accounts":[{"name":"fusion_pools_config"},{"name":"fusion_pool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"protocol_fee_rate","type":"u16"}]},{"name":"set_token_badge_authority","discriminator":[207,202,4,32,205,79,13,178],"accounts":[{"name":"fusion_pools_config","writable":true},{"name":"fee_authority","signer":true},{"name":"new_token_badge_authority"}],"args":[]},{"name":"swap","docs":["Perform a swap in this FusionPool","","### Authority","- \"token_authority\" - The authority to withdraw tokens from the input token account.","","### Parameters","- `amount` - The amount of input or output token to swap from (depending on amount_specified_is_input).","- `other_amount_threshold` - The maximum/minimum of input/output token to swap into (depending on amount_specified_is_input).","- `sqrt_price_limit` - The maximum/minimum price the swap will swap to.","- `amount_specified_is_input` - Specifies the token the parameter `amount`represents. If true, the amount represents the input token of the swap.","- `a_to_b` - The direction of the swap. True if swapping from A to B. False if swapping from B to A.","","#### Special Errors","- `ZeroTradableAmount` - User provided parameter `amount` is 0.","- `InvalidSqrtPriceLimitDirection` - User provided parameter `sqrt_price_limit` does not match the direction of the trade.","- `SqrtPriceOutOfBounds` - User provided parameter `sqrt_price_limit` is over Whirlppool's max/min bounds for sqrt-price.","- `InvalidTickArraySequence` - User provided tick-arrays are not in sequential order required to proceed in this trade direction.","- `TickArraySequenceInvalidIndex` - The swap loop attempted to access an invalid array index during the query of the next initialized tick.","- `TickArrayIndexOutofBounds` - The swap loop attempted to access an invalid array index during tick crossing.","- `LiquidityOverflow` - Liquidity value overflowed 128bits during tick crossing.","- `InvalidTickSpacing` - The swap pool was initialized with tick-spacing of 0."],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program"},{"name":"token_authority","signer":true},{"name":"fusion_pool","writable":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_0","writable":true},{"name":"tick_array_1","writable":true},{"name":"tick_array_2","writable":true}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit","type":"u128"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"two_hop_swap","docs":["Perform a two-hop swap in this FusionPool","","### Authority","- \"token_authority\" - The authority to withdraw tokens from the input token account.","","### Parameters","- `amount` - The amount of input or output token to swap from (depending on amount_specified_is_input).","- `other_amount_threshold` - The maximum/minimum of input/output token to swap into (depending on amount_specified_is_input).","- `amount_specified_is_input` - Specifies the token the parameter `amount`represents. If true, the amount represents the input token of the swap.","- `a_to_b_one` - The direction of the swap of hop one. True if swapping from A to B. False if swapping from B to A.","- `a_to_b_two` - The direction of the swap of hop two. True if swapping from A to B. False if swapping from B to A.","- `sqrt_price_limit_one` - The maximum/minimum price the swap will swap to in the first hop.","- `sqrt_price_limit_two` - The maximum/minimum price the swap will swap to in the second hop.","","#### Special Errors","- `ZeroTradableAmount` - User provided parameter `amount` is 0.","- `InvalidSqrtPriceLimitDirection` - User provided parameter `sqrt_price_limit` does not match the direction of the trade.","- `SqrtPriceOutOfBounds` - User provided parameter `sqrt_price_limit` is over Whirlppool's max/min bounds for sqrt-price.","- `InvalidTickArraySequence` - User provided tick-arrays are not in sequential order required to proceed in this trade direction.","- `TickArraySequenceInvalidIndex` - The swap loop attempted to access an invalid array index during the query of the next initialized tick.","- `TickArrayIndexOutofBounds` - The swap loop attempted to access an invalid array index during tick crossing.","- `LiquidityOverflow` - Liquidity value overflowed 128bits during tick crossing.","- `InvalidTickSpacing` - The swap pool was initialized with tick-spacing of 0.","- `InvalidIntermediaryMint` - Error if the intermediary mint between hop one and two do not equal.","- `DuplicateTwoHopPool` - Error if fusion_pool one & two are the same pool."],"discriminator":[195,96,237,108,68,162,219,230],"accounts":[{"name":"fusion_pool_one","writable":true},{"name":"fusion_pool_two","writable":true},{"name":"token_mint_input"},{"name":"token_mint_intermediate"},{"name":"token_mint_output"},{"name":"token_program_input"},{"name":"token_program_intermediate"},{"name":"token_program_output"},{"name":"token_owner_account_input","writable":true},{"name":"token_vault_one_input","writable":true},{"name":"token_vault_one_intermediate","writable":true},{"name":"token_vault_two_intermediate","writable":true},{"name":"token_vault_two_output","writable":true},{"name":"token_owner_account_output","writable":true},{"name":"token_authority","signer":true},{"name":"tick_array_one_0","writable":true},{"name":"tick_array_one_1","writable":true},{"name":"tick_array_one_2","writable":true},{"name":"tick_array_two_0","writable":true},{"name":"tick_array_two_1","writable":true},{"name":"tick_array_two_2","writable":true},{"name":"memo_program"}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b_one","type":"bool"},{"name":"a_to_b_two","type":"bool"},{"name":"sqrt_price_limit_one","type":"u128"},{"name":"sqrt_price_limit_two","type":"u128"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"update_fees","docs":["Update the accrued fees for a position.","","#### Special Errors","- `TickNotFound` - Provided tick array account does not contain the tick for this position.","- `LiquidityZero` - Position has zero liquidity and therefore already has the most updated fees values."],"discriminator":[225,27,13,6,69,84,172,191],"accounts":[{"name":"fusion_pool","writable":true},{"name":"position","writable":true},{"name":"tick_array_lower"},{"name":"tick_array_upper"}],"args":[]}],"accounts":[{"name":"FusionPool","discriminator":[254,204,207,98,25,181,29,67]},{"name":"FusionPoolsConfig","discriminator":[191,199,19,11,75,86,239,169]},{"name":"LimitOrder","discriminator":[137,183,212,91,115,29,141,227]},{"name":"Position","discriminator":[170,188,143,228,122,64,247,208]},{"name":"PositionBundle","discriminator":[129,169,175,65,185,95,32,100]},{"name":"PositionLock","discriminator":[163,137,166,27,112,14,172,118]},{"name":"TickArray","discriminator":[85,1,199,2,188,97,101,139]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]}],"errors":[{"code":6000,"name":"InvalidEnum","msg":"Enum value could not be converted"},{"code":6001,"name":"InvalidStartTick","msg":"Invalid start tick index provided."},{"code":6002,"name":"TickArrayExistInPool","msg":"Tick-array already exists in this fusion_pool"},{"code":6003,"name":"TickArrayIndexOutofBounds","msg":"Attempt to search for a tick-array failed"},{"code":6004,"name":"InvalidTickSpacing","msg":"Tick-spacing is not supported"},{"code":6005,"name":"ClosePositionNotEmpty","msg":"Position is not empty It cannot be closed"},{"code":6006,"name":"DivideByZero","msg":"Unable to divide by zero"},{"code":6007,"name":"NumberCastError","msg":"Unable to cast number into BigInt"},{"code":6008,"name":"NumberDownCastError","msg":"Unable to down cast number"},{"code":6009,"name":"TickNotFound","msg":"Tick not found within tick array"},{"code":6010,"name":"InvalidTickIndex","msg":"Provided tick index is either out of bounds or uninitializable"},{"code":6011,"name":"SqrtPriceOutOfBounds","msg":"Provided sqrt price out of bounds"},{"code":6012,"name":"LiquidityZero","msg":"Liquidity amount must be greater than zero"},{"code":6013,"name":"LiquidityTooHigh","msg":"Liquidity amount must be less than i64::MAX"},{"code":6014,"name":"LiquidityOverflow","msg":"Liquidity overflow"},{"code":6015,"name":"LiquidityUnderflow","msg":"Liquidity underflow"},{"code":6016,"name":"LiquidityNetError","msg":"Tick liquidity net underflowed or overflowed"},{"code":6017,"name":"TokenMaxExceeded","msg":"Exceeded token max"},{"code":6018,"name":"TokenMinSubceeded","msg":"Did not meet token min"},{"code":6019,"name":"MissingOrInvalidDelegate","msg":"Position token account has a missing or invalid delegate"},{"code":6020,"name":"InvalidPositionTokenAmount","msg":"Position token amount must be 1"},{"code":6021,"name":"InvalidTimestampConversion","msg":"Timestamp should be convertible from i64 to u64"},{"code":6022,"name":"InvalidTimestamp","msg":"Timestamp should be greater than the last updated timestamp"},{"code":6023,"name":"InvalidTickArraySequence","msg":"Invalid tick array sequence provided for instruction."},{"code":6024,"name":"InvalidTokenMintOrder","msg":"Token Mint in wrong order"},{"code":6025,"name":"SetRangeForNonEmptyPosition","msg":"Position is not empty, range can't be set."},{"code":6026,"name":"Unused","msg":"Unused"},{"code":6027,"name":"RewardVaultAmountInsufficient","msg":"Reward vault requires amount to support emissions for at least one day"},{"code":6028,"name":"FeeRateMaxExceeded","msg":"Exceeded max fee rate"},{"code":6029,"name":"ProtocolFeeRateMaxExceeded","msg":"Exceeded max protocol fee rate"},{"code":6030,"name":"MultiplicationShiftRightOverflow","msg":"Multiplication with shift right overflow"},{"code":6031,"name":"MulDivOverflow","msg":"Muldiv overflow"},{"code":6032,"name":"MulDivInvalidInput","msg":"Invalid div_u256 input"},{"code":6033,"name":"MultiplicationOverflow","msg":"Multiplication overflow"},{"code":6034,"name":"InvalidSqrtPriceLimitDirection","msg":"Provided SqrtPriceLimit not in the same direction as the swap."},{"code":6035,"name":"ZeroTradableAmount","msg":"There are no tradable amount to swap."},{"code":6036,"name":"AmountOutBelowMinimum","msg":"Amount out below minimum threshold"},{"code":6037,"name":"AmountInAboveMaximum","msg":"Amount in above maximum threshold"},{"code":6038,"name":"TickArraySequenceInvalidIndex","msg":"Invalid index for tick array sequence"},{"code":6039,"name":"AmountCalcOverflow","msg":"Amount calculated overflows"},{"code":6040,"name":"AmountRemainingOverflow","msg":"Amount remaining overflows"},{"code":6041,"name":"InvalidIntermediaryMint","msg":"Invalid intermediary mint"},{"code":6042,"name":"DuplicateTwoHopPool","msg":"Duplicate two hop pool"},{"code":6043,"name":"InvalidBundleIndex","msg":"Bundle index is out of bounds"},{"code":6044,"name":"BundledPositionAlreadyOpened","msg":"Position has already been opened"},{"code":6045,"name":"BundledPositionAlreadyClosed","msg":"Position has already been closed"},{"code":6046,"name":"PositionBundleNotDeletable","msg":"Unable to delete PositionBundle with open positions"},{"code":6047,"name":"UnsupportedTokenMint","msg":"Token mint has unsupported attributes"},{"code":6048,"name":"RemainingAccountsInvalidSlice","msg":"Invalid remaining accounts"},{"code":6049,"name":"RemainingAccountsInsufficient","msg":"Insufficient remaining accounts"},{"code":6050,"name":"NoExtraAccountsForTransferHook","msg":"Unable to call transfer hook without extra accounts"},{"code":6051,"name":"IntermediateTokenAmountMismatch","msg":"Output and input amount mismatch"},{"code":6052,"name":"TransferFeeCalculationError","msg":"Transfer fee calculation failed"},{"code":6053,"name":"RemainingAccountsDuplicatedAccountsType","msg":"Same accounts type is provided more than once"},{"code":6054,"name":"FullRangeOnlyPool","msg":"This fusion_pool only supports full-range positions"},{"code":6055,"name":"TooManySupplementalTickArrays","msg":"Too many supplemental tick arrays provided"},{"code":6056,"name":"DifferentFusionPoolTickArrayAccount","msg":"TickArray account for different fusion_pool provided"},{"code":6057,"name":"PartialFillError","msg":"Trade resulted in partial fill"},{"code":6058,"name":"TakerOrderNotSupported","msg":"The limit order tick index is incorrect relative to the current market tick (taker order)"},{"code":6059,"name":"LimitOrderAmountExceeded","msg":"Exceeded the limit order deposited input amount"},{"code":6060,"name":"LimitOrderNotEmpty","msg":"Limit order is not empty and cannot be closed"},{"code":6061,"name":"LimitOrderIsFilled","msg":"Unable to increase a limit order because it's partially or fully filled"},{"code":6062,"name":"ZeroAmount","msg":"Zero amount"},{"code":6063,"name":"ResetPriceForNonEmptyPool","msg":"Can't reset the price because the pool is not empty"},{"code":6064,"name":"PositionLocked","msg":"Position locked"},{"code":6065,"name":"PositionNotLockable","msg":"Position is not lockable"},{"code":6066,"name":"RentCalculationError","msg":"Rent calculation error"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"}]}},{"name":"FusionPool","type":{"kind":"struct","fields":[{"name":"bump","type":{"array":["u8",1]}},{"name":"version","type":"u16"},{"name":"token_mint_a","type":"pubkey"},{"name":"token_mint_b","type":"pubkey"},{"name":"token_vault_a","type":"pubkey"},{"name":"token_vault_b","type":"pubkey"},{"name":"tick_spacing","type":"u16"},{"name":"tick_spacing_seed","type":{"array":["u8",2]}},{"name":"fee_rate","type":"u16"},{"name":"protocol_fee_rate","type":"u16"},{"name":"unused_0","type":"u32"},{"name":"liquidity","type":"u128"},{"name":"sqrt_price","type":"u128"},{"name":"tick_current_index","type":"i32"},{"name":"protocol_fee_owed_a","type":"u64"},{"name":"protocol_fee_owed_b","type":"u64"},{"name":"fee_growth_global_a","type":"u128"},{"name":"fee_growth_global_b","type":"u128"},{"name":"orders_total_amount_a","type":"u64"},{"name":"orders_total_amount_b","type":"u64"},{"name":"orders_filled_amount_a","type":"u64"},{"name":"orders_filled_amount_b","type":"u64"},{"name":"olp_fee_owed_a","type":"u64"},{"name":"olp_fee_owed_b","type":"u64"},{"name":"ma_sqrt_price","type":"u128"},{"name":"last_swap_timestamp","type":"u64"},{"name":"reserved","type":{"array":["u8",116]}}]}},{"name":"FusionPoolsConfig","type":{"kind":"struct","fields":[{"name":"version","type":"u16"},{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"token_badge_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"},{"name":"unused_0","type":"u16"},{"name":"unused_1","type":"u16"},{"name":"reserved","type":{"array":["u8",170]}}]}},{"name":"LimitOrder","type":{"kind":"struct","fields":[{"name":"version","type":"u16"},{"name":"fusion_pool","type":"pubkey"},{"name":"limit_order_mint","type":"pubkey"},{"name":"tick_index","type":"i32"},{"name":"amount","type":"u64"},{"name":"a_to_b","type":"bool"},{"name":"age","type":"u64"},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"MaybeTick","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized","fields":[{"defined":{"name":"TickData"}}]}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"version","type":"u16"},{"name":"fusion_pool","type":"pubkey"},{"name":"position_mint","type":"pubkey"},{"name":"liquidity","type":"u128"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"fee_growth_checkpoint_a","type":"u128"},{"name":"fee_owed_a","type":"u64"},{"name":"fee_growth_checkpoint_b","type":"u128"},{"name":"fee_owed_b","type":"u64"},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"PositionBundle","type":{"kind":"struct","fields":[{"name":"position_bundle_mint","type":"pubkey"},{"name":"position_bitmap","type":{"array":["u8",32]}}]}},{"name":"PositionLock","type":{"kind":"struct","fields":[{"name":"position_mint","type":"pubkey"},{"name":"position_owner","type":"pubkey"},{"name":"fusion_pool","type":"pubkey"},{"name":"locked_timestamp","type":"u64"},{"name":"lock_type","type":{"defined":{"name":"PositionLockType"}}},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"PositionLockType","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"TickArray","type":{"kind":"struct","fields":[{"name":"start_tick_index","type":"i32"},{"name":"fusion_pool","type":"pubkey"},{"name":"ticks","type":{"array":[{"defined":{"name":"MaybeTick"}},88]}}]}},{"name":"TickData","type":{"kind":"struct","fields":[{"name":"liquidity_net","type":"i128"},{"name":"liquidity_gross","type":"u128"},{"name":"fee_growth_outside_a","type":"u128"},{"name":"fee_growth_outside_b","type":"u128"},{"name":"age","type":"u64"},{"name":"open_orders_input","type":"u64"},{"name":"part_filled_orders_input","type":"u64"},{"name":"part_filled_orders_remaining_input","type":"u64"},{"name":"fulfilled_a_to_b_orders_input","type":"u64"},{"name":"fulfilled_b_to_a_orders_input","type":"u64"}]}},{"name":"TokenBadge","type":{"kind":"struct","fields":[{"name":"token_mint","type":"pubkey"},{"name":"reserved","type":{"array":["u8",128]}}]}}]} \ No newline at end of file diff --git a/idls/goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json b/idls/goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json new file mode 100644 index 0000000..6eadf43 --- /dev/null +++ b/idls/goosefx_gamma.GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT.json @@ -0,0 +1 @@ +{"address":"GAMMA7meSFWaBXF25oSUgmGRwaW6sCMFLmBNiMSdbHVT","metadata":{"name":"gamma","version":"0.2.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_or_update_actor","discriminator":[113,136,228,230,107,185,128,227],"accounts":[{"name":"owner","docs":["Only admin(multisig) can add or update actor"],"writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"actor","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,99,116,111,114]},{"kind":"account","path":"authority"}]}},{"name":"authority","docs":["Account for which the actor is being created.","This is the account that will be able to update the pool."]}],"args":[{"name":"is_admin","type":"bool"}]},{"name":"add_partner","docs":["Admin-permissioned instruction to add a new partner to a pool","","* `ctx` - The context of accounts",""],"discriminator":[180,111,45,157,241,187,234,88],"accounts":[{"name":"authority","signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true,"relations":["partner"]},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"partner"}],"args":[]},{"name":"calculate_rewards","docs":["Calculate rewards for the user","","* `ctx` - The context of accounts",""],"discriminator":[199,115,201,124,71,81,143,252],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"user","docs":["User for which we are calculating rewards"]},{"name":"pool_state"},{"name":"reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_info.start_at","account":"RewardInfo"},{"kind":"account","path":"reward_info.mint","account":"RewardInfo"}]}},{"name":"user_reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"reward_info"},{"kind":"account","path":"user"}]}},{"name":"user_pool_liquidity","docs":["User pool liquidity account"],"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"user"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"claim_partner_fees","docs":["Claim fees for a particular partner","","* `ctx` - The context of accounts",""],"discriminator":[114,71,103,57,160,205,242,185],"accounts":[{"name":"partner"},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state"},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"token_0_token_account","writable":true,"relations":["partner"]},{"name":"token_1_token_account","writable":true,"relations":["partner"]},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"claim_rewards","docs":["Claim rewards for the user","Transfers the amount of tokens calculated for the user to their reward token account","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[4,144,132,71,116,23,151,80],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state"},{"name":"reward_info","pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_info.start_at","account":"RewardInfo"},{"kind":"account","path":"reward_info.mint","account":"RewardInfo"}]}},{"name":"reward_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,118,97,117,108,116,95,115,101,101,100]},{"kind":"account","path":"reward_info"}]}},{"name":"user_token_account","writable":true},{"name":"user_reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"reward_info"},{"kind":"account","path":"user"}]}},{"name":"reward_mint","writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 fund fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 fund fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"create_amm_config","docs":["The configuation of AMM protocol, include trade fee and protocol fee","# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within tarde fee.","* `fund_fee_rate` - The rate of fund fee within tarde fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"9QcHinaHcJFdzSHeiF1yGchcuQk3qPFNV13q6dZJbAny"},{"name":"amm_config","docs":["Initialize AmmConfig state account to store protocol owner address and fee rates"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"trade_fee_rate","type":"u64"},{"name":"protocol_fee_rate","type":"u64"},{"name":"fund_fee_rate","type":"u64"},{"name":"create_pool_fee","type":"u64"},{"name":"max_open_time","type":"u64"}]},{"name":"create_rewards","docs":["Create rewards for the pool","Initializes a new reward info account and a reward vault account","Transfers the rewards to the reward vault","","# Arguments","","* `ctx` - The context of accounts","* `start_time` - The start time of the reward","* `end_time` - The end time of the reward","* `reward_amount` - The amount of the reward",""],"discriminator":[124,251,145,232,5,173,159,223],"accounts":[{"name":"reward_provider","writable":true,"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state"},{"name":"reward_info","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,105,110,102,111,95,115,101,101,100]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"start_time"},{"kind":"account","path":"reward_mint"}]}},{"name":"reward_providers_token_account","writable":true},{"name":"reward_vault","docs":["For reward to deposit into."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,118,97,117,108,116,95,115,101,101,100]},{"kind":"account","path":"reward_info"}]}},{"name":"reward_mint","writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"start_time","type":"u64"},{"name":"end_time","type":"u64"},{"name":"reward_amount","type":"u64"}]},{"name":"create_swap_referral","docs":["Initialize swap referrals for an existing AMM config","# Arguments","","* `ctx` - The accounts needed by the instruction, including those used by cpi to the referral program","* `name` - The project name, passed to the referral program. Must be less than 50 chars in length","* `default_share_bps` - Percentage share of fees to referrers. Must be less than 10_000"],"discriminator":[67,131,93,236,56,6,40,77],"accounts":[{"name":"admin","docs":["Admin signer for this operation"],"signer":true},{"name":"owner","address":"9QcHinaHcJFdzSHeiF1yGchcuQk3qPFNV13q6dZJbAny"},{"name":"payer","writable":true,"signer":true},{"name":"amm_config","docs":["The config acts as the base for its referral project"],"writable":true},{"name":"project","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"referral_program","address":"REFER4ZgmyYx9c6He5XfaTMiGfdLwRnkV4RPp9t9iF3"}],"args":[{"name":"name","type":"string"},{"name":"default_share_bps","type":"u16"}]},{"name":"deposit","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Pool token amount to transfer. token_a and token_b amount are set by the current exchange rate and size of the pool","* `maximum_token_0_amount` - Maximum token 0 amount to deposit, prevents excessive slippage","* `maximum_token_1_amount` - Maximum token 1 amount to deposit, prevents excessive slippage",""],"discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"owner","docs":["Owner of the liquidity provided"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state the owner is depositing into"],"writable":true},{"name":"user_pool_liquidity","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"owner"}]}},{"name":"token_0_account","docs":["The payer's token account to deposit token_0"],"writable":true},{"name":"token_1_account","docs":["The payer's token account to deposit token_1"],"writable":true},{"name":"token_0_vault","docs":["Pool vault for token_0 to deposit into","The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["Pool vault for token_1 to deposit into","The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"maximum_token_0_amount","type":"u64"},{"name":"maximum_token_1_amount","type":"u64"}]},{"name":"init_user_pool_liquidity","discriminator":[227,221,200,212,36,107,149,36],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"pool_state"},{"name":"user_pool_liquidity","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"user"}]}},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"}],"args":[{"name":"partner","type":{"option":"pubkey"}}]},{"name":"initialize","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `init_amount_0` - the initial amount_0 to deposit","* `init_amount_1` - the initial amount_1 to deposit","* `open_time` - the timestamp allowed for swap","* `max_trade_fee_rate` - The maximum trade fee that can be charged on swaps","* `volatility_factor` - The volatility factor of the pool to determine the trade fee",""],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"creator","docs":["Address paying to create the pool. It can be anyone."],"writable":true,"signer":true},{"name":"amm_config","docs":["Which amm config the pool belongs to"]},{"name":"authority","docs":["sign transactions on behalf of the pool","for vault and lp_mint"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_0_mint"},{"kind":"account","path":"token_1_mint"}]}},{"name":"user_pool_liquidity","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"creator"}]}},{"name":"token_0_mint","docs":["Token_0 mint, the key must smaller than token_1 mint."]},{"name":"token_1_mint","docs":["Token_1 mint, the key must greater than token_0 mint."]},{"name":"creator_token_0","docs":["creator token 0 account"],"writable":true},{"name":"creator_token_1","docs":["creator token 1 account"],"writable":true},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}]}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"8PhehuioLjhJ35A5eavazJSwoXcA4J7WwzgoWDBDFSuY"},{"name":"observation_state","docs":["an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"init_amount_0","type":"u64"},{"name":"init_amount_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"max_trade_fee_rate","type":"u64"},{"name":"volatility_factor","type":"u64"}]},{"name":"initialize_partner","docs":["Creates a new `Partner` account associated with a certain pool","","* `ctx` - The context of accounts","* `name` - The name associated with the partner","* `token_0_token_account` - Token account for receiving token0 tokens","* `token_1_token_account` - Token account for receiving token1 tokens",""],"discriminator":[165,62,179,112,129,50,173,144],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"authority","signer":true},{"name":"pool_state"},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"partner","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"name","type":"string"},{"name":"token_0_token_account","type":"pubkey"},{"name":"token_1_token_account","type":"pubkey"}]},{"name":"initialize_pool_partners","docs":["Initializes a new `PoolPartnerInfos` account unique to a particular pool","","* `ctx` - The context of accounts","* `partner_share_rate` - A fraction representing the partner's share of protocol fees",""],"discriminator":[99,11,108,186,1,126,209,251],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_state"},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"oracle_based_swap_base_input","docs":["Swap the tokens in the pool base input amount, using oracle price and Curve calculator combined.","","# Arguments","","* `ctx`- The context of accounts","* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate","* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage",""],"discriminator":[239,82,192,187,160,26,223,223],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"pool_config_update","discriminator":[196,212,99,63,59,117,248,223],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"amm_config"}],"args":[{"name":"h1","type":"u128"}]},{"name":"pool_config_update_v2","discriminator":[228,161,199,222,53,172,121,238],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"amm_config"}],"args":[{"name":"h1","type":"u128"},{"name":"price_fetched_at","type":"u64"}]},{"name":"pool_config_update_v3","discriminator":[123,135,23,15,174,100,120,152],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"amm_config"},{"name":"observation_state","writable":true},{"name":"actor","pda":{"seeds":[{"kind":"const","value":[97,99,116,111,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"h1","type":"u128"},{"name":"h2","type":"u128"},{"name":"price_fetched_at","type":"u64"},{"name":"min_trade_rate_at_oracle_price","type":{"option":"u32"}},{"name":"oracle_price_delay_fee_rate_per_second","type":{"option":"u32"}},{"name":"max_oracle_price_delay_fee","type":{"option":"u32"}},{"name":"drift_factor","type":{"option":"u32"}},{"name":"max_drift_factor","type":{"option":"u32"}},{"name":"volatility_factor","type":{"option":"u64"}}]},{"name":"rebalance_kamino","docs":["Migrate from Meteora Dlmm to Gamma"],"discriminator":[153,94,34,16,92,181,147,215],"accounts":[{"name":"signer","writable":true,"signer":true},{"name":"gamma_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"token_vault","docs":["The vault token account for token 0"],"writable":true},{"name":"token_mint","writable":true},{"name":"kamino_reserve","writable":true},{"name":"kamino_lending_market","writable":true,"address":"7u3HeHxYDLhnCoErrtycNokbQYbWGzLs6JSDqGAv5PfF"},{"name":"lending_market_authority"},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","writable":true},{"name":"gamma_pool_destination_collateral","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,107,97,109,105,110,111,95,100,101,112,111,115,105,116,115]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint"}]}},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"},{"name":"liquidity_token_program"},{"name":"collateral_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"swap_base_input","docs":["Swap the tokens in the pool base input amount","","# Arguments","","* `ctx`- The context of accounts","* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate","* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage",""],"discriminator":[143,190,90,218,196,30,51,222],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_base_output","docs":["Swap the tokens in the pool base output amount","","# Arguments","","* `ctx`- The context of accounts","* `max_amount_in` - input amount prevents excessive slippage","* `amount_out` - amount of output token",""],"discriminator":[55,217,98,86,163,74,180,173],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"_max_amount_in","type":"u64"},{"name":"_amount_out","type":"u64"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The vaule can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"9QcHinaHcJFdzSHeiF1yGchcuQk3qPFNV13q6dZJbAny"},{"name":"amm_config","docs":["The amm config account to update"],"writable":true}],"args":[{"name":"param","type":"u16"},{"name":"value","type":"u64"}]},{"name":"update_partner","docs":["Authority-permissioned instruction to update certain fields in a pool, e.g token-accounts","","* `ctx` - The context of accounts","* `token_account_0` - (optional) update for the token_0_token_account field","* `token_account_1` - (optional) update for the token_1_token_account field",""],"discriminator":[19,112,236,81,127,55,21,196],"accounts":[{"name":"authority","signer":true,"relations":["partner"]},{"name":"partner","writable":true}],"args":[{"name":"token_account_0","type":{"option":"pubkey"}},{"name":"token_account_1","type":{"option":"pubkey"}}]},{"name":"update_partner_fees","docs":["Updates claimable fee amounts for all `PartnerInfo`s in a `PoolPartnerInfos` account","","* `ctx` - The context of accounts",""],"discriminator":[154,142,122,49,239,161,232,29],"accounts":[{"name":"pool_state","writable":true},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}}],"args":[]},{"name":"update_pool","docs":["Update pool status for given vaule","","# Arguments","","* `ctx`- The context of accounts","* `param`- The param of pool status","* `status` - The value",""],"discriminator":[239,214,170,78,36,35,30,34],"accounts":[{"name":"authority","signer":true},{"name":"pool_state","writable":true},{"name":"actor","pda":{"seeds":[{"kind":"const","value":[97,99,116,111,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"param","type":"u32"},{"name":"value","type":"u64"}]},{"name":"withdraw","docs":["Withdraw lp for token0 ande token1","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Amount of pool tokens to burn. User receives an output of token a and b based on the percentage of the pool tokens that are returned.","* `minimum_token_0_amount` - Minimum amount of token 0 to receive, prevents excessive slippage","* `minimum_token_1_amount` - Minimum amount of token 1 to receive, prevents excessive slippage",""],"discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"owner","docs":["Owner of the liquidity provided"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state account"],"writable":true},{"name":"user_pool_liquidity","docs":["User pool liquidity account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,45,112,111,111,108,45,108,105,113,117,105,100,105,116,121]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"owner"}]}},{"name":"token_0_account","docs":["The owner's token account for receive token_0"],"writable":true},{"name":"token_1_account","docs":["The owner's token account for receive token_1"],"writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"],"writable":true},{"name":"vault_1_mint","docs":["The mint of token_1 vault"],"writable":true},{"name":"pool_partners","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,105,110,102,111,115]},{"kind":"account","path":"pool_state"}]}},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"minimum_token_0_amount","type":"u64"},{"name":"minimum_token_1_amount","type":"u64"}]}],"accounts":[{"name":"Actor","discriminator":[46,77,47,204,204,54,34,88]},{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"Partner","discriminator":[122,43,246,239,141,56,243,182]},{"name":"PoolPartnerInfos","discriminator":[130,98,226,231,158,49,44,231]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"RewardInfo","discriminator":[39,7,129,22,241,96,83,133]},{"name":"UserPoolLiquidity","discriminator":[0,141,89,29,236,6,14,15]},{"name":"UserRewardInfo","discriminator":[110,57,251,139,250,236,213,178]}],"types":[{"name":"Actor","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"is_admin","type":"bool"}]}},{"name":"AmmConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"disable_create_pool","type":"bool"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of bip (10^-6)"],"type":"u64"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u64"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of bip (10^-6)"],"type":"u64"},{"name":"create_pool_fee","docs":["Fee for creating a new pool"],"type":"u64"},{"name":"protocol_owner","docs":["Address of the protocol fee owner"],"type":"pubkey"},{"name":"fund_owner","docs":["Address of the fund fee owner"],"type":"pubkey"},{"name":"referral_project","docs":["Address of the referral project"],"type":"pubkey"},{"name":"max_open_time","docs":["Max open time for a pool in seconds"],"type":"u64"},{"name":"secondary_admin","type":"pubkey"},{"name":"padding","docs":["padding"],"type":{"array":["u64",7]}}]}},{"name":"LpChangeEvent","docs":["Emitted when deposit or withdraw"],"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"lp_amount_before","type":"u64"},{"name":"token_0_vault_before","type":"u64"},{"name":"token_1_vault_before","type":"u64"},{"name":"token_0_amount","type":"u64"},{"name":"token_1_amount","type":"u64"},{"name":"token_0_transfer_fee","type":"u64"},{"name":"token_1_transfer_fee","type":"u64"},{"name":"change_type","type":"u8"}]}},{"name":"MigrationEvent","docs":["Emitted when migration"],"type":{"kind":"struct","fields":[{"name":"from_pool","type":"pubkey"},{"name":"to_pool","type":"pubkey"},{"name":"token_0_amount_withdrawn","type":"u64"},{"name":"token_1_amount_withdrawn","type":"u64"},{"name":"lp_tokens_migrated","type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u64"},{"name":"cumulative_token_0_price_x32","docs":["The cumulative of token0 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"},{"name":"cumulative_token_1_price_x32","docs":["The cumulative of token1 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is enabled"],"type":"bool"},{"name":"observation_index","docs":["The most recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding"],"type":{"array":["u64",4]}}]}},{"name":"Partner","docs":["Account storing information for a protocol participating in the Gamma partner program"],"type":{"kind":"struct","fields":[{"name":"name","docs":["Protocol name"],"type":"string"},{"name":"authority","docs":["The authority for this account"],"type":"pubkey"},{"name":"pool_state","docs":["The pool which this partner account belongs to"],"type":"pubkey"},{"name":"token_0_token_account","docs":["The token-account that receives token0 tokens"],"type":"pubkey"},{"name":"token_1_token_account","docs":["The token-account that receives token1 tokens"],"type":"pubkey"}]}},{"name":"PartnerInfo","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"partner","docs":["The address of the partner account."],"type":"pubkey"},{"name":"lp_token_linked_with_partner","docs":["This stores the LP tokens that are linked with the partner, i.e owned by customers of the partner."],"type":"u64"},{"name":"total_claimed_fee_amount_token_0","docs":["The total fee-amount token0 claimed by the partner"],"type":"u64"},{"name":"total_claimed_fee_amount_token_1","docs":["The total fee-amount token1 claimed by the partner"],"type":"u64"},{"name":"total_earned_fee_amount_token_0","docs":["The total fee-amount token0 calculated for the partner"],"type":"u64"},{"name":"total_earned_fee_amount_token_1","docs":["The total fee-amount token1 calculated for the partner"],"type":"u64"}]}},{"name":"PoolPartnerInfos","docs":["PDA storing all the information for valid pool partners"],"serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"last_observed_fee_amount_token_0","docs":["The observed fee-amount token0 as at the last infos update"],"type":"u64"},{"name":"last_observed_fee_amount_token_1","docs":["The observed fee-amount token1 as at the last infos update"],"type":"u64"},{"name":"infos","docs":["Partner infos"],"type":{"array":[{"defined":{"name":"PartnerInfo"}},5]}}]}},{"name":"PoolState","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"amm_config","docs":["To which AmmConfig the pool belongs to"],"type":"pubkey"},{"name":"pool_creator","docs":["Pool Creator"],"type":"pubkey"},{"name":"token_0_vault","docs":["Vault to store Token A of the pool"],"type":"pubkey"},{"name":"token_1_vault","docs":["Vault to store Token B of the pool"],"type":"pubkey"},{"name":"h1","docs":["Scaled to 9 decimal places.","This means `token1/token0`"],"type":"u128"},{"name":"h2","type":"u64"},{"name":"h3","type":"u32"},{"name":"h4","type":"u32"},{"name":"token_0_mint","docs":["Mint info of Token A"],"type":"pubkey"},{"name":"token_1_mint","docs":["Mint info of Token B"],"type":"pubkey"},{"name":"token_0_program","docs":["token_0 program"],"type":"pubkey"},{"name":"token_1_program","docs":["token_1_program"],"type":"pubkey"},{"name":"observation_key","docs":["Observation account to store the oracle data"],"type":"pubkey"},{"name":"auth_bump","type":"u8"},{"name":"status","docs":["Bitwise represenation of the state of the pool","Bit0: 1 - Disable Deposit(value will be 1), 0 - Deposit can be done(normal)","Bit1: 1 - Disable Withdraw(value will be 2), 0 - Withdraw can be done(normal)","Bit2: 1 - Disable Swap(value will be 4), 0 - Swap can be done(normal)"],"type":"u8"},{"name":"_padding2","docs":["lp_mint decimals"],"type":"u8"},{"name":"mint_0_decimals","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_1_decimals","type":"u8"},{"name":"lp_supply","docs":["True circulating supply of lp_mint tokens without burns and lock-ups"],"type":"u64"},{"name":"protocol_fees_token_0","docs":["The amount of token_0 and token_1 owed to Liquidity Provider"],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","docs":["The timestamp allowed for swap in the pool"],"type":"u64"},{"name":"recent_epoch","docs":["recent epoch"],"type":"u64"},{"name":"cumulative_trade_fees_token_0","docs":["Trade fees of token_0 after every swap"],"type":"u128"},{"name":"cumulative_trade_fees_token_1","docs":["Trade fees of token_1 after every swap"],"type":"u128"},{"name":"cumulative_volume_token_0","docs":["Cummulative volume of token_0"],"type":"u128"},{"name":"cumulative_volume_token_1","docs":["Cummulative volume of token_1"],"type":"u128"},{"name":"latest_dynamic_fee_rate","docs":["latest dynamic fee rate"],"type":"u64"},{"name":"max_trade_fee_rate","type":"u64"},{"name":"volatility_factor","type":"u64"},{"name":"token_0_vault_amount","type":"u64"},{"name":"token_1_vault_amount","type":"u64"},{"name":"max_shared_token0","type":"u64"},{"name":"max_shared_token1","type":"u64"},{"name":"h16","type":"u32"},{"name":"h15","type":"u32"},{"name":"h14","type":"u32"},{"name":"h13","type":"u32"},{"name":"h12","type":"u32"},{"name":"h10","type":"u32"},{"name":"_padding3","type":{"array":["u8",8]}},{"name":"token_0_amount_in_kamino","type":"u64"},{"name":"token_1_amount_in_kamino","type":"u64"},{"name":"withdrawn_kamino_profit_token_0","type":"u64"},{"name":"withdrawn_kamino_profit_token_1","type":"u64"},{"name":"partner_share_rate","docs":["Fraction of protocol tokens shared with partners. Denominator is 1_000_000"],"type":"u64"},{"name":"partner_protocol_fees_token_0","docs":["amount of protocol fees owed to referral partners(token0)"],"type":"u64"},{"name":"partner_protocol_fees_token_1","docs":["amount of protocol fees owed to referral partners(token1)"],"type":"u64"},{"name":"min_swap_at_spot_price","docs":["We later in future want to allow any LP to come and create a Pool of sol-usdc, where they can configure all the params.","They also might want to define a max and min price for swaps, until which they want to allow swaps.","This can be thought of similar to the ranges in CLMM.","{token1/token0} with 9 Decimals"],"type":"u64"},{"name":"max_swap_at_spot_price","type":"u64"},{"name":"h20","type":"u128"},{"name":"padding","docs":["padding"],"type":{"array":["u64",1]}}]}},{"name":"RewardInfo","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"start_at","type":"u64"},{"name":"end_rewards_at","type":"u64"},{"name":"mint","type":"pubkey"},{"name":"total_to_disburse","type":"u64"},{"name":"rewarded_by","type":"pubkey"},{"name":"amount_disbursed","type":"u64"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"input_vault_before","docs":["pool vault - trade_fees"],"type":"u64"},{"name":"output_vault_before","docs":["pool_vault - trade_fees"],"type":"u64"},{"name":"input_amount","docs":["calculate result without transfer fees"],"type":"u64"},{"name":"output_amount","docs":["calculate result without transfer fees"],"type":"u64"},{"name":"input_mint","docs":["input mint for the swap"],"type":"pubkey"},{"name":"output_mint","docs":["output mint for the swap"],"type":"pubkey"},{"name":"input_transfer_fee","docs":["transfer fees on input token using token extensions"],"type":"u64"},{"name":"output_transfer_fee","docs":["transfer fees on output token using token extensions"],"type":"u64"},{"name":"base_input","type":"bool"},{"name":"dynamic_fee","docs":["dynamic_fees after this swap"],"type":"u128"}]}},{"name":"UserPoolLiquidity","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"pool_state","type":"pubkey"},{"name":"token_0_deposited","type":"u128"},{"name":"token_1_deposited","type":"u128"},{"name":"token_0_withdrawn","type":"u128"},{"name":"token_1_withdrawn","type":"u128"},{"name":"lp_tokens_owned","type":"u128"},{"name":"_p1","type":"u64"},{"name":"_p2","type":"u8"},{"name":"first_investment_at","type":"u64"},{"name":"partner","type":{"option":"pubkey"}},{"name":"padding","type":{"array":["u8",15]}}]}},{"name":"UserRewardInfo","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"reward_info","type":"pubkey"},{"name":"pool_state","type":"pubkey"},{"name":"total_claimed","type":"u64"},{"name":"total_rewards","type":"u64"},{"name":"rewards_last_calculated_at","type":"u64"}]}}]} \ No newline at end of file diff --git a/idls/goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json b/idls/goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json new file mode 100644 index 0000000..da5ac1e --- /dev/null +++ b/idls/goosefx_v2.GFXsSL5sSaDfNFQUYsHekbWBW1TsFdjDYzACh62tEHxn.json @@ -0,0 +1 @@ +{"version":"0.3.0","name":"gfx_ssl_v2","instructions":[{"name":"crankPriceHistories","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false}],"args":[]},{"name":"internalSwap","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false},{"name":"pair","isMut":true,"isSigner":false},{"name":"sslAMainToken","isMut":true,"isSigner":false},{"name":"sslBMainToken","isMut":true,"isSigner":false},{"name":"sslASecondaryToken","isMut":true,"isSigner":false},{"name":"sslBSecondaryToken","isMut":true,"isSigner":false},{"name":"tokenAPriceHistory","isMut":true,"isSigner":false},{"name":"tokenAOracle","isMut":false,"isSigner":false},{"name":"tokenBPriceHistory","isMut":true,"isSigner":false},{"name":"tokenBOracle","isMut":false,"isSigner":false},{"name":"sslPoolASigner","isMut":false,"isSigner":false},{"name":"sslPoolBSigner","isMut":false,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"claimFees","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"sslFeeVault","isMut":true,"isSigner":false},{"name":"ownerAta","isMut":true,"isSigner":false},{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createLiquidityAccount","accounts":[{"name":"poolRegistry","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"closeLiquidityAccount","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"rentRecipient","isMut":true,"isSigner":false},{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"deposit","accounts":[{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userAta","isMut":true,"isSigner":false},{"name":"sslPoolSigner","isMut":false,"isSigner":false},{"name":"poolVault","isMut":true,"isSigner":false},{"name":"sslFeeVault","isMut":true,"isSigner":false},{"name":"poolRegistry","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"liquidityAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userAta","isMut":true,"isSigner":false},{"name":"sslPoolSigner","isMut":false,"isSigner":false},{"name":"poolVault","isMut":true,"isSigner":false},{"name":"sslFeeVault","isMut":true,"isSigner":false},{"name":"poolRegistry","isMut":true,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"swap","accounts":[{"name":"pair","isMut":true,"isSigner":false},{"name":"poolRegistry","isMut":true,"isSigner":false},{"name":"userWallet","isMut":false,"isSigner":false},{"name":"userWallet","isMut":false,"isSigner":true},{"name":"sslPoolInSigner","isMut":false,"isSigner":false},{"name":"sslPoolOutSigner","isMut":false,"isSigner":false},{"name":"userAtaIn","isMut":true,"isSigner":false},{"name":"userAtaOut","isMut":true,"isSigner":false},{"name":"sslOutMainVault","isMut":true,"isSigner":false},{"name":"sslOutSecondaryVault","isMut":true,"isSigner":false},{"name":"sslInMainVault","isMut":true,"isSigner":false},{"name":"sslInSecondaryVault","isMut":true,"isSigner":false},{"name":"sslOutFeeVault","isMut":true,"isSigner":false},{"name":"sslOutFeeDestination","isMut":true,"isSigner":false},{"name":"outputTokenPriceHistory","isMut":true,"isSigner":false},{"name":"outputTokenOracle","isMut":false,"isSigner":false},{"name":"inputTokenPriceHistory","isMut":true,"isSigner":false},{"name":"inputTokenOracle","isMut":false,"isSigner":false},{"name":"eventEmitter","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amountIn","type":"u64"},{"name":"minOut","type":"u64"}]}],"accounts":[{"name":"EventEmitter","type":{"kind":"struct","fields":[{"name":"eventId","type":"i64"}]}},{"name":"LiquidityAccount","type":{"kind":"struct","fields":[{"name":"poolRegistry","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"amountDeposited","type":"u64"},{"name":"lastObservedTap","type":"u64"},{"name":"lastClaimed","type":"i64"},{"name":"totalEarned","type":"u64"},{"name":"createdAt","type":"i64"},{"name":"lastDepositAt","type":"u64"},{"name":"lastObsRewardsPerShare","type":{"array":["u8",16]}},{"name":"space","type":{"array":["u8",104]}}]}},{"name":"HistoricalDecimal","type":{"kind":"struct","fields":[{"name":"num","type":"i64"},{"name":"scale","type":"u32"},{"name":"pad0","type":{"array":["u8",4]}}]}},{"name":"HistoricalPrice","type":{"kind":"struct","fields":[{"name":"price","type":{"defined":"HistoricalDecimal"}},{"name":"slot","type":"u64"}]}},{"name":"OraclePriceHistory","type":{"kind":"struct","fields":[{"name":"oracleType","type":"u8"},{"name":"minimumElapsedSlots","type":"u8"},{"name":"maxSlotPriceStaleness","type":"u8"},{"name":"backupOracleType","type":"u8"},{"name":"backupOracle2Type","type":"u8"},{"name":"pad0","type":{"array":["u8",3]}},{"name":"poolRegistry","type":"publicKey"},{"name":"oracleAddress","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"numUpdates","type":"u64"},{"name":"backupOracle","type":"publicKey"},{"name":"latestBackupOraclePrice","type":{"defined":"HistoricalPrice"}},{"name":"backupOracle2","type":"publicKey"},{"name":"latestBackupOracle2Price","type":{"defined":"HistoricalPrice"}},{"name":"space","type":{"array":["u8",16]}},{"name":"priceHistory","type":{"array":[{"defined":"HistoricalPrice"},256]}}]}},{"name":"Pair","type":{"kind":"struct","fields":[{"name":"poolRegistry","type":"publicKey"},{"name":"mints","type":{"defined":"(Pubkey,Pubkey)"}},{"name":"feeCollector","type":{"defined":"(Pubkey,Pubkey)"}},{"name":"normalRouteFeeRates","type":{"defined":"(u16,u16)"}},{"name":"totalFeesGeneratedNative","type":{"defined":"([u8;16],[u8;16])"}},{"name":"totalHistoricalVolume","type":{"array":["u8",16]}},{"name":"totalInternallySwapped","type":{"defined":"([u8;16],[u8;16])"}},{"name":"preferredRouteFeeRates","type":{"defined":"(u16,u16)"}},{"name":"space","type":{"array":["u8",124]}}]}},{"name":"SSLPool","type":{"kind":"struct","fields":[{"name":"status","type":"u8"},{"name":"assetType","type":"u8"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"mint","type":"publicKey"},{"name":"mintDecimals","type":"u8"},{"name":"bump","type":"u8"},{"name":"pad1","type":{"array":["u8",6]}},{"name":"totalAccumulatedLpReward","type":"u64"},{"name":"totalLiquidityDeposits","type":"u64"},{"name":"oraclePriceHistories","type":{"array":["publicKey",3]}},{"name":"mathParams","type":{"defined":"SSLMathParams"}},{"name":"rewardsPerShare","type":{"array":["u8",16]}},{"name":"space","type":{"array":["u8",48]}}]}},{"name":"PoolRegistry","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"seed","type":"publicKey"},{"name":"suspendAdmin","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"pricingAlgo","type":"u8"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"numEntries","type":"u32"},{"name":"pad1","type":{"array":["u8",4]}},{"name":"categoricalPoolTokenRatios","type":{"array":["u16",16]}},{"name":"space","type":{"array":["u8",96]}},{"name":"entries","type":{"array":[{"defined":"SSLPool"},32]}}]}}],"types":[{"name":"ConfigPairParams","type":{"kind":"struct","fields":[{"name":"mintOneNormalRouteFeeRate","type":{"option":"u16"}},{"name":"mintTwoNormalRouteFeeRate","type":{"option":"u16"}},{"name":"mintOnePreferredRouteFeeRate","type":{"option":"u16"}},{"name":"mintTwoPreferredRouteFeeRate","type":{"option":"u16"}}]}},{"name":"SSLMathConfig","type":{"kind":"struct","fields":[{"name":"meanWindow","type":{"option":"u8"}},{"name":"stdWindow","type":{"option":"u8"}},{"name":"fixedPriceDistance","type":{"option":"u16"}},{"name":"minimumPriceDistance","type":{"option":"u16"}},{"name":"stdWeight","type":{"option":"u32"}},{"name":"latestPriceWeight","type":{"option":"u16"}},{"name":"checkPriceGapCount","type":{"option":"u16"}}]}},{"name":"SSLMathParams","type":{"kind":"struct","fields":[{"name":"meanWindow","type":"u8"},{"name":"stdWindow","type":"u8"},{"name":"fixedPriceDistance","type":"u16"},{"name":"minimumPriceDistance","type":"u16"},{"name":"deprecated0","type":"u16"},{"name":"latestPriceWeight","type":"u16"},{"name":"checkPriceGapCount","type":"u16"},{"name":"pad0","type":{"array":["u8",4]}},{"name":"stdWeight","type":"u32"},{"name":"pad1","type":{"array":["u8",4]}},{"name":"space","type":{"array":["u8",32]}}]}},{"name":"MaxPoolTokenRatio","type":{"kind":"struct","fields":[{"name":"inputToken","type":{"defined":"AssetType"}},{"name":"outputToken","type":{"defined":"AssetType"}},{"name":"poolTokenRatio","type":"u16"}]}},{"name":"PoolRegistryConfig","type":{"kind":"struct","fields":[{"name":"newAdmin","type":{"option":"publicKey"}},{"name":"newSuspendAdmin","type":{"option":"publicKey"}},{"name":"maxPoolTokenRatios","type":{"vec":{"defined":"MaxPoolTokenRatio"}}},{"name":"pricingAlgo","type":{"option":{"defined":"PricingAlgo"}}}]}},{"name":"OracleType","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Pyth"},{"name":"Switchboardv2"},{"name":"Invalid"}]}},{"name":"AssetType","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"BlueChip"},{"name":"Volatile"},{"name":"Stable"},{"name":"Invalid"}]}},{"name":"ConfigSSLPoolStatus","type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Suspended"},{"name":"Locked"}]}},{"name":"PricingAlgo","type":{"kind":"enum","variants":[{"name":"Version1"},{"name":"Version2"},{"name":"Version3"},{"name":"Invalid"}]}},{"name":"SSLPoolStatus","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Active"},{"name":"Suspended"},{"name":"Locked"},{"name":"Invalid"}]}}]} \ No newline at end of file diff --git a/idls/guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json b/idls/guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json new file mode 100644 index 0000000..4f0b79b --- /dev/null +++ b/idls/guacswap.Gswppe6ERWKpUTXvRPfXdzHhiCyJvLadVvXGfdpBqcE1.json @@ -0,0 +1 @@ +{"version":"0.1.1","name":"guacswap","instructions":[{"name":"createPool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":true},{"name":"poolYAccount","isMut":true,"isSigner":true},{"name":"adminXAccount","isMut":true,"isSigner":false},{"name":"adminYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"projectOwner","isMut":false,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"initialTokenX","type":{"defined":"Token"}},{"name":"initialTokenY","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createProvider","accounts":[{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"tokenXAmount","type":{"defined":"Token"}},{"name":"tokenYAmount","type":{"defined":"Token"}},{"name":"bump","type":"u8"}]},{"name":"createState","accounts":[{"name":"state","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"addTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"deltaX","type":{"defined":"Token"}},{"name":"deltaY","type":{"defined":"Token"}}]},{"name":"withdrawBuyback","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"swap","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"swapperXAccount","isMut":true,"isSigner":false},{"name":"swapperYAccount","isMut":true,"isSigner":false},{"name":"swapper","isMut":true,"isSigner":true},{"name":"referrerXAccount","isMut":true,"isSigner":false},{"name":"referrerYAccount","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"deltaIn","type":{"defined":"Token"}},{"name":"priceLimit","type":{"defined":"FixedPoint"}},{"name":"xToY","type":"bool"}]},{"name":"withdrawShares","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"shares","type":{"defined":"Token"}}]},{"name":"withdrawLpFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"ownerXAccount","isMut":true,"isSigner":false},{"name":"ownerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawProjectFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"projectOwnerXAccount","isMut":true,"isSigner":false},{"name":"projectOwnerYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"projectOwner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supply","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createDualFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"createTripleFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_x"},{"kind":"account","type":"publicKey","account":"Mint","path":"token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"tokenProjectFirst","isMut":false,"isSigner":false},{"name":"tokenProjectSecond","isMut":false,"isSigner":false},{"name":"tokenMarcoAccount","isMut":true,"isSigner":true},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":true},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":true},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"},{"name":"bump","type":"u8"}]},{"name":"withdrawRewards","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","path":"owner"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"owner","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"closePool","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"buybackXAccount","isMut":true,"isSigner":false},{"name":"buybackYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawMercantiFee","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"mercantiXAccount","isMut":true,"isSigner":false},{"name":"mercantiYAccount","isMut":true,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"addSupply","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"supplyMarco","type":{"defined":"Token"}},{"name":"supplyProjectFirst","type":{"defined":"Token"}},{"name":"supplyProjectSecond","type":{"defined":"Token"}},{"name":"duration","type":"u64"}]},{"name":"updateFees","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false}],"args":[{"name":"newBuybackFee","type":{"defined":"FixedPoint"}},{"name":"newProjectFee","type":{"defined":"FixedPoint"}},{"name":"newProviderFee","type":{"defined":"FixedPoint"}},{"name":"newMercantiFee","type":{"defined":"FixedPoint"}}]},{"name":"resetFarm","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"adminMarcoAccount","isMut":true,"isSigner":false},{"name":"adminProjectFirstAccount","isMut":true,"isSigner":false},{"name":"adminProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateRewardTokens","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"tokenMarco","isMut":false,"isSigner":false},{"name":"newTokenMarcoAccount","isMut":true,"isSigner":true},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"forceWithdrawRewards","accounts":[{"name":"state","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapstatev1"}]}},{"name":"pool","isMut":false,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswappoolv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_x"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool.token_y"}]}},{"name":"farm","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapfarmv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"}]}},{"name":"provider","isMut":true,"isSigner":false,"pda":{"seeds":[{"kind":"const","type":"string","value":"guacswapproviderv1"},{"kind":"account","type":"publicKey","account":"Pool","path":"pool"},{"kind":"account","type":"publicKey","account":"Provider","path":"provider.owner"}]}},{"name":"tokenMarcoAccount","isMut":true,"isSigner":false},{"name":"tokenProjectFirstAccount","isMut":true,"isSigner":false},{"name":"tokenProjectSecondAccount","isMut":true,"isSigner":false},{"name":"ownerMarcoAccount","isMut":true,"isSigner":false},{"name":"ownerProjectFirstAccount","isMut":true,"isSigner":false},{"name":"ownerProjectSecondAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Farm","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"tokens","type":{"array":["publicKey",3]}},{"name":"tokenAccounts","type":{"array":["publicKey",3]}},{"name":"supply","type":{"array":[{"defined":"Token"},3]}},{"name":"supplyLeft","type":{"array":[{"defined":"Token"},3]}},{"name":"accumulatedSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"offsetSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"startTime","type":"u64"},{"name":"endTime","type":"u64"},{"name":"lastUpdate","type":"u64"},{"name":"bump","type":"u8"},{"name":"farmType","type":{"defined":"FarmType"}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"poolXAccount","type":"publicKey"},{"name":"poolYAccount","type":"publicKey"},{"name":"admin","type":"publicKey"},{"name":"projectOwner","type":"publicKey"},{"name":"tokenXReserve","type":{"defined":"Token"}},{"name":"tokenYReserve","type":{"defined":"Token"}},{"name":"selfShares","type":{"defined":"Token"}},{"name":"allShares","type":{"defined":"Token"}},{"name":"buybackAmountX","type":{"defined":"Token"}},{"name":"buybackAmountY","type":{"defined":"Token"}},{"name":"projectAmountX","type":{"defined":"Token"}},{"name":"projectAmountY","type":{"defined":"Token"}},{"name":"mercantiAmountX","type":{"defined":"Token"}},{"name":"mercantiAmountY","type":{"defined":"Token"}},{"name":"lpAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lpAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"constK","type":{"defined":"Product"}},{"name":"price","type":{"defined":"FixedPoint"}},{"name":"lpFee","type":{"defined":"FixedPoint"}},{"name":"buybackFee","type":{"defined":"FixedPoint"}},{"name":"projectFee","type":{"defined":"FixedPoint"}},{"name":"mercantiFee","type":{"defined":"FixedPoint"}},{"name":"farmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"Provider","type":{"kind":"struct","fields":[{"name":"tokenX","type":"publicKey"},{"name":"tokenY","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"shares","type":{"defined":"Token"}},{"name":"lastFeeAccumulatorX","type":{"defined":"FixedPoint"}},{"name":"lastFeeAccumulatorY","type":{"defined":"FixedPoint"}},{"name":"lastSecondsPerShare","type":{"defined":"FixedPoint"}},{"name":"lastWithdrawTime","type":"u64"},{"name":"tokensOwedX","type":{"defined":"Token"}},{"name":"tokensOwedY","type":{"defined":"Token"}},{"name":"currentFarmCount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"programAuthority","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"nonce","type":"u8"}]}}],"types":[{"name":"FixedPoint","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"Token","type":{"kind":"struct","fields":[{"name":"v","type":"u64"}]}},{"name":"Product","type":{"kind":"struct","fields":[{"name":"v","type":"u128"}]}},{"name":"FarmType","type":{"kind":"enum","variants":[{"name":"Single"},{"name":"Dual"},{"name":"Triple"}]}}],"errors":[{"code":6000,"name":"DeltaTooBig","msg":"Delta greater than provider's tokens"},{"code":6001,"name":"TokenUnderflow","msg":"Token amount underflow"},{"code":6002,"name":"WrongRatio","msg":"Wrong tokens ratio"},{"code":6003,"name":"TooMuchShares","msg":"Too much shares provided"},{"code":6004,"name":"SwapToBig","msg":"Swap too big"},{"code":6005,"name":"FeeExceeded","msg":"Fee exceeded 100%"},{"code":6007,"name":"ScalesNotEqual","msg":"Scales have to be equal"},{"code":6008,"name":"FeeExceededDeltaOut","msg":"Fees exceeded delta_out"},{"code":6009,"name":"PriceLimitExceeded","msg":"Price limit exceeded"},{"code":6010,"name":"MintMismatch","msg":"Mint mismatch"},{"code":6011,"name":"TokensAreTheSame","msg":"Tokens are the same"},{"code":6012,"name":"WrongFarm","msg":"Cannot add supply to wrong farm"},{"code":6013,"name":"RewardsExceedingSupply","msg":"Cannot withdraw rewards exceeding supply left"},{"code":6014,"name":"FarmNotEnded","msg":"Farm has not ended, cannot add additional rewards"},{"code":6015,"name":"ZeroAmount","msg":"Must provide a nonzero amount"},{"code":6016,"name":"InvariantDecreased","msg":"Invariant has changed"}]} \ No newline at end of file diff --git a/idls/helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json b/idls/helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json new file mode 100644 index 0000000..ce12606 --- /dev/null +++ b/idls/helium_treasury_management.treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5.json @@ -0,0 +1 @@ +{"address":"treaf4wWBBty3fHdyBpo35Mz84M8k3heKXmjmi9vFt5","metadata":{"name":"treasury_management","version":"0.2.3","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"initialize_treasury_management_v0","discriminator":[149,3,201,108,130,56,56,210],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"treasury_management","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,114,101,97,115,117,114,121,95,109,97,110,97,103,101,109,101,110,116]},{"kind":"account","path":"supply_mint"}]}},{"name":"treasury_mint"},{"name":"supply_mint"},{"name":"mint_authority","signer":true},{"name":"circuit_breaker","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,99,99,111,117,110,116,95,119,105,110,100,111,119,101,100,95,98,114,101,97,107,101,114]},{"kind":"account","path":"treasury"}],"program":{"kind":"account","path":"circuit_breaker_program"}}},{"name":"treasury","writable":true,"pda":{"seeds":[{"kind":"account","path":"treasury_management"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"treasury_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"circuit_breaker_program","address":"circAbx64bbsscPbQzZAUvuXpHqrCe6fLMzc2uKXz9g"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"args","type":{"defined":{"name":"InitializeTreasuryManagementArgsV0"}}}]},{"name":"redeem_v0","discriminator":[235,127,171,139,119,77,235,118],"accounts":[{"name":"treasury_management","pda":{"seeds":[{"kind":"const","value":[116,114,101,97,115,117,114,121,95,109,97,110,97,103,101,109,101,110,116]},{"kind":"account","path":"supply_mint"}]}},{"name":"treasury_mint","relations":["treasury_management"]},{"name":"supply_mint","writable":true,"relations":["treasury_management"]},{"name":"treasury","writable":true,"relations":["treasury_management"]},{"name":"circuit_breaker","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,99,99,111,117,110,116,95,119,105,110,100,111,119,101,100,95,98,114,101,97,107,101,114]},{"kind":"account","path":"treasury"}],"program":{"kind":"account","path":"circuit_breaker_program"}}},{"name":"from","writable":true},{"name":"to","writable":true},{"name":"owner","signer":true,"relations":["from"]},{"name":"circuit_breaker_program","address":"circAbx64bbsscPbQzZAUvuXpHqrCe6fLMzc2uKXz9g"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"args","type":{"defined":{"name":"RedeemArgsV0"}}}]},{"name":"update_treasury_management_v0","discriminator":[209,139,90,226,249,149,89,217],"accounts":[{"name":"treasury_management","writable":true},{"name":"authority","signer":true,"relations":["treasury_management"]}],"args":[{"name":"args","type":{"defined":{"name":"UpdateTreasuryManagementArgsV0"}}}]}],"accounts":[{"name":"AccountWindowedCircuitBreakerV0","discriminator":[134,11,69,100,90,132,174,187]},{"name":"TreasuryManagementV0","discriminator":[68,111,120,209,16,110,215,59]}],"errors":[{"code":6000,"name":"Frozen","msg":"Treasury management is currently frozen"},{"code":6001,"name":"ArithmeticError","msg":"Error in arithmetic"}],"types":[{"name":"AccountWindowedCircuitBreakerV0","type":{"kind":"struct","fields":[{"name":"token_account","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"config","type":{"defined":{"name":"WindowedCircuitBreakerConfigV0"}}},{"name":"last_window","type":{"defined":{"name":"WindowV0"}}},{"name":"bump_seed","type":"u8"}]}},{"name":"Curve","type":{"kind":"enum","variants":[{"name":"ExponentialCurveV0","fields":[{"name":"k","type":"u128"}]}]}},{"name":"InitializeTreasuryManagementArgsV0","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"curve","type":{"defined":{"name":"Curve"}}},{"name":"freeze_unix_time","type":"i64"},{"name":"window_config","type":{"defined":{"name":"WindowedCircuitBreakerConfigV0"}}}]}},{"name":"RedeemArgsV0","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"expected_output_amount","type":"u64"}]}},{"name":"ThresholdType","type":{"kind":"enum","variants":[{"name":"Percent"},{"name":"Absolute"}]}},{"name":"TreasuryManagementV0","type":{"kind":"struct","fields":[{"name":"treasury_mint","type":"pubkey"},{"name":"supply_mint","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"treasury","type":"pubkey"},{"name":"curve","docs":["The bonding curve to use"],"type":{"defined":{"name":"Curve"}}},{"name":"freeze_unix_time","docs":["Freeze this curve at this time."],"type":"i64"},{"name":"bump_seed","type":"u8"}]}},{"name":"UpdateTreasuryManagementArgsV0","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"curve","type":{"defined":{"name":"Curve"}}},{"name":"freeze_unix_time","type":"i64"}]}},{"name":"WindowV0","type":{"kind":"struct","fields":[{"name":"last_aggregated_value","type":"u64"},{"name":"last_unix_timestamp","type":"i64"}]}},{"name":"WindowedCircuitBreakerConfigV0","type":{"kind":"struct","fields":[{"name":"window_size_seconds","type":"u64"},{"name":"threshold_type","type":{"defined":{"name":"ThresholdType"}}},{"name":"threshold","type":"u64"}]}}]} \ No newline at end of file diff --git a/idls/hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json b/idls/hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json new file mode 100644 index 0000000..87e57a3 --- /dev/null +++ b/idls/hylo_exchange.HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn.json @@ -0,0 +1 @@ +{"address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn","metadata":{"name":"hylo_exchange","version":"0.1.4","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"get_stats","discriminator":[241,65,112,185,230,140,139,177],"accounts":[{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"sol_usd_pyth_feed"}],"args":[],"returns":{"defined":{"name":"ExchangeStats"}}},{"name":"harvest_yield","discriminator":[28,200,150,200,69,56,38,133],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"stablecoin_fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"stablecoin_fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"stablecoin_fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"levercoin_fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"levercoin_fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}],"program":{"kind":"account","path":"hylo_stability_pool"}}},{"name":"sol_usd_pyth_feed"},{"name":"hylo_stability_pool","address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ"},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"initialize_lst_registry","discriminator":[148,180,49,29,133,6,9,59],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"registry_auth","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,114,101,103,105,115,116,114,121,95,97,117,116,104]}]}},{"name":"lst_registry","writable":true},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"slot","type":"u64"}]},{"name":"initialize_lst_registry_calculators","discriminator":[109,166,101,171,217,202,83,166],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"lst_registry_auth","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,114,101,103,105,115,116,114,121,95,97,117,116,104]}]}},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_mints","discriminator":[189,84,85,142,177,200,57,22],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]}},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]}},{"name":"stablecoin_metadata","writable":true},{"name":"levercoin_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_protocol","discriminator":[188,233,252,106,134,146,202,91],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"treasury"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_data"},{"name":"hylo_exchange","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"}],"args":[{"name":"oracle_interval_secs","type":"u64"},{"name":"stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}}]},{"name":"mint_levercoin","discriminator":[91,156,221,157,151,186,223,231],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_lst_ta","writable":true},{"name":"user_levercoin_ta","writable":true},{"name":"lst_mint"},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"amount_lst_to_deposit","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"mint_stablecoin","discriminator":[196,235,215,70,211,5,214,238],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_lst_ta","writable":true},{"name":"user_stablecoin_ta","writable":true},{"name":"lst_mint"},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"sol_usd_pyth_feed"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"amount_lst_to_deposit","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"redeem_levercoin","discriminator":[132,166,215,32,46,131,174,44],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_levercoin_ta","writable":true},{"name":"user_lst_ta","writable":true},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"lst_mint"},{"name":"sol_usd_pyth_feed"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"amount_to_redeem","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"redeem_stablecoin","discriminator":[69,46,6,97,170,130,160,237],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"user_stablecoin_ta","writable":true},{"name":"user_lst_ta","writable":true},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"lst_mint"},{"name":"sol_usd_pyth_feed"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"amount_to_redeem","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"register_lst","discriminator":[167,114,254,24,190,221,82,107],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"lst_header","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_mint"}]}},{"name":"registry_auth","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,114,101,103,105,115,116,114,121,95,97,117,116,104]}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_mint"},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lst_stake_pool_state"},{"name":"sanctum_calculator_program"},{"name":"sanctum_calculator_state"},{"name":"stake_pool_program_data"},{"name":"stake_pool_program"},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"swap_lever_to_stable","discriminator":[167,111,84,179,69,7,135,48],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_stablecoin_ta","writable":true},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"user_levercoin_ta","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_levercoin","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}],"returns":{"defined":{"name":"SwapLeverToStableEventV1"}}},{"name":"swap_lst","discriminator":[37,144,201,101,137,182,241,42],"accounts":[{"name":"user","signer":true},{"name":"hylo"},{"name":"lst_a_mint"},{"name":"lst_a_user_ta","writable":true},{"name":"lst_a_vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_a_mint"}]}},{"name":"lst_a_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"lst_a_vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_a_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_a_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_a_mint"}]}},{"name":"lst_b_mint"},{"name":"lst_b_user_ta","writable":true},{"name":"lst_b_vault_auth","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"lst_b_mint"}]}},{"name":"lst_b_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"lst_b_vault_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_b_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lst_b_header","pda":{"seeds":[{"kind":"const","value":[108,115,116,95,104,101,97,100,101,114]},{"kind":"account","path":"lst_b_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"lst_a_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lst_a_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"amount_lst_a","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}]},{"name":"swap_stable_to_lever","discriminator":[123,194,84,140,192,193,193,161],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}]},"relations":["hylo"]},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_stablecoin_ta","writable":true},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}]},"relations":["hylo"]},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}]}},{"name":"user_levercoin_ta","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_stablecoin","type":"u64"},{"name":"slippage_config","type":{"option":{"defined":{"name":"SlippageConfig"}}}}],"returns":{"defined":{"name":"SwapStableToLeverEventV1"}}},{"name":"update_admin","discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"program_data"},{"name":"hylo_exchange","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"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":"new_admin","type":"pubkey"}]},{"name":"update_levercoin_fees","discriminator":[183,123,195,23,63,151,104,31],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}}]},{"name":"update_lst_prices","discriminator":[3,34,88,178,240,40,85,148],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"lst_registry","writable":true,"relations":["hylo"]},{"name":"lut_program","address":"AddressLookupTab1e1111111111111111111111111"},{"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":"update_lst_swap_fee","discriminator":[129,125,10,188,94,219,63,217],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"update_oracle_conf_tolerance","discriminator":[59,81,210,112,245,81,187,151],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"update_oracle_interval","discriminator":[67,242,44,246,210,94,99,214],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_oracle_interval_secs","type":"u64"}]},{"name":"update_sol_usd_oracle","discriminator":[95,236,18,102,201,114,89,54],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_oracle","type":"pubkey"}]},{"name":"update_stability_pool","discriminator":[241,157,233,64,49,184,93,137],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_stability_pool","type":"pubkey"}]},{"name":"update_stability_thresholds","discriminator":[250,58,160,105,52,84,93,167],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"update_stablecoin_fees","discriminator":[49,74,146,60,3,38,96,4],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}}]},{"name":"update_treasury","discriminator":[60,16,243,66,96,59,254,131],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_treasury","type":"pubkey"}]},{"name":"update_yield_harvest_config","discriminator":[140,91,46,213,44,179,201,32],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["hylo"]},{"name":"hylo","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"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":"new_yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}}]},{"name":"withdraw_fees","discriminator":[198,212,171,109,144,215,174,89],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"treasury","writable":true,"relations":["hylo"]},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}]}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"fee_token_mint"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"fee_token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"treasury_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"treasury"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"fee_token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_token_mint"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":[]}],"accounts":[{"name":"Hylo","discriminator":[114,161,169,210,204,175,149,174]},{"name":"LstHeader","discriminator":[125,135,217,151,122,202,138,59]},{"name":"PriceUpdateV2","discriminator":[34,241,35,99,157,126,244,205]}],"events":[{"name":"ExchangeStats","discriminator":[74,24,38,211,126,124,214,158]},{"name":"HarvestYieldEventV1","discriminator":[236,194,171,214,66,200,158,27]},{"name":"HarvestYieldEventV2","discriminator":[46,204,60,91,154,15,240,7]},{"name":"MintLevercoinEventV0","discriminator":[71,135,154,151,170,173,218,125]},{"name":"MintLevercoinEventV1","discriminator":[77,221,3,200,106,110,9,245]},{"name":"MintLevercoinEventV2","discriminator":[153,16,148,142,11,127,114,15]},{"name":"MintStablecoinEventV0","discriminator":[181,185,32,71,11,248,162,100]},{"name":"MintStablecoinEventV1","discriminator":[102,41,35,191,18,74,142,16]},{"name":"MintStablecoinEventV2","discriminator":[173,104,166,28,0,52,94,246]},{"name":"RedeemLevercoinEventV0","discriminator":[92,186,13,68,23,219,194,81]},{"name":"RedeemLevercoinEventV1","discriminator":[44,209,148,186,40,214,48,242]},{"name":"RedeemLevercoinEventV2","discriminator":[136,249,79,60,114,254,234,38]},{"name":"RedeemStablecoinEventV0","discriminator":[98,11,53,77,188,71,107,168]},{"name":"RedeemStablecoinEventV1","discriminator":[172,179,174,150,249,177,177,201]},{"name":"RedeemStablecoinEventV2","discriminator":[36,163,198,40,252,128,99,179]},{"name":"RegisterLstEvent","discriminator":[67,129,63,97,144,52,195,33]},{"name":"SwapLeverToStableEventV0","discriminator":[50,170,61,23,136,163,174,145]},{"name":"SwapLeverToStableEventV1","discriminator":[201,228,47,118,19,214,21,45]},{"name":"SwapLstEventV0","discriminator":[246,70,176,207,42,167,214,67]},{"name":"SwapStableToLeverEventV0","discriminator":[134,28,79,7,117,57,126,174]},{"name":"SwapStableToLeverEventV1","discriminator":[184,185,154,14,36,128,241,53]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateLevercoinFeesEvent","discriminator":[84,176,60,195,204,115,242,169]},{"name":"UpdateLstPricesEvent","discriminator":[104,0,189,118,195,155,77,151]},{"name":"UpdateLstSwapFeeEvent","discriminator":[139,68,196,130,145,148,173,212]},{"name":"UpdateOracleAddressEvent","discriminator":[28,247,140,128,156,178,148,53]},{"name":"UpdateOracleConfEvent","discriminator":[190,89,82,192,231,31,206,91]},{"name":"UpdateOracleIntervalEvent","discriminator":[190,132,209,41,79,137,195,226]},{"name":"UpdateStabilityPoolEvent","discriminator":[220,82,162,130,152,212,135,63]},{"name":"UpdateStabilityThresholdsEvent","discriminator":[36,117,167,25,25,39,46,189]},{"name":"UpdateStablecoinFeesEvent","discriminator":[38,140,45,231,238,94,115,249]},{"name":"UpdateTreasuryEvent","discriminator":[104,210,213,227,230,150,146,19]},{"name":"UpdateYieldHarvestConfigEvent","discriminator":[67,168,96,20,78,117,245,206]},{"name":"WithdrawFeesEvent","discriminator":[236,118,138,90,139,173,177,89]}],"errors":[{"code":6000,"name":"LevercoinRedeemDisabled","msg":"Cannot redeem levercoin due to stability mode. NAV would be 0 or lower."},{"code":6001,"name":"LeverToStableDisabled","msg":"Levercoin to stablecoin swap disabled due to stability mode."},{"code":6002,"name":"StableToLeverDisabled","msg":"Stablecoin to levercoin swap disabled due to stability mode."},{"code":6003,"name":"SanctumCpi","msg":"Error during CPI to Sanctum LST/SOL calculator."},{"code":6004,"name":"LstRegistryAlreadyInitialized","msg":"LST registry cannot be initialized twice."},{"code":6005,"name":"LstRegistryEmpty","msg":"LST specific accounts found empty when attempting to load registry."},{"code":6006,"name":"LstRegistryPreamble","msg":"Sanctum calculator contexts in LST registry preamble are malformed."},{"code":6007,"name":"LstRegistryLookupTableDeser","msg":"Failed to deserialize registry lookup table."},{"code":6008,"name":"LstRegistryLookupTableInvalid","msg":"Contents of LST registry did not match remaining_accounts."},{"code":6009,"name":"LstBlockInvalid","msg":"Mint/vault/pool accounts in registry block do not match header."},{"code":6010,"name":"LstContextInvalid","msg":"Attempted to register an LST with invalid Sanctum context accounts."},{"code":6011,"name":"LstAdditionOverflow","msg":"Addition overflow while computing total SOL in LST registry."},{"code":6012,"name":"LstPriceOutdated","msg":"Cached LST price not from current epoch. Run pricing crank to update."},{"code":6013,"name":"LstPriceDelta","msg":"Failed to compute delta between current and previous LST prices."},{"code":6014,"name":"LstPriceEpochsInvalid","msg":"Found current epoch less than previous in LST header."},{"code":6015,"name":"LstSolAppreciation","msg":"Overflow while computing LST SOL appreciation."},{"code":6016,"name":"StablecoinMintDisabled","msg":"Stablecoin mint disabled. Protocol is in Mode2 or Depeg."},{"code":6017,"name":"LevercoinMintDisabled","msg":"Levercoin mint disabled. Protocol is in Depeg."},{"code":6018,"name":"YieldHarvestConfigValidation","msg":"Yield harvest configuration percentages failed validation."},{"code":6019,"name":"YieldHarvestDisabled","msg":"Yield harvest disabled due to protocol collateral ratio."},{"code":6020,"name":"YieldHarvestAllocation","msg":"Arithmetic error while computing yield harvest allocation."},{"code":6021,"name":"YieldHarvestEpoch","msg":"Yield harvest already occurred during this epoch."},{"code":6022,"name":"YieldHarvestHasNotRun","msg":"Yield harvest has not yet occurred during this epoch."},{"code":6023,"name":"ZeroRedeem","msg":"Cannot withdraw amount of 0 in a redemption action."},{"code":6024,"name":"ZeroMint","msg":"Cannot deposit amount of 0 in a minting action."},{"code":6025,"name":"ZeroSwap","msg":"Cannot swap amount of 0."},{"code":6026,"name":"IdentitySwap","msg":"Cannot swap from an asset to itself."}],"types":[{"name":"ExchangeStats","docs":["Stats"],"type":{"kind":"struct","fields":[{"name":"total_value_locked","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_supply","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_supply","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_mode","type":{"defined":{"name":"StabilityMode"}}},{"name":"yield_harvest_cache","type":{"defined":{"name":"YieldHarvestCache"}}}]}},{"name":"FeePair","docs":["Represents the spread of fees between mint and redeem for protocol tokens.","All fees must be in basis points to represent a fractional percentage","directly applicable to a token amount e.g. `0.XXXX` or `bips x 10^-4`."],"type":{"kind":"struct","fields":[{"name":"mint","type":{"defined":{"name":"UFixValue64"}}},{"name":"redeem","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"HarvestYieldEventV1","docs":["Cranks"],"type":{"kind":"struct","fields":[{"name":"harvestable_stablecoin","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_extracted","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_to_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"HarvestYieldEventV2","type":{"kind":"struct","fields":[{"name":"harvest_token_mint","type":"pubkey"},{"name":"total_sol_harvested","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_extracted","type":{"defined":{"name":"UFixValue64"}}},{"name":"token_to_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"Hylo","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"treasury","type":"pubkey"},{"name":"lst_registry","type":"pubkey"},{"name":"stablecoin_mint","type":"pubkey"},{"name":"levercoin_mint","type":"pubkey"},{"name":"stability_pool","type":"pubkey"},{"name":"stablecoin_mint_bump","type":"u8"},{"name":"stablecoin_auth_bump","type":"u8"},{"name":"levercoin_mint_bump","type":"u8"},{"name":"levercoin_auth_bump","type":"u8"},{"name":"registry_auth_bump","type":"u8"},{"name":"total_sol_cache_bump","type":"u8"},{"name":"oracle_interval_secs","type":"u64"},{"name":"stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"total_sol_cache","type":{"defined":{"name":"TotalSolCache"}}},{"name":"yield_harvest_cache","type":{"defined":{"name":"YieldHarvestCache"}}},{"name":"yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}},{"name":"stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_oracle","type":"pubkey"},{"name":"lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"_reserved","type":{"array":["u8",78]}}]}},{"name":"LevercoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}},{"name":"mode_2","type":{"defined":{"name":"FeePair"}}}]}},{"name":"LstHeader","docs":["Header for a specific LST. Should be the first entry in the block of","accounts, and contains references to the rest of the accounts."],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"pool_state","type":"pubkey"},{"name":"stake_program","type":{"defined":{"name":"LstStakePoolProgram"}}},{"name":"prev_price_sol","type":{"defined":{"name":"LstSolPrice"}}},{"name":"price_sol","type":{"defined":{"name":"LstSolPrice"}}},{"name":"last_yield_harvest_epoch","type":"u64"},{"name":"_reserved","type":{"array":["u8",64]}}]}},{"name":"LstSolPrice","docs":["Captures the true LST price in SOL for the current epoch."],"type":{"kind":"struct","fields":[{"name":"price","type":{"defined":{"name":"UFixValue64"}}},{"name":"epoch","type":"u64"}]}},{"name":"LstStakePoolProgram","type":{"kind":"enum","variants":[{"name":"Spl"},{"name":"SanctumSpl"},{"name":"SanctumSplMulti"},{"name":"Marinade"}]}},{"name":"MintLevercoinEventV0","docs":["`MintLevercoin`"],"type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":"u64"},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintLevercoinEventV1","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintLevercoinEventV2","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintStablecoinEventV0","docs":["`MintStablecoin`"],"type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":"u64"},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintStablecoinEventV1","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"MintStablecoinEventV2","type":{"kind":"struct","fields":[{"name":"minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_deposited","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"PriceFeedMessage","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_id","docs":["`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."],"type":{"array":["u8",32]}},{"name":"price","type":"i64"},{"name":"conf","type":"u64"},{"name":"exponent","type":"i32"},{"name":"publish_time","docs":["The timestamp of this price update in seconds"],"type":"i64"},{"name":"prev_publish_time","docs":["The timestamp of the previous price update. This field is intended to allow users to","identify the single unique price update for any moment in time:","for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.","","Note that there may not be such an update while we are migrating to the new message-sending logic,","as some price updates on pythnet may not be sent to other chains (because the message-sending","logic may not have triggered). We can solve this problem by making the message-sending mandatory","(which we can do once publishers have migrated over).","","Additionally, this field may be equal to publish_time if the message is sent on a slot where","where the aggregation was unsuccesful. This problem will go away once all publishers have","migrated over to a recent version of pyth-agent."],"type":"i64"},{"name":"ema_price","type":"i64"},{"name":"ema_conf","type":"u64"}]}},{"name":"PriceUpdateV2","docs":["A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.","It contains:","- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.","- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.","- `price_message`: The actual price update.","- `posted_slot`: The slot at which this price update was posted."],"type":{"kind":"struct","fields":[{"name":"write_authority","type":"pubkey"},{"name":"verification_level","type":{"defined":{"name":"VerificationLevel"}}},{"name":"price_message","type":{"defined":{"name":"PriceFeedMessage"}}},{"name":"posted_slot","type":"u64"}]}},{"name":"RedeemLevercoinEventV0","docs":["`RedeemLevercoin`"],"type":{"kind":"struct","fields":[{"name":"redeemed","type":"u64"},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemLevercoinEventV1","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemLevercoinEventV2","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemStablecoinEventV0","docs":["`RedeemStablecoin`"],"type":{"kind":"struct","fields":[{"name":"redeemed","type":"u64"},{"name":"total_supply","type":"u64"},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_ratio","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemStablecoinEventV1","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RedeemStablecoinEventV2","type":{"kind":"struct","fields":[{"name":"redeemed","type":{"defined":{"name":"UFixValue64"}}},{"name":"nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_mint","type":"pubkey"},{"name":"lst_sol_price","type":{"defined":{"name":"UFixValue64"}}},{"name":"collateral_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"fees_deposited","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RegisterLstEvent","docs":["Admin"],"type":{"kind":"struct","fields":[{"name":"header","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"pool_state","type":"pubkey"}]}},{"name":"SlippageConfig","docs":["Client specified slippage tolerance paired with expected token amount."],"type":{"kind":"struct","fields":[{"name":"expected_token_out","type":{"defined":{"name":"UFixValue64"}}},{"name":"slippage_tolerance","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"StabilityMode","docs":["Mode of operation based on the protocol's current collateral ratio.","See whitepaper for more."],"type":{"kind":"enum","variants":[{"name":"Normal"},{"name":"Mode1"},{"name":"Mode2"},{"name":"Depeg"}]}},{"name":"StablecoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}}]}},{"name":"SwapLeverToStableEventV0","type":{"kind":"struct","fields":[{"name":"levercoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_minted","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapLeverToStableEventV1","type":{"kind":"struct","fields":[{"name":"levercoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_minted_user","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_minted_fees","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapLstEventV0","type":{"kind":"struct","fields":[{"name":"lst_a_mint","type":"pubkey"},{"name":"lst_a_in","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_a_fees_extracted","type":{"defined":{"name":"UFixValue64"}}},{"name":"lst_b_mint","type":"pubkey"},{"name":"lst_b_out","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapStableToLeverEventV0","docs":["Swaps"],"type":{"kind":"struct","fields":[{"name":"stablecoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_minted","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"SwapStableToLeverEventV1","type":{"kind":"struct","fields":[{"name":"stablecoin_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_fees","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_minted","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"TotalSolCache","type":{"kind":"struct","fields":[{"name":"current_update_epoch","type":"u64"},{"name":"total_sol","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UFixValue64","docs":["A value-space `Fix` where base is always 10 and bits are a concrete type.","Intended for serialized storage in Solana accounts where generics won't work."],"type":{"kind":"struct","fields":[{"name":"bits","type":"u64"},{"name":"exp","type":"i8"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"old_admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateLevercoinFeesEvent","type":{"kind":"struct","fields":[{"name":"old_levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"new_levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}}]}},{"name":"UpdateLstPricesEvent","type":{"kind":"struct","fields":[{"name":"updated_mints","type":{"vec":"pubkey"}},{"name":"new_total_sol","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateLstSwapFeeEvent","type":{"kind":"struct","fields":[{"name":"old_lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateOracleAddressEvent","type":{"kind":"struct","fields":[{"name":"old_oracle","type":"pubkey"},{"name":"new_oracle","type":"pubkey"}]}},{"name":"UpdateOracleConfEvent","type":{"kind":"struct","fields":[{"name":"old_oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateOracleIntervalEvent","type":{"kind":"struct","fields":[{"name":"old_oracle_interval_secs","type":"u64"},{"name":"new_oracle_interval_secs","type":"u64"}]}},{"name":"UpdateStabilityPoolEvent","type":{"kind":"struct","fields":[{"name":"old_stability_pool","type":"pubkey"},{"name":"new_stability_pool","type":"pubkey"}]}},{"name":"UpdateStabilityThresholdsEvent","type":{"kind":"struct","fields":[{"name":"old_stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"old_stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UpdateStablecoinFeesEvent","type":{"kind":"struct","fields":[{"name":"old_stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"new_stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}}]}},{"name":"UpdateTreasuryEvent","type":{"kind":"struct","fields":[{"name":"old_treasury","type":"pubkey"},{"name":"new_treasury","type":"pubkey"}]}},{"name":"UpdateYieldHarvestConfigEvent","type":{"kind":"struct","fields":[{"name":"old_yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}},{"name":"new_yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}}]}},{"name":"VerificationLevel","docs":["Pyth price updates are bridged to all blockchains via Wormhole.","Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.","The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,","so we also allow for partial verification.","","This enum represents how much a price update has been verified:","- If `Full`, we have verified the signatures for two thirds of the current guardians.","- If `Partial`, only `num_signatures` guardian signatures have been checked.","","# Warning","Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."],"type":{"kind":"enum","variants":[{"name":"Partial","fields":[{"name":"num_signatures","type":"u8"}]},{"name":"Full"}]}},{"name":"WithdrawFeesEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"treasury_ata","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"YieldHarvestCache","docs":["Records epoch yield harvest information for off-chain consumers."],"type":{"kind":"struct","fields":[{"name":"epoch","type":"u64"},{"name":"stability_pool_cap","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_yield_to_pool","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"YieldHarvestConfig","docs":["Captures yield harvest configuration as two basis point values:"],"type":{"kind":"struct","fields":[{"name":"allocation","type":{"defined":{"name":"UFixValue64"}}},{"name":"fee","type":{"defined":{"name":"UFixValue64"}}}]}}],"constants":[{"name":"FEE_AUTH","type":{"array":["u8",8]},"value":"[102, 101, 101, 95, 97, 117, 116, 104]"},{"name":"HYLO","type":{"array":["u8",4]},"value":"[104, 121, 108, 111]"},{"name":"HYUSD","type":{"array":["u8",5]},"value":"[104, 121, 85, 83, 68]"},{"name":"LST_HEADER","type":{"array":["u8",10]},"value":"[108, 115, 116, 95, 104, 101, 97, 100, 101, 114]"},{"name":"LST_REGISTRY_AUTH","type":{"array":["u8",17]},"value":"[108, 115, 116, 95, 114, 101, 103, 105, 115, 116, 114, 121, 95, 97, 117, 116, 104]"},{"name":"MINT_AUTH","type":{"array":["u8",9]},"value":"[109, 105, 110, 116, 95, 97, 117, 116, 104]"},{"name":"POOL_AUTH","type":{"array":["u8",9]},"value":"[112, 111, 111, 108, 95, 97, 117, 116, 104]"},{"name":"VAULT_AUTH","type":{"array":["u8",10]},"value":"[118, 97, 117, 108, 116, 95, 97, 117, 116, 104]"},{"name":"XSOL","type":{"array":["u8",4]},"value":"[120, 83, 79, 76]"}]} \ No newline at end of file diff --git a/idls/hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json b/idls/hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json new file mode 100644 index 0000000..8844cbd --- /dev/null +++ b/idls/hylo_stability_pool.HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ.json @@ -0,0 +1 @@ +{"address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ","metadata":{"name":"hylo_stability_pool","version":"0.1.4","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"get_stats","discriminator":[241,65,112,185,230,140,139,177],"accounts":[{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_pool","pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lp_token_mint","pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"}],"args":[],"returns":{"defined":{"name":"StabilityPoolStats"}}},{"name":"initialize_lp_token_mint","discriminator":[188,32,168,40,166,152,159,156],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["pool_config"]},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"lp_token_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"lp_token_mint"}]}},{"name":"lp_token_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"lp_token_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_stability_pool","discriminator":[220,103,253,62,133,245,74,222],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_data"},{"name":"hylo_stability_pool","address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ"}],"args":[]},{"name":"rebalance_lever_to_stable","discriminator":[194,252,113,42,31,248,184,211],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_auth","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"hylo_event_authority"},{"name":"hylo_exchange_program","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"rebalance_stable_to_lever","discriminator":[210,59,29,161,20,10,3,68],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_auth","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"sol_usd_pyth_feed"},{"name":"stablecoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"hylo_event_authority"},{"name":"hylo_exchange_program","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"update_admin","discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"program_data"},{"name":"hylo_stability_pool","address":"HysTabVUfmQBFcmzu1ctRd1Y1fxd66RBpboy1bmtDSQQ"},{"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":"new_admin","type":"pubkey"}]},{"name":"update_withdrawal_fee","discriminator":[165,235,231,25,127,99,244,133],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["pool_config"]},{"name":"pool_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"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":"new_withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}}]},{"name":"user_deposit","discriminator":[186,198,140,233,129,39,98,153],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"user_stablecoin_ta","writable":true},{"name":"user_lp_token_ta","writable":true},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_pool","pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lp_token_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"lp_token_mint"}]}},{"name":"lp_token_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"amount_stablecoin","type":"u64"}]},{"name":"user_withdraw","discriminator":[53,254,26,242,119,237,73,33],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"pool_config","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,99,111,110,102,105,103]}]}},{"name":"hylo","pda":{"seeds":[{"kind":"const","value":[104,121,108,111]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"stablecoin_mint","pda":{"seeds":[{"kind":"const","value":[104,121,85,83,68]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"user_stablecoin_ta","writable":true},{"name":"fee_auth","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,97,117,116,104]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_lp_token_ta","writable":true},{"name":"pool_auth","pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,97,117,116,104]}]}},{"name":"stablecoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"stablecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"levercoin_mint","pda":{"seeds":[{"kind":"const","value":[120,83,79,76]}],"program":{"kind":"const","value":[245,187,72,160,4,116,48,134,197,164,152,189,233,219,27,124,201,65,103,243,58,82,140,90,13,150,83,40,223,158,124,33]}}},{"name":"levercoin_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_auth"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"levercoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_levercoin_ta","writable":true},{"name":"lp_token_auth","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104]},{"kind":"account","path":"lp_token_mint"}]}},{"name":"lp_token_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,104,121,85,83,68]}]}},{"name":"sol_usd_pyth_feed"},{"name":"hylo_event_authority"},{"name":"hylo_exchange_program","address":"HYEXCHtHkBagdStcJCp3xbbb9B7sdMdWXFNj6mdsG4hn"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"amount_lp_token","type":"u64"}]}],"accounts":[{"name":"Hylo","discriminator":[114,161,169,210,204,175,149,174]},{"name":"PoolConfig","discriminator":[26,108,14,123,116,230,129,43]},{"name":"PriceUpdateV2","discriminator":[34,241,35,99,157,126,244,205]}],"events":[{"name":"RebalanceLeverToStableEvent","discriminator":[177,3,181,27,187,44,49,109]},{"name":"RebalanceStableToLeverEvent","discriminator":[117,99,97,34,247,186,34,198]},{"name":"StabilityPoolStats","discriminator":[146,92,252,198,221,148,242,182]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateWithdrawalFeeEvent","discriminator":[204,60,32,187,54,211,107,115]},{"name":"UserDepositEvent","discriminator":[70,55,110,118,235,187,239,33]},{"name":"UserWithdrawEventV0","discriminator":[142,135,121,155,248,252,59,161]},{"name":"UserWithdrawEventV1","discriminator":[51,241,35,135,62,237,83,122]}],"errors":[{"code":6000,"name":"RebalanceDisabled","msg":"Rebalance is disabled due to stability or pool amount constraint not \\\n being met."},{"code":6001,"name":"DepositDisabled","msg":"Deposits to pool disabled due to active rebalancing."}],"types":[{"name":"FeePair","docs":["Represents the spread of fees between mint and redeem for protocol tokens.","All fees must be in basis points to represent a fractional percentage","directly applicable to a token amount e.g. `0.XXXX` or `bips x 10^-4`."],"type":{"kind":"struct","fields":[{"name":"mint","type":{"defined":{"name":"UFixValue64"}}},{"name":"redeem","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"Hylo","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"treasury","type":"pubkey"},{"name":"lst_registry","type":"pubkey"},{"name":"stablecoin_mint","type":"pubkey"},{"name":"levercoin_mint","type":"pubkey"},{"name":"stability_pool","type":"pubkey"},{"name":"stablecoin_mint_bump","type":"u8"},{"name":"stablecoin_auth_bump","type":"u8"},{"name":"levercoin_mint_bump","type":"u8"},{"name":"levercoin_auth_bump","type":"u8"},{"name":"registry_auth_bump","type":"u8"},{"name":"total_sol_cache_bump","type":"u8"},{"name":"oracle_interval_secs","type":"u64"},{"name":"stablecoin_fees","type":{"defined":{"name":"StablecoinFees"}}},{"name":"levercoin_fees","type":{"defined":{"name":"LevercoinFees"}}},{"name":"total_sol_cache","type":{"defined":{"name":"TotalSolCache"}}},{"name":"yield_harvest_cache","type":{"defined":{"name":"YieldHarvestCache"}}},{"name":"yield_harvest_config","type":{"defined":{"name":"YieldHarvestConfig"}}},{"name":"stability_threshold_1","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_threshold_2","type":{"defined":{"name":"UFixValue64"}}},{"name":"oracle_conf_tolerance","type":{"defined":{"name":"UFixValue64"}}},{"name":"sol_usd_oracle","type":"pubkey"},{"name":"lst_swap_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"_reserved","type":{"array":["u8",78]}}]}},{"name":"LevercoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}},{"name":"mode_2","type":{"defined":{"name":"FeePair"}}}]}},{"name":"PoolConfig","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"pool_auth_bump","type":"u8"},{"name":"lp_token_auth_bump","type":"u8"},{"name":"lp_token_mint_bump","type":"u8"},{"name":"withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"_reserved","type":{"array":["u8",55]}}]}},{"name":"PriceFeedMessage","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_id","docs":["`FeedId` but avoid the type alias because of compatibility issues with Anchor's `idl-build` feature."],"type":{"array":["u8",32]}},{"name":"price","type":"i64"},{"name":"conf","type":"u64"},{"name":"exponent","type":"i32"},{"name":"publish_time","docs":["The timestamp of this price update in seconds"],"type":"i64"},{"name":"prev_publish_time","docs":["The timestamp of the previous price update. This field is intended to allow users to","identify the single unique price update for any moment in time:","for any time t, the unique update is the one such that prev_publish_time < t <= publish_time.","","Note that there may not be such an update while we are migrating to the new message-sending logic,","as some price updates on pythnet may not be sent to other chains (because the message-sending","logic may not have triggered). We can solve this problem by making the message-sending mandatory","(which we can do once publishers have migrated over).","","Additionally, this field may be equal to publish_time if the message is sent on a slot where","where the aggregation was unsuccesful. This problem will go away once all publishers have","migrated over to a recent version of pyth-agent."],"type":"i64"},{"name":"ema_price","type":"i64"},{"name":"ema_conf","type":"u64"}]}},{"name":"PriceUpdateV2","docs":["A price update account. This account is used by the Pyth Receiver program to store a verified price update from a Pyth price feed.","It contains:","- `write_authority`: The write authority for this account. This authority can close this account to reclaim rent or update the account to contain a different price update.","- `verification_level`: The [`VerificationLevel`] of this price update. This represents how many Wormhole guardian signatures have been verified for this price update.","- `price_message`: The actual price update.","- `posted_slot`: The slot at which this price update was posted."],"type":{"kind":"struct","fields":[{"name":"write_authority","type":"pubkey"},{"name":"verification_level","type":{"defined":{"name":"VerificationLevel"}}},{"name":"price_message","type":{"defined":{"name":"PriceFeedMessage"}}},{"name":"posted_slot","type":"u64"}]}},{"name":"RebalanceLeverToStableEvent","type":{"kind":"struct","fields":[{"name":"levercoin_swapped","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"RebalanceStableToLeverEvent","type":{"kind":"struct","fields":[{"name":"stablecoin_swapped","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"StabilityPoolStats","type":{"kind":"struct","fields":[{"name":"lp_token_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"lp_token_supply","type":{"defined":{"name":"UFixValue64"}}},{"name":"stability_pool_cap","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_in_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_in_pool","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"StablecoinFees","type":{"kind":"struct","fields":[{"name":"normal","type":{"defined":{"name":"FeePair"}}},{"name":"mode_1","type":{"defined":{"name":"FeePair"}}}]}},{"name":"TotalSolCache","type":{"kind":"struct","fields":[{"name":"current_update_epoch","type":"u64"},{"name":"total_sol","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UFixValue64","docs":["A value-space `Fix` where base is always 10 and bits are a concrete type.","Intended for serialized storage in Solana accounts where generics won't work."],"type":{"kind":"struct","fields":[{"name":"bits","type":"u64"},{"name":"exp","type":"i8"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"old_admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateWithdrawalFeeEvent","type":{"kind":"struct","fields":[{"name":"old_withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}},{"name":"new_withdrawal_fee","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UserDepositEvent","type":{"kind":"struct","fields":[{"name":"stablecoin_deposited","type":{"defined":{"name":"UFixValue64"}}},{"name":"lp_token_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"lp_token_minted","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UserWithdrawEventV0","type":{"kind":"struct","fields":[{"name":"lp_token_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"UserWithdrawEventV1","type":{"kind":"struct","fields":[{"name":"lp_token_burned","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_fees","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_nav","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_withdrawn","type":{"defined":{"name":"UFixValue64"}}},{"name":"levercoin_nav","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"VerificationLevel","docs":["Pyth price updates are bridged to all blockchains via Wormhole.","Using the price updates on another chain requires verifying the signatures of the Wormhole guardians.","The usual process is to check the signatures for two thirds of the total number of guardians, but this can be cumbersome on Solana because of the transaction size limits,","so we also allow for partial verification.","","This enum represents how much a price update has been verified:","- If `Full`, we have verified the signatures for two thirds of the current guardians.","- If `Partial`, only `num_signatures` guardian signatures have been checked.","","# Warning","Using partially verified price updates is dangerous, as it lowers the threshold of guardians that need to collude to produce a malicious price update."],"type":{"kind":"enum","variants":[{"name":"Partial","fields":[{"name":"num_signatures","type":"u8"}]},{"name":"Full"}]}},{"name":"YieldHarvestCache","docs":["Records epoch yield harvest information for off-chain consumers."],"type":{"kind":"struct","fields":[{"name":"epoch","type":"u64"},{"name":"stability_pool_cap","type":{"defined":{"name":"UFixValue64"}}},{"name":"stablecoin_yield_to_pool","type":{"defined":{"name":"UFixValue64"}}}]}},{"name":"YieldHarvestConfig","docs":["Captures yield harvest configuration as two basis point values:"],"type":{"kind":"struct","fields":[{"name":"allocation","type":{"defined":{"name":"UFixValue64"}}},{"name":"fee","type":{"defined":{"name":"UFixValue64"}}}]}}],"constants":[{"name":"POOL_AUTH","type":{"array":["u8",9]},"value":"[112, 111, 111, 108, 95, 97, 117, 116, 104]"},{"name":"POOL_CONFIG","type":{"array":["u8",11]},"value":"[112, 111, 111, 108, 95, 99, 111, 110, 102, 105, 103]"},{"name":"STAKED_HYUSD","type":{"array":["u8",12]},"value":"[115, 116, 97, 107, 101, 100, 95, 104, 121, 85, 83, 68]"}]} \ No newline at end of file diff --git a/idls/jito_tip_distribution.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json b/idls/jito_tip_distribution.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json new file mode 100644 index 0000000..ddfecc4 --- /dev/null +++ b/idls/jito_tip_distribution.4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7..json @@ -0,0 +1 @@ +{"address":"4R3gSG8BpU4t19KYj8CfnbtRpnT8gtk4dvTHxVRwc2r7","metadata":{"name":"jito_tip_distribution","version":"0.1.5","spec":"0.1.0","description":"Tip distribution program, responsible for distributing funds to entitled parties."},"instructions":[{"name":"claim","docs":["Claims tokens from the [TipDistributionAccount]."],"discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"config"},{"name":"tip_distribution_account","writable":true},{"name":"merkle_root_upload_authority","signer":true},{"name":"claim_status","docs":["Status of the claim. Used to prevent the same party from claiming multiple times."],"writable":true},{"name":"claimant","docs":["Receiver of the funds."],"writable":true},{"name":"payer","docs":["Who is paying for the claim."],"writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"bump","type":"u8"},{"name":"amount","type":"u64"},{"name":"proof","type":{"vec":{"array":["u8",32]}}}]},{"name":"close_claim_status","docs":["Anyone can invoke this only after the [TipDistributionAccount] has expired.","This instruction will return any rent back to `claimant` and close the account"],"discriminator":[163,214,191,165,245,188,17,185],"accounts":[{"name":"config"},{"name":"claim_status","writable":true},{"name":"claim_status_payer","docs":["Receiver of the funds."],"writable":true}],"args":[]},{"name":"close_tip_distribution_account","docs":["Anyone can invoke this only after the [TipDistributionAccount] has expired.","This instruction will send any unclaimed funds to the designated `expired_funds_account`","before closing and returning the rent exempt funds to the validator."],"discriminator":[47,136,208,190,125,243,74,227],"accounts":[{"name":"config"},{"name":"expired_funds_account","writable":true},{"name":"tip_distribution_account","writable":true},{"name":"validator_vote_account","writable":true},{"name":"signer","docs":["Anyone can crank this instruction."],"writable":true,"signer":true}],"args":[{"name":"_epoch","type":"u64"}]},{"name":"initialize","docs":["Initialize a singleton instance of the [Config] account."],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"config","writable":true},{"name":"system_program"},{"name":"initializer","writable":true,"signer":true}],"args":[{"name":"authority","type":"pubkey"},{"name":"expired_funds_account","type":"pubkey"},{"name":"num_epochs_valid","type":"u64"},{"name":"max_validator_commission_bps","type":"u16"},{"name":"bump","type":"u8"}]},{"name":"initialize_merkle_root_upload_config","discriminator":[232,87,72,14,89,40,40,27],"accounts":[{"name":"config","writable":true},{"name":"merkle_root_upload_config","writable":true},{"name":"authority","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"authority","type":"pubkey"},{"name":"original_authority","type":"pubkey"}]},{"name":"initialize_tip_distribution_account","docs":["Initialize a new [TipDistributionAccount] associated with the given validator vote key","and current epoch."],"discriminator":[120,191,25,182,111,49,179,55],"accounts":[{"name":"config"},{"name":"tip_distribution_account","writable":true},{"name":"validator_vote_account","docs":["The validator's vote account is used to check this transaction's signer is also the authorized withdrawer."]},{"name":"signer","docs":["Must be equal to the supplied validator vote account's authorized withdrawer."],"writable":true,"signer":true},{"name":"system_program"}],"args":[{"name":"merkle_root_upload_authority","type":"pubkey"},{"name":"validator_commission_bps","type":"u16"},{"name":"bump","type":"u8"}]},{"name":"migrate_tda_merkle_root_upload_authority","discriminator":[13,226,163,144,56,202,214,23],"accounts":[{"name":"tip_distribution_account","writable":true},{"name":"merkle_root_upload_config"}],"args":[]},{"name":"update_config","docs":["Update config fields. Only the [Config] authority can invoke this."],"discriminator":[29,158,252,191,10,83,219,99],"accounts":[{"name":"config","writable":true},{"name":"authority","writable":true,"signer":true}],"args":[{"name":"new_config","type":{"defined":{"name":"Config"}}}]},{"name":"update_merkle_root_upload_config","discriminator":[128,227,159,139,176,128,118,2],"accounts":[{"name":"config"},{"name":"merkle_root_upload_config","writable":true},{"name":"authority","signer":true},{"name":"system_program"}],"args":[{"name":"authority","type":"pubkey"},{"name":"original_authority","type":"pubkey"}]},{"name":"upload_merkle_root","docs":["Uploads a merkle root to the provided [TipDistributionAccount]. This instruction may be","invoked many times as long as the account is at least one epoch old and not expired; and","no funds have already been claimed. Only the `merkle_root_upload_authority` has the","authority to invoke."],"discriminator":[70,3,110,29,199,190,205,176],"accounts":[{"name":"config"},{"name":"tip_distribution_account","writable":true},{"name":"merkle_root_upload_authority","writable":true,"signer":true}],"args":[{"name":"root","type":{"array":["u8",32]}},{"name":"max_total_claim","type":"u64"},{"name":"max_num_nodes","type":"u64"}]}],"accounts":[{"name":"ClaimStatus","discriminator":[22,183,249,157,247,95,150,96]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"MerkleRootUploadConfig","discriminator":[213,125,30,192,25,121,87,33]},{"name":"TipDistributionAccount","discriminator":[85,64,113,198,234,94,120,123]}],"events":[{"name":"ClaimStatusClosedEvent","discriminator":[188,143,237,229,192,182,164,118]},{"name":"ClaimedEvent","discriminator":[144,172,209,86,144,87,84,115]},{"name":"ConfigUpdatedEvent","discriminator":[245,158,129,99,60,100,214,220]},{"name":"MerkleRootUploadAuthorityUpdatedEvent","discriminator":[83,157,58,165,200,171,8,106]},{"name":"MerkleRootUploadedEvent","discriminator":[94,233,236,49,52,224,181,167]},{"name":"TipDistributionAccountClosedEvent","discriminator":[246,152,49,154,9,79,25,58]},{"name":"TipDistributionAccountInitializedEvent","discriminator":[39,165,224,61,40,140,139,255]},{"name":"ValidatorCommissionBpsUpdatedEvent","discriminator":[4,34,92,25,228,88,51,206]}],"errors":[{"code":6000,"name":"AccountValidationFailure","msg":"Account failed validation."},{"code":6001,"name":"ArithmeticError","msg":"Encountered an arithmetic under/overflow error."},{"code":6002,"name":"ExceedsMaxClaim","msg":"The maximum number of funds to be claimed has been exceeded."},{"code":6003,"name":"ExceedsMaxNumNodes","msg":"The maximum number of claims has been exceeded."},{"code":6004,"name":"ExpiredTipDistributionAccount","msg":"The given TipDistributionAccount has expired."},{"code":6005,"name":"FundsAlreadyClaimed","msg":"The funds for the given index and TipDistributionAccount have already been claimed."},{"code":6006,"name":"InvalidParameters","msg":"Supplied invalid parameters."},{"code":6007,"name":"InvalidProof","msg":"The given proof is invalid."},{"code":6008,"name":"InvalidVoteAccountData","msg":"Failed to deserialize the supplied vote account data."},{"code":6009,"name":"MaxValidatorCommissionFeeBpsExceeded","msg":"Validator's commission basis points must be less than or equal to the Config account's max_validator_commission_bps."},{"code":6010,"name":"PrematureCloseTipDistributionAccount","msg":"The given TipDistributionAccount is not ready to be closed."},{"code":6011,"name":"PrematureCloseClaimStatus","msg":"The given ClaimStatus account is not ready to be closed."},{"code":6012,"name":"PrematureMerkleRootUpload","msg":"Must wait till at least one epoch after the tip distribution account was created to upload the merkle root."},{"code":6013,"name":"RootNotUploaded","msg":"No merkle root has been uploaded to the given TipDistributionAccount."},{"code":6014,"name":"Unauthorized","msg":"Unauthorized signer."},{"code":6015,"name":"InvalidTdaForMigration","msg":"TDA not valid for migration."}],"types":[{"name":"ClaimStatus","docs":["Gives us an audit trail of who and what was claimed; also enforces and only-once claim by any party."],"type":{"kind":"struct","fields":[{"name":"is_claimed","docs":["If true, the tokens have been claimed."],"type":"bool"},{"name":"claimant","docs":["Authority that claimed the tokens. Allows for delegated rewards claiming."],"type":"pubkey"},{"name":"claim_status_payer","docs":["The payer who created the claim."],"type":"pubkey"},{"name":"slot_claimed_at","docs":["When the funds were claimed."],"type":"u64"},{"name":"amount","docs":["Amount of funds claimed."],"type":"u64"},{"name":"expires_at","docs":["The epoch (upto and including) that tip funds can be claimed.","Copied since TDA can be closed, need to track to avoid making multiple claims"],"type":"u64"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"ClaimStatusClosedEvent","type":{"kind":"struct","fields":[{"name":"claim_status_payer","docs":["Account where funds were transferred to."],"type":"pubkey"},{"name":"claim_status_account","docs":["[ClaimStatus] account that was closed."],"type":"pubkey"}]}},{"name":"ClaimedEvent","type":{"kind":"struct","fields":[{"name":"tip_distribution_account","docs":["[TipDistributionAccount] claimed from."],"type":"pubkey"},{"name":"payer","docs":["User that paid for the claim, may or may not be the same as claimant."],"type":"pubkey"},{"name":"claimant","docs":["Account that received the funds."],"type":"pubkey"},{"name":"amount","docs":["Amount of funds to distribute."],"type":"u64"}]}},{"name":"Config","type":{"kind":"struct","fields":[{"name":"authority","docs":["Account with authority over this PDA."],"type":"pubkey"},{"name":"expired_funds_account","docs":["We want to expire funds after some time so that validators can be refunded the rent.","Expired funds will get transferred to this account."],"type":"pubkey"},{"name":"num_epochs_valid","docs":["Specifies the number of epochs a merkle root is valid for before expiring."],"type":"u64"},{"name":"max_validator_commission_bps","docs":["The maximum commission a validator can set on their distribution account."],"type":"u16"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"ConfigUpdatedEvent","type":{"kind":"struct","fields":[{"name":"authority","docs":["Who updated it."],"type":"pubkey"}]}},{"name":"MerkleRoot","type":{"kind":"struct","fields":[{"name":"root","docs":["The 256-bit merkle root."],"type":{"array":["u8",32]}},{"name":"max_total_claim","docs":["Maximum number of funds that can ever be claimed from this [MerkleRoot]."],"type":"u64"},{"name":"max_num_nodes","docs":["Maximum number of nodes that can ever be claimed from this [MerkleRoot]."],"type":"u64"},{"name":"total_funds_claimed","docs":["Total funds that have been claimed."],"type":"u64"},{"name":"num_nodes_claimed","docs":["Number of nodes that have been claimed."],"type":"u64"}]}},{"name":"MerkleRootUploadAuthorityUpdatedEvent","type":{"kind":"struct","fields":[{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"MerkleRootUploadConfig","docs":["Singleton account that allows overriding TDA's merkle upload authority"],"type":{"kind":"struct","fields":[{"name":"override_authority","docs":["The authority that overrides the TipDistributionAccount merkle_root_upload_authority"],"type":"pubkey"},{"name":"original_upload_authority","docs":["The original merkle root upload authority that can be changed to the new overrided","authority. E.g. Jito Labs authority GZctHpWXmsZC1YHACTGGcHhYxjdRqQvTpYkb9LMvxDib"],"type":"pubkey"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"MerkleRootUploadedEvent","type":{"kind":"struct","fields":[{"name":"merkle_root_upload_authority","docs":["Who uploaded the root."],"type":"pubkey"},{"name":"tip_distribution_account","docs":["Where the root was uploaded to."],"type":"pubkey"}]}},{"name":"TipDistributionAccount","docs":["The account that validators register as **tip_receiver** with the tip-payment program."],"type":{"kind":"struct","fields":[{"name":"validator_vote_account","docs":["The validator's vote account, also the recipient of remaining lamports after","upon closing this account."],"type":"pubkey"},{"name":"merkle_root_upload_authority","docs":["The only account authorized to upload a merkle-root for this account."],"type":"pubkey"},{"name":"merkle_root","docs":["The merkle root used to verify user claims from this account."],"type":{"option":{"defined":{"name":"MerkleRoot"}}}},{"name":"epoch_created_at","docs":["Epoch for which this account was created."],"type":"u64"},{"name":"validator_commission_bps","docs":["The commission basis points this validator charges."],"type":"u16"},{"name":"expires_at","docs":["The epoch (upto and including) that tip funds can be claimed."],"type":"u64"},{"name":"bump","docs":["The bump used to generate this account"],"type":"u8"}]}},{"name":"TipDistributionAccountClosedEvent","type":{"kind":"struct","fields":[{"name":"expired_funds_account","docs":["Account where unclaimed funds were transferred to."],"type":"pubkey"},{"name":"tip_distribution_account","docs":["[TipDistributionAccount] closed."],"type":"pubkey"},{"name":"expired_amount","docs":["Unclaimed amount transferred."],"type":"u64"}]}},{"name":"TipDistributionAccountInitializedEvent","type":{"kind":"struct","fields":[{"name":"tip_distribution_account","type":"pubkey"}]}},{"name":"ValidatorCommissionBpsUpdatedEvent","type":{"kind":"struct","fields":[{"name":"tip_distribution_account","type":"pubkey"},{"name":"old_commission_bps","type":"u16"},{"name":"new_commission_bps","type":"u16"}]}}]} \ No newline at end of file diff --git a/idls/jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json b/idls/jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json new file mode 100644 index 0000000..7cc97ac --- /dev/null +++ b/idls/jupiter_aprepro_smart_wallet.JSW99DKmxNyREQM14SQLDykeBvEUG63TeohrvmofEiw.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"jupiter_smart_wallet","instructions":[{"name":"initialize","accounts":[{"name":"vault","isMut":false,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"userSigner","type":{"array":["u8",64]}},{"name":"label","type":"string"}]},{"name":"flashSwapApprove","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"vaultWsol","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInputAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false,"docs":["CHECKED: in implementation code"]},{"name":"inputTokenProgram","isMut":false,"isSigner":false},{"name":"outputTokenProgram","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"priorityFeeLamports","type":"u64"},{"name":"inputAmount","type":"u64"},{"name":"minOut","type":"u64"}]},{"name":"preFlashSwapApprove","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"vaultWsol","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"inputMint","isMut":true,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInputAccount","isMut":false,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false,"docs":["CHECKED: in implementation code"]},{"name":"inputTokenProgram","isMut":false,"isSigner":false},{"name":"outputTokenProgram","isMut":false,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"priorityFeeLamports","type":"u64"},{"name":"inputAmount","type":"u64"},{"name":"minOut","type":"u64"},{"name":"postSwapIxIndex","type":"u8"},{"name":"feeBps","type":"u16"},{"name":"referralShareBps","type":"u16"},{"name":"useDurableNonce","type":"bool"},{"name":"maxOut","type":"u64"}]},{"name":"postSwap","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"vaultWsol","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"outputVault","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"withdraw","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"vaultTokenAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"amount","type":"u64"}]},{"name":"withdrawToken","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"vault","isMut":true,"isSigner":false},{"name":"vaultInfo","isMut":true,"isSigner":false},{"name":"receiver","isMut":false,"isSigner":false},{"name":"receiverTokenAccount","isMut":true,"isSigner":false},{"name":"vaultTokenAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recoveryId","type":"u8"},{"name":"amount","type":"u64"}]}],"accounts":[{"name":"VaultInfo","type":{"kind":"struct","fields":[{"name":"vault","type":"publicKey"},{"name":"bump","type":"u8"},{"name":"createdAt","type":"i64"},{"name":"label","type":"string"},{"name":"transientNonces","type":{"array":["u64",32]}},{"name":"userSigner","type":{"array":["u8",64]}},{"name":"swapInProgress","type":"bool"},{"name":"preSwapAmount","type":"u64"},{"name":"minOut","type":"u64"},{"name":"feeBps","type":"u16"},{"name":"referralShareBps","type":"u16"},{"name":"maxOut","type":"u64"},{"name":"reserved","type":{"array":["u8",31]}},{"name":"durableNonces","type":{"vec":"u64"}}]}}],"types":[{"name":"SwapApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"inputMint","type":"publicKey"},{"name":"outputMint","type":"publicKey"},{"name":"inputAmount","type":"u64"},{"name":"priorityFeeLamports","type":"u64"},{"name":"useDurableNonce","type":"bool"}]}},{"name":"WithdrawApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"amount","type":"u64"},{"name":"withdrawalAddress","type":"publicKey"}]}},{"name":"WithdrawTokenApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"amount","type":"u64"},{"name":"mint","type":"publicKey"},{"name":"withdrawalAddress","type":"publicKey"}]}},{"name":"BurnApproval","type":{"kind":"struct","fields":[{"name":"nonce","type":"u64"},{"name":"mint","type":"publicKey"}]}}],"events":[{"name":"Initialize","fields":[{"name":"vaultKey","type":"publicKey","index":false},{"name":"userKey","type":{"array":["u8",64]},"index":false}]},{"name":"Withdraw","fields":[{"name":"vaultKey","type":"publicKey","index":false},{"name":"receiverKey","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"Swap","fields":[{"name":"userKey","type":{"array":["u8",64]},"index":false},{"name":"vaultKey","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"baseFeeAmount","type":"u64","index":false}]},{"name":"Refer","fields":[{"name":"vaultKey","type":"publicKey","index":false},{"name":"referrerKey","type":"publicKey","index":false},{"name":"shareAmount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"MathOverflow"},{"code":6001,"name":"AddressMismatch"},{"code":6002,"name":"Unauthorized"},{"code":6003,"name":"UnauthorizedKeeper"},{"code":6004,"name":"ProgramMismatch"},{"code":6005,"name":"UnexpectedSwapProgram"},{"code":6006,"name":"UnexpectedSwapInstruction"},{"code":6007,"name":"WrongSwapOutAccount"},{"code":6008,"name":"InvalidSwapMint"},{"code":6009,"name":"ExceedSlippageSetting"},{"code":6010,"name":"AmountMismatch"},{"code":6011,"name":"MissingSwapInstructions"},{"code":6012,"name":"InvalidPublicKey"},{"code":6013,"name":"InvalidApproval"},{"code":6014,"name":"ExpiredApproval"},{"code":6015,"name":"ExpiredOrder"},{"code":6016,"name":"InsufficientSOLForFees"},{"code":6017,"name":"InvalidNonce"},{"code":6018,"name":"ViolateMinOut"},{"code":6019,"name":"FeeTooHigh"},{"code":6020,"name":"NonceInvalid"},{"code":6021,"name":"NonceUsed"},{"code":6022,"name":"NonceLimit"},{"code":6023,"name":"UnableToVerify"},{"code":6024,"name":"MissingPreSwapIx"},{"code":6025,"name":"MissingPostSwapIx"},{"code":6026,"name":"InvalidBps"},{"code":6027,"name":"TooLargeFee"},{"code":6028,"name":"InvalidReceiverTokenAccount"},{"code":6029,"name":"Deprecated"},{"code":6030,"name":"ViolateMaxOut"}]} \ No newline at end of file diff --git a/idls/jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json b/idls/jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json new file mode 100644 index 0000000..bfcf77a --- /dev/null +++ b/idls/jupiter_dca.DCA265Vj8a9CEuX1eb1LWRnDT7uK6q1xMipnNyatn23M.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"dca","instructions":[{"name":"openDca","accounts":[{"name":"dca","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":true},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"applicationIdx","type":"u64"},{"name":"inAmount","type":"u64"},{"name":"inAmountPerCycle","type":"u64"},{"name":"cycleFrequency","type":"i64"},{"name":"minOutAmount","type":{"option":"u64"}},{"name":"maxOutAmount","type":{"option":"u64"}},{"name":"startAt","type":{"option":"i64"}},{"name":"closeWsolInAta","type":{"option":"bool"}}]},{"name":"openDcaV2","accounts":[{"name":"dca","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"applicationIdx","type":"u64"},{"name":"inAmount","type":"u64"},{"name":"inAmountPerCycle","type":"u64"},{"name":"cycleFrequency","type":"i64"},{"name":"minOutAmount","type":{"option":"u64"}},{"name":"maxOutAmount","type":{"option":"u64"}},{"name":"startAt","type":{"option":"i64"}}]},{"name":"closeDca","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"withdraw","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"dcaAta","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"userOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"withdrawParams","type":{"defined":"WithdrawParams"}}]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"depositIn","type":"u64"}]},{"name":"withdrawFees","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"programFeeAta","isMut":true,"isSigner":false},{"name":"adminFeeAta","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"initiateFlashFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"docs":["The token to borrow"]},{"name":"keeperInAta","isMut":true,"isSigner":false,"docs":["The account to send borrowed tokens to"]},{"name":"inAta","isMut":true,"isSigner":false,"docs":["The account to borrow from"]},{"name":"outAta","isMut":false,"isSigner":false,"docs":["The account to repay to"]},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"fulfillFlashFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInAta","isMut":false,"isSigner":false},{"name":"inAta","isMut":false,"isSigner":false},{"name":"outAta","isMut":false,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"feeAta","isMut":true,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u64"}]},{"name":"initiateDlmmFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"docs":["The token to borrow"]},{"name":"keeperInAta","isMut":true,"isSigner":false,"docs":["The account to send borrowed tokens to"]},{"name":"inAta","isMut":true,"isSigner":false,"docs":["The account to borrow from"]},{"name":"outAta","isMut":false,"isSigner":false,"docs":["The account to repay to"]},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"fulfillDlmmFill","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"keeperInAta","isMut":false,"isSigner":false},{"name":"inAta","isMut":false,"isSigner":false},{"name":"outAta","isMut":false,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"feeAta","isMut":true,"isSigner":false},{"name":"instructionsSysvar","isMut":false,"isSigner":false,"docs":["Solana Instructions Sysvar"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u64"}]},{"name":"transfer","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"dcaOutAta","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"intermediateAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"endAndClose","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"dca","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"inAta","isMut":true,"isSigner":false},{"name":"outAta","isMut":true,"isSigner":false},{"name":"user","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"initUserOutAta","isMut":true,"isSigner":false,"isOptional":true},{"name":"intermediateAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Dca","type":{"kind":"struct","fields":[{"name":"user","type":"publicKey"},{"name":"inputMint","type":"publicKey"},{"name":"outputMint","type":"publicKey"},{"name":"idx","type":"u64"},{"name":"nextCycleAt","type":"i64"},{"name":"inDeposited","type":"u64"},{"name":"inWithdrawn","type":"u64"},{"name":"outWithdrawn","type":"u64"},{"name":"inUsed","type":"u64"},{"name":"outReceived","type":"u64"},{"name":"inAmountPerCycle","type":"u64"},{"name":"cycleFrequency","type":"i64"},{"name":"nextCycleAmountLeft","type":"u64"},{"name":"inAccount","type":"publicKey"},{"name":"outAccount","type":"publicKey"},{"name":"minOutAmount","type":"u64"},{"name":"maxOutAmount","type":"u64"},{"name":"keeperInBalanceBeforeBorrow","type":"u64"},{"name":"dcaOutBalanceBeforeSwap","type":"u64"},{"name":"createdAt","type":"i64"},{"name":"bump","type":"u8"}]}}],"types":[{"name":"WithdrawParams","type":{"kind":"struct","fields":[{"name":"withdrawAmount","type":"u64"},{"name":"withdrawal","type":{"defined":"Withdrawal"}}]}},{"name":"Withdrawal","type":{"kind":"enum","variants":[{"name":"In"},{"name":"Out"}]}}],"events":[{"name":"CollectedFee","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"Filled","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"feeMint","type":"publicKey","index":false},{"name":"fee","type":"u64","index":false}]},{"name":"Opened","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"inDeposited","type":"u64","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"cycleFrequency","type":"i64","index":false},{"name":"inAmountPerCycle","type":"u64","index":false},{"name":"createdAt","type":"i64","index":false}]},{"name":"Closed","fields":[{"name":"userKey","type":"publicKey","index":false},{"name":"dcaKey","type":"publicKey","index":false},{"name":"inDeposited","type":"u64","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"cycleFrequency","type":"i64","index":false},{"name":"inAmountPerCycle","type":"u64","index":false},{"name":"createdAt","type":"i64","index":false},{"name":"totalInWithdrawn","type":"u64","index":false},{"name":"totalOutWithdrawn","type":"u64","index":false},{"name":"unfilledAmount","type":"u64","index":false},{"name":"userClosed","type":"bool","index":false}]},{"name":"Withdraw","fields":[{"name":"dcaKey","type":"publicKey","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"userWithdraw","type":"bool","index":false}]},{"name":"Deposit","fields":[{"name":"dcaKey","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"InvalidAmount","msg":"Invalid deposit amount"},{"code":6001,"name":"InvalidCycleAmount","msg":"Invalid deposit amount"},{"code":6002,"name":"InvalidPair","msg":"Invalid pair"},{"code":6003,"name":"TooFrequent","msg":"Too frequent DCA cycle"},{"code":6004,"name":"InvalidMinPrice","msg":"Minimum price constraint must be greater than 0"},{"code":6005,"name":"InvalidMaxPrice","msg":"Maximum price constraint must be greater than 0"},{"code":6006,"name":"InAmountInsufficient","msg":"In amount needs to be more than in amount per cycle"},{"code":6007,"name":"Unauthorized","msg":"Wrong user"},{"code":6008,"name":"NoInATA","msg":"inAta not passed in"},{"code":6009,"name":"NoUserInATA","msg":"userInAta not passed in"},{"code":6010,"name":"NoOutATA","msg":"outAta not passed in"},{"code":6011,"name":"NoUserOutATA","msg":"userOutAta not passed in"},{"code":6012,"name":"InsufficientBalanceInProgram","msg":"Trying to withdraw more than available"},{"code":6013,"name":"InvalidDepositAmount","msg":"Deposit should be more than 0"},{"code":6014,"name":"UserInsufficientBalance","msg":"User has insufficient balance"},{"code":6015,"name":"UnauthorizedKeeper","msg":"Unauthorized Keeper"},{"code":6016,"name":"UnrecognizedProgram","msg":"Unrecognized Program"},{"code":6017,"name":"MathErrors","msg":"Calculation errors"},{"code":6018,"name":"KeeperNotTimeToFill","msg":"Not time to fill"},{"code":6019,"name":"OrderFillAmountWrong","msg":"Order amount wrong"},{"code":6020,"name":"SwapOutAmountBelowMinimum","msg":"Out amount below expectations"},{"code":6021,"name":"WrongAdmin","msg":"Wrong admin"},{"code":6022,"name":"MathOverflow","msg":"Overflow in arithmetic operation"},{"code":6023,"name":"AddressMismatch","msg":"Address Mismatch"},{"code":6024,"name":"ProgramMismatch","msg":"Program Mismatch"},{"code":6025,"name":"IncorrectRepaymentAmount","msg":"Incorrect Repayment Amount"},{"code":6026,"name":"CannotBorrowBeforeRepay","msg":"Cannot Borrow Before Repay"},{"code":6027,"name":"NoRepaymentInstructionFound","msg":"No Repayment Found"},{"code":6028,"name":"MissingSwapInstructions","msg":"Missing Swap Instruction"},{"code":6029,"name":"UnexpectedSwapProgram","msg":"Expected Instruction to use Jupiter Swap Program"},{"code":6030,"name":"InvalidSwapMint","msg":"Invalid Swap Mint"},{"code":6031,"name":"UnknownInstruction","msg":"Unknown Instruction"},{"code":6032,"name":"MissingRepayInstructions","msg":"Missing Repay Instruction"},{"code":6033,"name":"KeeperShortchanged","msg":"Keeper Shortchanged"},{"code":6034,"name":"WrongSwapOutAccount","msg":"Jup Swap to Wrong Out Account"},{"code":6035,"name":"WrongTransferAmount","msg":"Transfer amount should be exactly account balance"},{"code":6036,"name":"InsufficientBalanceForRent","msg":"Insufficient balance for rent"},{"code":6037,"name":"UnexpectedSolBalance","msg":"Unexpected SOL amount in intermediate account"},{"code":6038,"name":"InsufficientWsolForTransfer","msg":"Too little WSOL to perform transfer"},{"code":6039,"name":"MissedInstruction","msg":"Did not call initiate_flash_fill"},{"code":6040,"name":"WrongProgram","msg":"Did not call this program's initiate_flash_fill"},{"code":6041,"name":"BalanceNotZero","msg":"Can't close account with balance"},{"code":6042,"name":"UnexpectedWSOLLeftover","msg":"Should not have WSOL leftover in DCA out-token account"},{"code":6043,"name":"IntermediateAccountNotSet","msg":"Should pass in a WSOL intermediate account when transferring SOL"},{"code":6044,"name":"UnexpectedSwapInstruction","msg":"Did not call jup swap"},{"code":6045,"name":"SwapOutLessThanUserMinimum","msg":"Expect more from swap"},{"code":6046,"name":"SwapOutMoreThanUserMaximum","msg":"Expect less from swap"}]} \ No newline at end of file diff --git a/idls/jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json b/idls/jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json new file mode 100644 index 0000000..1f67468 --- /dev/null +++ b/idls/jupiter_limit_order.jupoNjAxXgZ4rjzxzPMP4oxduvQsQtZzyknqvzYNrNu.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"limit_order","instructions":[{"name":"initializeOrder","accounts":[{"name":"base","isMut":false,"isSigner":true},{"name":"maker","isMut":true,"isSigner":true},{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CHECK"]},{"name":"makerInputAccount","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"makerOutputAccount","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"makingAmount","type":"u64"},{"name":"takingAmount","type":"u64"},{"name":"expiredAt","type":{"option":"i64"}}]},{"name":"fillOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"maker","isMut":true,"isSigner":false},{"name":"taker","isMut":false,"isSigner":true},{"name":"takerOutputAccount","isMut":true,"isSigner":false},{"name":"makerOutputAccount","isMut":true,"isSigner":false},{"name":"takerInputAccount","isMut":true,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false},{"name":"programFeeAccount","isMut":true,"isSigner":false},{"name":"referral","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"makingAmount","type":"u64"},{"name":"maxTakingAmount","type":"u64"}]},{"name":"preFlashFillOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"taker","isMut":false,"isSigner":true},{"name":"takerOutputAccount","isMut":true,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"inputMintTokenProgram","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"makingAmount","type":"u64"}]},{"name":"flashFillOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"maker","isMut":true,"isSigner":false},{"name":"taker","isMut":false,"isSigner":true},{"name":"makerOutputAccount","isMut":true,"isSigner":false},{"name":"takerInputAccount","isMut":true,"isSigner":false},{"name":"feeAuthority","isMut":false,"isSigner":false},{"name":"programFeeAccount","isMut":true,"isSigner":false},{"name":"referral","isMut":true,"isSigner":false,"isOptional":true},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"inputMintTokenProgram","isMut":false,"isSigner":false},{"name":"outputMint","isMut":false,"isSigner":false},{"name":"outputMintTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxTakingAmount","type":"u64"}]},{"name":"cancelOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CHECK"]},{"name":"maker","isMut":true,"isSigner":true},{"name":"makerInputAccount","isMut":true,"isSigner":false,"docs":["CHECK, it is not important if it is sol input mint"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"cancelExpiredOrder","accounts":[{"name":"order","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CHECK"]},{"name":"maker","isMut":true,"isSigner":false},{"name":"makerInputAccount","isMut":true,"isSigner":false,"docs":["CHECK, it is not important if it is sol input mint"]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"withdrawFee","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["CHECK"]},{"name":"programFeeAccount","isMut":true,"isSigner":false},{"name":"adminTokenAcocunt","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"initFee","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"feeAuthority","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"makerFee","type":"u64"},{"name":"makerStableFee","type":"u64"},{"name":"takerFee","type":"u64"},{"name":"takerStableFee","type":"u64"}]},{"name":"updateFee","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"feeAuthority","isMut":true,"isSigner":false}],"args":[{"name":"makerFee","type":"u64"},{"name":"makerStableFee","type":"u64"},{"name":"takerFee","type":"u64"},{"name":"takerStableFee","type":"u64"}]}],"accounts":[{"name":"Fee","type":{"kind":"struct","fields":[{"name":"makerFee","type":"u64"},{"name":"makerStableFee","type":"u64"},{"name":"takerFee","type":"u64"},{"name":"takerStableFee","type":"u64"}]}},{"name":"Order","type":{"kind":"struct","fields":[{"name":"maker","type":"publicKey"},{"name":"inputMint","type":"publicKey"},{"name":"outputMint","type":"publicKey"},{"name":"waiting","type":"bool"},{"name":"oriMakingAmount","type":"u64"},{"name":"oriTakingAmount","type":"u64"},{"name":"makingAmount","type":"u64"},{"name":"takingAmount","type":"u64"},{"name":"makerInputAccount","type":"publicKey"},{"name":"makerOutputAccount","type":"publicKey"},{"name":"reserve","type":"publicKey"},{"name":"borrowMakingAmount","type":"u64"},{"name":"expiredAt","type":{"option":"i64"}},{"name":"base","type":"publicKey"},{"name":"referral","type":{"option":"publicKey"}}]}}],"events":[{"name":"TradeEvent","fields":[{"name":"orderKey","type":"publicKey","index":false},{"name":"taker","type":"publicKey","index":false},{"name":"remainingInAmount","type":"u64","index":false},{"name":"remainingOutAmount","type":"u64","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false}]},{"name":"CancelOrderEvent","fields":[{"name":"orderKey","type":"publicKey","index":false}]},{"name":"CreateOrderEvent","fields":[{"name":"orderKey","type":"publicKey","index":false},{"name":"maker","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"expiredAt","type":{"option":"i64"},"index":false}]}],"errors":[{"code":6000,"name":"InvalidMakingAmount"},{"code":6001,"name":"InvalidTakingAmount"},{"code":6002,"name":"InvalidMaxTakingAmount"},{"code":6003,"name":"InvalidCalculation"},{"code":6004,"name":"InvalidInputAccount"},{"code":6005,"name":"InvalidOutputAccount"},{"code":6006,"name":"InvalidPair"},{"code":6007,"name":"MissingReferral"},{"code":6008,"name":"OrderExpired"},{"code":6009,"name":"OrderNotExpired"},{"code":6010,"name":"InvalidKeeper"},{"code":6011,"name":"MathOverflow"},{"code":6012,"name":"ProgramMismatch"},{"code":6013,"name":"UnknownInstruction"},{"code":6014,"name":"MissingRepayInstructions"},{"code":6015,"name":"InvalidOrder"},{"code":6016,"name":"InvalidBorrowMakingAmount"}]} \ No newline at end of file diff --git a/idls/jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json b/idls/jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json new file mode 100644 index 0000000..4d7c8c5 --- /dev/null +++ b/idls/jupiter_limit_order_v2.j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X.json @@ -0,0 +1 @@ +{"address":"j1o2qRpjcyUwEvwtcfhEQefh773ZgjxcVRry7LDqg5X","metadata":{"name":"limit_order_2","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"cancel_dust_order","discriminator":[197,112,189,164,79,48,23,246],"accounts":[{"name":"signer","signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"maker_input_mint_account","writable":true},{"name":"input_mint"},{"name":"input_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"params","type":{"defined":{"name":"CancelDustOrderParams"}}}]},{"name":"cancel_order","discriminator":[95,129,237,240,8,49,223,132],"accounts":[{"name":"signer","signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"maker_input_mint_account","writable":true,"optional":true},{"name":"input_mint"},{"name":"input_token_program"},{"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":"fill_order","discriminator":[232,122,115,25,199,143,136,162],"accounts":[{"name":"taker","writable":true,"signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"taker_input_mint_account","writable":true},{"name":"taker_output_mint_account","writable":true},{"name":"maker_output_mint_account","writable":true,"optional":true},{"name":"fee_account","writable":true},{"name":"order_input_mint_account","writable":true},{"name":"input_mint"},{"name":"input_token_program"},{"name":"output_mint"},{"name":"output_token_program"},{"name":"jupiter_program","address":"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"FillOrderParams"}}}]},{"name":"flash_fill_order","discriminator":[252,104,18,134,164,78,18,140],"accounts":[{"name":"taker","writable":true,"signer":true},{"name":"maker","writable":true,"relations":["order"]},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"maker_output_mint_account","writable":true,"optional":true},{"name":"taker_output_mint_account","writable":true,"optional":true},{"name":"fee_account","writable":true},{"name":"input_token_program"},{"name":"output_mint"},{"name":"output_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"FlashFillOrderParams"}}}]},{"name":"initialize_order","discriminator":[133,110,74,175,112,159,245,159],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"maker","signer":true},{"name":"order","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,100,101,114]},{"kind":"account","path":"maker"},{"kind":"arg","path":"unique_id"}]}},{"name":"input_mint_reserve","writable":true,"pda":{"seeds":[{"kind":"account","path":"order"},{"kind":"account","path":"input_token_program"},{"kind":"account","path":"input_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"maker_input_mint_account","writable":true},{"name":"fee","pda":{"seeds":[{"kind":"const","value":[102,101,101]}]}},{"name":"referral","optional":true},{"name":"input_mint"},{"name":"output_mint"},{"name":"input_token_program"},{"name":"output_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"params","type":{"defined":{"name":"InitializeOrderParams"}}}]},{"name":"pre_flash_fill_order","discriminator":[240,47,153,68,13,190,225,42],"accounts":[{"name":"taker","signer":true},{"name":"order","writable":true},{"name":"input_mint_reserve","writable":true},{"name":"taker_input_mint_account","writable":true},{"name":"input_mint"},{"name":"input_token_program"},{"name":"instruction","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"PreFlashFillOrderParams"}}}]},{"name":"update_fee","discriminator":[232,253,195,247,148,212,73,222],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"fee_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"UpdateFeeParams"}}}]},{"name":"withdraw_fee","discriminator":[14,122,231,218,31,238,223,150],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"fee_authority","docs":["CHECK"],"pda":{"seeds":[{"kind":"const","value":[102,101,101]}]}},{"name":"program_fee_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"token_program"},{"name":"mint"}],"args":[]}],"accounts":[{"name":"Fee","discriminator":[24,55,150,250,168,27,101,178]},{"name":"Order","discriminator":[134,173,223,185,77,86,28,51]}],"events":[{"name":"CancelDustOrderEvent","discriminator":[124,190,74,28,177,40,200,220]},{"name":"CancelOrderEvent","discriminator":[174,66,141,17,4,224,162,77]},{"name":"CreateOrderEvent","discriminator":[49,142,72,166,230,29,84,84]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]}],"errors":[{"code":6000,"name":"InvalidMakingAmount"},{"code":6001,"name":"InvalidTakingAmount"},{"code":6002,"name":"InvalidMaxTakingAmount"},{"code":6003,"name":"InvalidInputAccount"},{"code":6004,"name":"InvalidMakerOutputAccount"},{"code":6005,"name":"InvalidTakerOutputAccount"},{"code":6006,"name":"InvalidPair"},{"code":6007,"name":"OrderExpired"},{"code":6008,"name":"OrderNotExpired"},{"code":6009,"name":"InvalidAdmin"},{"code":6010,"name":"InvalidKeeper"},{"code":6011,"name":"MathOverflow"},{"code":6012,"name":"ProgramMismatch"},{"code":6013,"name":"UnknownInstruction"},{"code":6014,"name":"MissingRepayInstructions"},{"code":6015,"name":"InvalidOrder"},{"code":6016,"name":"InvalidBorrowMakingAmount"},{"code":6017,"name":"InvalidExpiredDate"},{"code":6018,"name":"FeeBpsTooLow"},{"code":6019,"name":"FeeBpsTooHigh"},{"code":6020,"name":"TransferTaxMint"},{"code":6021,"name":"InvalidOutputMint"},{"code":6022,"name":"InvalidMinTakingAmount"},{"code":6023,"name":"InvalidSwapData"},{"code":6024,"name":"InvalidSwapInputAmount"},{"code":6025,"name":"InvalidSwappedAmount"},{"code":6026,"name":"InvalidDustOrder"},{"code":6027,"name":"UnsupportedMint"}],"types":[{"name":"CancelDustOrderEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"},{"name":"one_usd_input_mint_amount","type":"u64"}]}},{"name":"CancelDustOrderParams","type":{"kind":"struct","fields":[{"name":"one_usd_input_mint_amount","type":"u64"}]}},{"name":"CancelOrderEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"}]}},{"name":"CreateOrderEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"},{"name":"maker","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"output_mint","type":"pubkey"},{"name":"input_token_program","type":"pubkey"},{"name":"output_token_program","type":"pubkey"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"},{"name":"expired_at","type":{"option":"i64"}},{"name":"fee_bps","type":"u16"},{"name":"fee_account","type":"pubkey"},{"name":"slippage_bps","type":"u16"}]}},{"name":"Fee","type":{"kind":"struct","fields":[{"name":"normal_fee_bps","type":"u16"},{"name":"stable_fee_bps","type":"u16"}]}},{"name":"FillOrderParams","type":{"kind":"struct","fields":[{"name":"input_amount","type":"u64"},{"name":"swap_data","type":"bytes"}]}},{"name":"FlashFillOrderParams","type":{"kind":"struct","fields":[{"name":"max_taking_amount","type":"u64"}]}},{"name":"InitializeOrderParams","type":{"kind":"struct","fields":[{"name":"unique_id","type":"u64"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"},{"name":"expired_at","type":{"option":"i64"}},{"name":"fee_bps","type":{"option":"u16"}},{"name":"slippage_bps","type":{"option":"u16"}}]}},{"name":"Order","type":{"kind":"struct","fields":[{"name":"maker","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"output_mint","type":"pubkey"},{"name":"input_token_program","type":"pubkey"},{"name":"output_token_program","type":"pubkey"},{"name":"input_mint_reserve","type":"pubkey"},{"name":"unique_id","type":"u64"},{"name":"ori_making_amount","type":"u64"},{"name":"ori_taking_amount","type":"u64"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"},{"name":"borrow_making_amount","type":"u64"},{"name":"expired_at","type":{"option":"i64"}},{"name":"fee_bps","type":"u16"},{"name":"fee_account","type":"pubkey"},{"name":"created_at","type":"i64"},{"name":"updated_at","type":"i64"},{"name":"bump","type":"u8"},{"name":"slippage_bps","type":"u16"}]}},{"name":"PreFlashFillOrderParams","type":{"kind":"struct","fields":[{"name":"making_amount","type":"u64"}]}},{"name":"TradeEvent","type":{"kind":"struct","fields":[{"name":"order_key","type":"pubkey"},{"name":"taker","type":"pubkey"},{"name":"remaining_making_amount","type":"u64"},{"name":"remaining_taking_amount","type":"u64"},{"name":"making_amount","type":"u64"},{"name":"taking_amount","type":"u64"}]}},{"name":"UpdateFeeParams","type":{"kind":"struct","fields":[{"name":"normal_fee_bps","type":"u16"},{"name":"stable_fee_bps","type":"u16"}]}}]} \ No newline at end of file diff --git a/idls/jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json b/idls/jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json new file mode 100644 index 0000000..fbbf423 --- /dev/null +++ b/idls/jupiter_locker.LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn.json @@ -0,0 +1 @@ +{"address":"LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn","metadata":{"name":"locker","version":"0.4.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"cancel_vesting_escrow","docs":["Cancel a vesting escrow.","- The claimable token will be transferred to recipient","- The remaining token will be transferred to the creator","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[217,233,13,3,143,101,53,201],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"token_mint","docs":["Mint."],"writable":true,"relations":["escrow"]},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"creator_token","docs":["Creator Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient_token","docs":["Receipient Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"rent_receiver","docs":["CHECKED: The Token Account will receive the rent"],"writable":true},{"name":"signer","docs":["Signer."],"writable":true,"signer":true},{"name":"memo_program","docs":["Memo program."],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"token_program","docs":["Token program."]},{"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":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"claim","docs":["Claim maximum amount from the vesting escrow","# Arguments","","* ctx - The accounts needed by instruction.","* max_amount - The maximum amount claimed by the recipient",""],"discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"escrow"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient","docs":["Recipient."],"writable":true,"signer":true,"relations":["escrow"]},{"name":"recipient_token","docs":["Recipient Token Account."],"writable":true},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"max_amount","type":"u64"}]},{"name":"claim_v2","docs":["Claim maximum amount from the vesting escrow","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* max_amount - The maximum amount claimed by the recipient","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[229,87,46,162,21,157,231,114],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"token_mint","docs":["Mint."],"relations":["escrow"]},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"recipient","docs":["Recipient."],"writable":true,"signer":true,"relations":["escrow"]},{"name":"recipient_token","docs":["Recipient Token Account."],"writable":true},{"name":"memo_program","docs":["Memo program."],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"token_program","docs":["Token program."]},{"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":"max_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"close_vesting_escrow","docs":["Close vesting escrow","- Close vesting escrow and escrow ATA and escrow metadata if recipient already claimed all tokens","- Rent receiver must be escrow's creator","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[221,185,95,135,136,67,252,87],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"escrow_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"escrow"}]}},{"name":"token_mint","docs":["Mint."],"writable":true},{"name":"escrow_token","writable":true},{"name":"creator_token","writable":true},{"name":"creator","docs":["Creator."],"writable":true,"signer":true,"relations":["escrow"]},{"name":"token_program","docs":["Token program."]},{"name":"memo_program","docs":["Memo program."],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"create_root_escrow","docs":["Create root escrow"],"discriminator":[116,212,12,188,77,226,32,201],"accounts":[{"name":"base","signer":true},{"name":"root_escrow","docs":["Root Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[114,111,111,116,95,101,115,99,114,111,119]},{"kind":"account","path":"base"},{"kind":"account","path":"token_mint"},{"kind":"arg","path":"params.version"}]}},{"name":"token_mint"},{"name":"payer","docs":["payer."],"writable":true,"signer":true},{"name":"creator"},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"CreateRootEscrowParameters"}}}]},{"name":"create_vesting_escrow","docs":["Create a vesting escrow for the given params","# Arguments","","* ctx - The accounts needed by instruction.","* params - The params needed by instruction.","* vesting_start_time - The creation time of this escrow","* cliff_time - Trade cliff time of the escrow","* frequency - How frequent the claimable amount will be updated","* cliff_unlock_amount - The amount unlocked after cliff time","* amount_per_period - The amount unlocked per vesting period","* number_of_period - The total number of vesting period","* update_recipient_mode - Decide who can update the recipient of the escrow","* cancel_mode - Decide who can cancel the the escrow",""],"discriminator":[23,100,197,94,222,153,38,90],"accounts":[{"name":"base","docs":["Base."],"writable":true,"signer":true},{"name":"escrow","docs":["Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119]},{"kind":"account","path":"base"}]}},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"sender_token.mint","account":"TokenAccount"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"sender","docs":["Sender."],"writable":true,"signer":true},{"name":"sender_token","docs":["Sender Token Account."],"writable":true},{"name":"recipient"},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"CreateVestingEscrowParameters"}}}]},{"name":"create_vesting_escrow_from_root","docs":["Crate vesting escrow from root"],"discriminator":[6,238,161,108,252,114,246,91],"accounts":[{"name":"root_escrow","docs":["Root Escrow."],"writable":true},{"name":"base","pda":{"seeds":[{"kind":"const","value":[98,97,115,101]},{"kind":"account","path":"root_escrow"},{"kind":"account","path":"recipient"}]}},{"name":"escrow","docs":["Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119]},{"kind":"account","path":"base"}]}},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"root_escrow_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"root_escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_mint","docs":["Mint."],"relations":["root_escrow"]},{"name":"payer","docs":["Rent Payer"],"writable":true,"signer":true},{"name":"recipient"},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token program."]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"params","type":{"defined":{"name":"CreateVestingEscrowFromRootParams"}}},{"name":"proof","type":{"vec":{"array":["u8",32]}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"create_vesting_escrow_metadata","docs":["Create vesting escrow metadata","# Arguments","","* ctx - The accounts needed by instruction.","* params - The params needed by instruction.","* name - The name of the vesting escrow","* description - The description of the vesting escrow","* creator_email - The email of the creator","* recipient_email - The email of the recipient",""],"discriminator":[93,78,33,103,173,125,70,0],"accounts":[{"name":"escrow","docs":["The [Escrow]."],"writable":true},{"name":"creator","docs":["Creator of the escrow."],"signer":true,"relations":["escrow"]},{"name":"escrow_metadata","docs":["The [ProposalMeta]."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"escrow"}]}},{"name":"payer","docs":["Payer of the [ProposalMeta]."],"writable":true,"signer":true},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"CreateVestingEscrowMetadataParameters"}}}]},{"name":"create_vesting_escrow_v2","docs":["Create a vesting escrow for the given params","This instruction supports both splToken and token2022","# Arguments","","* ctx - The accounts needed by instruction.","* params - The params needed by instruction.","* vesting_start_time - The creation time of this escrow","* cliff_time - Trade cliff time of the escrow","* frequency - How frequent the claimable amount will be updated","* cliff_unlock_amount - The amount unlocked after cliff time","* amount_per_period - The amount unlocked per vesting period","* number_of_period - The total number of vesting period","* update_recipient_mode - Decide who can update the recipient of the escrow","* cancel_mode - Decide who can cancel the the escrow","* remaining_accounts_info: additional accounts needed by instruction",""],"discriminator":[181,155,104,183,182,128,35,47],"accounts":[{"name":"base","docs":["Base."],"writable":true,"signer":true},{"name":"escrow","docs":["Escrow."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,115,99,114,111,119]},{"kind":"account","path":"base"}]}},{"name":"token_mint"},{"name":"escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"sender","docs":["Sender."],"writable":true,"signer":true},{"name":"sender_token","docs":["Sender Token Account."],"writable":true},{"name":"recipient"},{"name":"token_program","docs":["Token program."]},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"CreateVestingEscrowParameters"}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"fund_root_escrow","docs":["Fund root escrow"],"discriminator":[251,106,189,200,108,15,144,95],"accounts":[{"name":"root_escrow","docs":["Root Escrow."],"writable":true},{"name":"token_mint","relations":["root_escrow"]},{"name":"root_escrow_token","docs":["Escrow Token Account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"root_escrow"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"payer","docs":["Payer."],"writable":true,"signer":true},{"name":"payer_token","docs":["Payer Token Account."],"writable":true},{"name":"token_program","docs":["Token program."]},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"max_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"update_vesting_escrow_recipient","docs":["Update vesting escrow metadata","# Arguments","","* ctx - The accounts needed by instruction.","* new_recipient - The address of the new recipient","* new_recipient_email - The email of the new recipient",""],"discriminator":[26,242,127,255,237,109,47,206],"accounts":[{"name":"escrow","docs":["Escrow."],"writable":true},{"name":"escrow_metadata","docs":["Escrow metadata."],"writable":true,"optional":true},{"name":"signer","docs":["Signer."],"writable":true,"signer":true},{"name":"system_program","docs":["system program."],"address":"11111111111111111111111111111111"},{"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":"new_recipient","type":"pubkey"},{"name":"new_recipient_email","type":{"option":"string"}}]}],"accounts":[{"name":"RootEscrow","discriminator":[253,209,220,107,206,191,71,158]},{"name":"VestingEscrow","discriminator":[244,119,183,4,73,116,135,195]},{"name":"VestingEscrowMetadata","discriminator":[24,204,166,104,87,158,76,13]}],"events":[{"name":"EventCancelVestingEscrow","discriminator":[113,2,117,173,195,39,101,155]},{"name":"EventCancelVestingEscrowV3","discriminator":[41,143,236,79,116,120,91,143]},{"name":"EventClaim","discriminator":[171,144,1,189,120,200,38,11]},{"name":"EventClaimV3","discriminator":[229,197,142,10,41,122,171,154]},{"name":"EventCloseClaimStatus","discriminator":[87,68,38,194,241,155,125,107]},{"name":"EventCloseVestingEscrow","discriminator":[45,141,253,209,196,133,21,204]},{"name":"EventCreateRootEscrow","discriminator":[105,216,97,182,27,224,199,228]},{"name":"EventCreateVestingEscrow","discriminator":[248,222,89,61,170,208,131,117]},{"name":"EventFundRootEscrow","discriminator":[74,8,68,181,198,235,138,81]},{"name":"EventUpdateVestingEscrowRecipient","discriminator":[206,218,33,65,133,237,131,57]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"FrequencyIsZero","msg":"Frequency is zero"},{"code":6002,"name":"InvalidEscrowTokenAddress","msg":"Invalid escrow token address"},{"code":6003,"name":"InvalidUpdateRecipientMode","msg":"Invalid update recipient mode"},{"code":6004,"name":"InvalidCancelMode","msg":"Invalid cancel mode"},{"code":6005,"name":"NotPermitToDoThisAction","msg":"Not permit to do this action"},{"code":6006,"name":"InvalidRecipientTokenAccount","msg":"Invalid recipient token account"},{"code":6007,"name":"InvalidCreatorTokenAccount","msg":"Invalid creator token account"},{"code":6008,"name":"InvalidEscrowMetadata","msg":"Invalid escrow metadata"},{"code":6009,"name":"InvalidVestingStartTime","msg":"Invalid vesting start time"},{"code":6010,"name":"AlreadyCancelled","msg":"Already cancelled"},{"code":6011,"name":"CancelledAtIsZero","msg":"Cancelled timestamp is zero"},{"code":6012,"name":"IncorrectTokenProgramId","msg":"Invalid token program ID"},{"code":6013,"name":"TransferFeeCalculationFailure","msg":"Calculate transfer fee failure"},{"code":6014,"name":"UnsupportedMint","msg":"Unsupported mint"},{"code":6015,"name":"InvalidRemainingAccountSlice","msg":"Invalid remaining accounts"},{"code":6016,"name":"InsufficientRemainingAccounts","msg":"Insufficient remaining accounts"},{"code":6017,"name":"DuplicatedRemainingAccountTypes","msg":"Same accounts type is provided more than once"},{"code":6018,"name":"NoTransferHookProgram","msg":"Missing remaining accounts for transfer hook."},{"code":6019,"name":"ClaimingIsNotFinished","msg":"Claiming is not finished"},{"code":6020,"name":"InvalidMerkleProof","msg":"Invalid merkle proof"},{"code":6021,"name":"EscrowNotCancelled","msg":"Escrow is not cancelled"},{"code":6022,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6023,"name":"InvalidParams","msg":"Invalid params"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookEscrow"}]}},{"name":"CreateRootEscrowParameters","type":{"kind":"struct","fields":[{"name":"max_claim_amount","type":"u64"},{"name":"max_escrow","type":"u64"},{"name":"version","type":"u64"},{"name":"root","type":{"array":["u8",32]}}]}},{"name":"CreateVestingEscrowFromRootParams","type":{"kind":"struct","fields":[{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"update_recipient_mode","type":"u8"},{"name":"cancel_mode","type":"u8"}]}},{"name":"CreateVestingEscrowMetadataParameters","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"description","type":"string"},{"name":"creator_email","type":"string"},{"name":"recipient_email","type":"string"}]}},{"name":"CreateVestingEscrowParameters","docs":["Accounts for [locker::create_vesting_escrow]."],"type":{"kind":"struct","fields":[{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"update_recipient_mode","type":"u8"},{"name":"cancel_mode","type":"u8"}]}},{"name":"EventCancelVestingEscrow","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"signer","type":"pubkey"},{"name":"claimable_amount","type":"u64"},{"name":"remaining_amount","type":"u64"},{"name":"cancelled_at","type":"u64"}]}},{"name":"EventCancelVestingEscrowV3","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"signer","type":"pubkey"},{"name":"remaining_amount","type":"u64"},{"name":"cancelled_at","type":"u64"}]}},{"name":"EventClaim","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"current_ts","type":"u64"},{"name":"escrow","type":"pubkey"}]}},{"name":"EventClaimV3","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"current_ts","type":"u64"},{"name":"escrow","type":"pubkey"},{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"recipient","type":"pubkey"}]}},{"name":"EventCloseClaimStatus","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"recipient","type":"pubkey"},{"name":"rent_receiver","type":"pubkey"}]}},{"name":"EventCloseVestingEscrow","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"}]}},{"name":"EventCreateRootEscrow","type":{"kind":"struct","fields":[{"name":"root_escrow","type":"pubkey"},{"name":"max_claim_amount","type":"u64"},{"name":"max_escrow","type":"u64"},{"name":"version","type":"u64"},{"name":"root","type":{"array":["u8",32]}}]}},{"name":"EventCreateVestingEscrow","type":{"kind":"struct","fields":[{"name":"vesting_start_time","type":"u64"},{"name":"cliff_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"amount_per_period","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"update_recipient_mode","type":"u8"},{"name":"cancel_mode","type":"u8"},{"name":"recipient","type":"pubkey"},{"name":"escrow","type":"pubkey"}]}},{"name":"EventFundRootEscrow","type":{"kind":"struct","fields":[{"name":"root_escrow","type":"pubkey"},{"name":"funded_amount","type":"u64"}]}},{"name":"EventUpdateVestingEscrowRecipient","type":{"kind":"struct","fields":[{"name":"escrow","type":"pubkey"},{"name":"old_recipient","type":"pubkey"},{"name":"new_recipient","type":"pubkey"},{"name":"signer","type":"pubkey"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"RootEscrow","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"creator","docs":["creator of the escrow"],"type":"pubkey"},{"name":"base","docs":["escrow base key"],"type":"pubkey"},{"name":"root","docs":["256 bit merkle root"],"type":{"array":["u8",32]}},{"name":"bump","docs":["bump"],"type":"u8"},{"name":"token_program_flag","docs":["token program flag"],"type":"u8"},{"name":"padding_0","docs":["padding"],"type":{"array":["u8",6]}},{"name":"max_claim_amount","docs":["max claim amount"],"type":"u64"},{"name":"max_escrow","docs":["max escrow"],"type":"u64"},{"name":"total_funded_amount","docs":["total funded amount"],"type":"u64"},{"name":"total_escrow_created","docs":["total escrow created"],"type":"u64"},{"name":"total_distribute_amount","docs":["total distributed amount"],"type":"u64"},{"name":"version","docs":["version"],"type":"u64"},{"name":"padding","docs":["padding"],"type":"u64"},{"name":"buffer","docs":["buffer"],"type":{"array":["u128",5]}}]}},{"name":"VestingEscrow","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"recipient","docs":["recipient address"],"type":"pubkey"},{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"creator","docs":["creator of the escrow"],"type":"pubkey"},{"name":"base","docs":["escrow base key"],"type":"pubkey"},{"name":"escrow_bump","docs":["escrow bump"],"type":"u8"},{"name":"update_recipient_mode","docs":["update_recipient_mode"],"type":"u8"},{"name":"cancel_mode","docs":["cancel_mode"],"type":"u8"},{"name":"token_program_flag","docs":["token program flag"],"type":"u8"},{"name":"padding_0","docs":["padding"],"type":{"array":["u8",4]}},{"name":"cliff_time","docs":["cliff time"],"type":"u64"},{"name":"frequency","docs":["frequency"],"type":"u64"},{"name":"cliff_unlock_amount","docs":["cliff unlock amount"],"type":"u64"},{"name":"amount_per_period","docs":["amount per period"],"type":"u64"},{"name":"number_of_period","docs":["number of period"],"type":"u64"},{"name":"total_claimed_amount","docs":["total claimed amount"],"type":"u64"},{"name":"vesting_start_time","docs":["vesting start time"],"type":"u64"},{"name":"cancelled_at","docs":["cancelled_at"],"type":"u64"},{"name":"padding_1","docs":["buffer"],"type":"u64"},{"name":"buffer","docs":["buffer"],"type":{"array":["u128",5]}}]}},{"name":"VestingEscrowMetadata","docs":["Metadata about an escrow."],"type":{"kind":"struct","fields":[{"name":"escrow","docs":["The [Escrow]."],"type":"pubkey"},{"name":"name","docs":["Name of escrow."],"type":"string"},{"name":"description","docs":["Description of escrow."],"type":"string"},{"name":"creator_email","docs":["Email of creator"],"type":"string"},{"name":"recipient_email","docs":["Email of recipient"],"type":"string"}]}}]} \ No newline at end of file diff --git a/idls/jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json b/idls/jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json new file mode 100644 index 0000000..f6b69b0 --- /dev/null +++ b/idls/jupiter_perpetuals.PERPHjGBqRHArX4DySjwM6UJHiR3sWAatqfdBS2qQJu.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"perpetuals","instructions":[{"name":"init","accounts":[{"name":"upgradeAuthority","isMut":true,"isSigner":true},{"name":"admin","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false},{"name":"perpetualsProgram","isMut":false,"isSigner":false},{"name":"perpetualsProgramData","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitParams"}}]},{"name":"addPool","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddPoolParams"}}]},{"name":"addCustody","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"custodyTokenMint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddCustodyParams"}}]},{"name":"setCustodyConfig","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetCustodyConfigParams"}}]},{"name":"setPoolConfig","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetPoolConfigParams"}}]},{"name":"setPerpetualsConfig","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetPerpetualsConfigParams"}}]},{"name":"transferAdmin","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TransferAdminParams"}}]},{"name":"withdrawFees2","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"receivingTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawFees2Params"}}]},{"name":"createTokenMetadata","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateTokenMetadataParams"}}]},{"name":"createTokenLedger","accounts":[{"name":"tokenLedger","isMut":true,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"reallocCustody","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"custody","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"reallocPool","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"pool","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"createAndDelegateStakeAccount","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false},{"name":"validatorVoteAccount","isMut":false,"isSigner":false},{"name":"stakeConfig","isMut":false,"isSigner":false},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"tempWsolAccount","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateAndDelegateStakeAccountParams"}}]},{"name":"unstake","accounts":[{"name":"operator","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawStake","accounts":[{"name":"keeper","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"redeemStake","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":false,"isSigner":false},{"name":"stakeInfo","isMut":true,"isSigner":false}],"args":[]},{"name":"operatorSetCustodyConfig","accounts":[{"name":"operator","isMut":false,"isSigner":true},{"name":"custody","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"OperatorSetCustodyConfigParams"}}]},{"name":"operatorSetPoolConfig","accounts":[{"name":"operator","isMut":false,"isSigner":true},{"name":"pool","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"OperatorSetPoolConfigParams"}}]},{"name":"testInit","accounts":[{"name":"upgradeAuthority","isMut":true,"isSigner":true},{"name":"admin","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TestInitParams"}}]},{"name":"setTestTime","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetTestTimeParams"}}]},{"name":"setTokenLedger","accounts":[{"name":"tokenLedger","isMut":true,"isSigner":false},{"name":"tokenAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"swap2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"Swap2Params"}}]},{"name":"swapWithTokenLedger","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenLedger","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SwapWithTokenLedgerParams"}}]},{"name":"instantIncreasePositionPreSwap","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantIncreasePositionPreSwapParams"}}]},{"name":"addLiquidity2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"lpTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AddLiquidity2Params"}}]},{"name":"removeLiquidity2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"lpTokenAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RemoveLiquidity2Params"}}]},{"name":"createIncreasePositionMarketRequest","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateIncreasePositionMarketRequestParams"}}]},{"name":"createDecreasePositionRequest2","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateDecreasePositionRequest2Params"}}]},{"name":"createDecreasePositionMarketRequest","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CreateDecreasePositionMarketRequestParams"}}]},{"name":"updateDecreasePositionRequest2","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UpdateDecreasePositionRequest2Params"}}]},{"name":"closePositionRequest2","accounts":[{"name":"keeper","isMut":true,"isSigner":true,"isOptional":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"ownerAta","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"closePositionRequest3","accounts":[{"name":"keeper","isMut":true,"isSigner":true,"isOptional":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"ownerAta","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"increasePosition4","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IncreasePosition4Params"}}]},{"name":"increasePositionPreSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"keeperAta","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":false,"isSigner":false},{"name":"instruction","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IncreasePositionPreSwapParams"}}]},{"name":"increasePositionWithInternalSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"receivingCustody","isMut":true,"isSigner":false},{"name":"receivingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"receivingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"IncreasePositionWithInternalSwapParams"}}]},{"name":"decreasePosition4","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePosition4Params"}}]},{"name":"decreasePositionWithInternalSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePositionWithInternalSwapParams"}}]},{"name":"decreasePositionWithTpsl","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePositionWithTpslParams"}}]},{"name":"decreasePositionWithTpslAndInternalSwap","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"dispensingCustody","isMut":true,"isSigner":false},{"name":"dispensingCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"dispensingCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DecreasePositionWithTpslAndInternalSwapParams"}}]},{"name":"liquidateFullPosition4","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LiquidateFullPosition4Params"}}]},{"name":"refreshAssetsUnderManagement","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RefreshAssetsUnderManagementParams"}}]},{"name":"setMaxGlobalSizes","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"custody","isMut":true,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetMaxGlobalSizesParams"}}]},{"name":"instantCreateTpsl","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantCreateTpslParams"}}]},{"name":"instantCreateLimitOrder","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":false,"isSigner":false},{"name":"inputMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantCreateLimitOrderParams"}}]},{"name":"instantIncreasePosition","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"fundingAccount","isMut":true,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"tokenLedger","isMut":false,"isSigner":false,"isOptional":true},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantIncreasePositionParams"}}]},{"name":"instantDecreasePosition","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantDecreasePositionParams"}}]},{"name":"instantDecreasePosition2","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"receivingAccount","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustody","isMut":true,"isSigner":false},{"name":"collateralCustodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"collateralCustodyTokenAccount","isMut":true,"isSigner":false},{"name":"desiredMint","isMut":false,"isSigner":false},{"name":"referral","isMut":false,"isSigner":false,"isOptional":true},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"positionRequestAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantDecreasePosition2Params"}}]},{"name":"instantUpdateLimitOrder","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantUpdateLimitOrderParams"}}]},{"name":"instantUpdateTpsl","accounts":[{"name":"keeper","isMut":false,"isSigner":true},{"name":"apiKeeper","isMut":false,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"positionRequest","isMut":true,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InstantUpdateTpslParams"}}]},{"name":"getAddLiquidityAmountAndFee2","accounts":[{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"GetAddLiquidityAmountAndFee2Params"}}],"returns":{"defined":"AmountAndFee"}},{"name":"getRemoveLiquidityAmountAndFee2","accounts":[{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"custodyDovesPriceAccount","isMut":false,"isSigner":false},{"name":"custodyPythnetPriceAccount","isMut":false,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"GetRemoveLiquidityAmountAndFee2Params"}}],"returns":{"defined":"AmountAndFee"}},{"name":"getAssetsUnderManagement2","accounts":[{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"GetAssetsUnderManagement2Params"}}],"returns":"u128"},{"name":"borrowFromCustody","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"BorrowFromCustodyParams"}}]},{"name":"repayToCustody","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"custodyTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RepayToCustodyParams"}}]},{"name":"depositCollateralForBorrows","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":false,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"DepositParams"}}]},{"name":"withdrawCollateralForBorrows","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawParams"}}]},{"name":"liquidateBorrowPosition","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LiquidateBorrowPositionParams"}}]},{"name":"partialLiquidateBorrowPosition","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"perpetuals","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"custody","isMut":true,"isSigner":false},{"name":"transferAuthority","isMut":false,"isSigner":false},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"collateralTokenAccount","isMut":true,"isSigner":false},{"name":"lpTokenMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"PartialLiquidateBorrowPositionParams"}}]},{"name":"closeBorrowPosition","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"borrowPosition","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"CloseBorrowPositionParams"}}]}],"accounts":[{"name":"BorrowPosition","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pool","type":"publicKey"},{"name":"custody","type":"publicKey"},{"name":"openTime","type":"i64"},{"name":"updateTime","type":"i64"},{"name":"borrowSize","type":"u128"},{"name":"cumulativeCompoundedInterestSnapshot","type":"u128"},{"name":"lockedCollateral","type":"u64"},{"name":"bump","type":"u8"},{"name":"lastBorrowed","type":"i64"}]}},{"name":"Custody","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"tokenAccount","type":"publicKey"},{"name":"decimals","type":"u8"},{"name":"isStable","type":"bool"},{"name":"oracle","type":{"defined":"OracleParams"}},{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"permissions","type":{"defined":"Permissions"}},{"name":"targetRatioBps","type":"u64"},{"name":"assets","type":{"defined":"Assets"}},{"name":"fundingRateState","type":{"defined":"FundingRateState"}},{"name":"bump","type":"u8"},{"name":"tokenAccountBump","type":"u8"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"dovesOracle","type":"publicKey"},{"name":"jumpRateState","type":{"defined":"JumpRateState"}},{"name":"dovesAgOracle","type":"publicKey"},{"name":"priceImpactBuffer","type":{"defined":"PriceImpactBuffer"}},{"name":"borrowLendParameters","type":{"defined":"BorrowLendParams"}},{"name":"borrowsFundingRateState","type":{"defined":"FundingRateState"}},{"name":"debt","type":"u128"},{"name":"borrowLendInterestsAccured","type":"u128"},{"name":"borrowLimitInTokenAmount","type":"u64"},{"name":"minInterestFeeBps","type":"u64"},{"name":"minInterestFeeGracePeriodSeconds","type":"u64"},{"name":"totalStakedAmountLamports","type":"u64"},{"name":"maxTotalStakedAmountLamports","type":"u64"},{"name":"externalSwapFeeMultiplierBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"withdrawalLimitTokenAmount","type":"u64"},{"name":"withdrawalTokenAmountAccumulated","type":"u64"},{"name":"withdrawalLimitLastResetAt","type":"i64"},{"name":"withdrawalLimitIntervalSeconds","type":"u64"}]}},{"name":"Perpetuals","type":{"kind":"struct","fields":[{"name":"permissions","type":{"defined":"Permissions"}},{"name":"pools","type":{"vec":"publicKey"}},{"name":"admin","type":"publicKey"},{"name":"transferAuthorityBump","type":"u8"},{"name":"perpetualsBump","type":"u8"},{"name":"inceptionTime","type":"i64"}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"custodies","type":{"vec":"publicKey"}},{"name":"aumUsd","type":"u128"},{"name":"limit","type":{"defined":"Limit"}},{"name":"fees","type":{"defined":"Fees"}},{"name":"poolApr","type":{"defined":"PoolApr"}},{"name":"maxRequestExecutionSec","type":"i64"},{"name":"bump","type":"u8"},{"name":"lpTokenBump","type":"u8"},{"name":"inceptionTime","type":"i64"},{"name":"parameterUpdateOracle","type":{"defined":"Secp256k1Pubkey"}},{"name":"aumUsdUpdatedAt","type":"i64"},{"name":"maxTriggerPriceDiffBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"maxLpTokenPriceChangeBps","type":"u64"},{"name":"aumUsdRefreshedAtSlot","type":"u64"}]}},{"name":"PositionRequest","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pool","type":"publicKey"},{"name":"custody","type":"publicKey"},{"name":"position","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"openTime","type":"i64"},{"name":"updateTime","type":"i64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralDelta","type":"u64"},{"name":"requestChange","type":{"defined":"RequestChange"}},{"name":"requestType","type":{"defined":"RequestType"}},{"name":"side","type":{"defined":"Side"}},{"name":"priceSlippage","type":{"option":"u64"}},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"preSwapAmount","type":{"option":"u64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerAboveThreshold","type":{"option":"bool"}},{"name":"entirePosition","type":{"option":"bool"}},{"name":"executed","type":"bool"},{"name":"counter","type":"u64"},{"name":"bump","type":"u8"},{"name":"referral","type":{"option":"publicKey"}}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"pool","type":"publicKey"},{"name":"custody","type":"publicKey"},{"name":"collateralCustody","type":"publicKey"},{"name":"openTime","type":"i64"},{"name":"updateTime","type":"i64"},{"name":"side","type":{"defined":"Side"}},{"name":"price","type":"u64"},{"name":"sizeUsd","type":"u64"},{"name":"collateralUsd","type":"u64"},{"name":"realisedPnlUsd","type":"i64"},{"name":"cumulativeInterestSnapshot","type":"u128"},{"name":"lockedAmount","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"StakeInfo","type":{"kind":"struct","fields":[{"name":"pool","type":"publicKey"},{"name":"stakeAccount","type":"publicKey"},{"name":"currentStakedAmountLamports","type":"u64"},{"name":"totalStakingRewardsLamports","type":"u64"},{"name":"lastUpdatedAt","type":"i64"},{"name":"deactivating","type":"bool"},{"name":"stakeAccountIndex","type":"u64"},{"name":"bump","type":"u8"}]}},{"name":"TokenLedger","type":{"kind":"struct","fields":[{"name":"tokenAccount","type":"publicKey"},{"name":"amount","type":"u64"}]}}],"types":[{"name":"AddCustodyParams","type":{"kind":"struct","fields":[{"name":"isStable","type":"bool"},{"name":"oracle","type":{"defined":"OracleParams"}},{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"permissions","type":{"defined":"Permissions"}},{"name":"hourlyFundingDbps","type":"u64"},{"name":"targetRatioBps","type":"u64"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"dovesOracle","type":"publicKey"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"jumpRate","type":{"defined":"JumpRateState"}},{"name":"priceImpactFeeFactor","type":"u64"},{"name":"priceImpactExponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"},{"name":"dovesAgOracle","type":"publicKey"}]}},{"name":"AddLiquidity2Params","type":{"kind":"struct","fields":[{"name":"tokenAmountIn","type":"u64"},{"name":"minLpAmountOut","type":"u64"},{"name":"tokenAmountPreSwap","type":{"option":"u64"}}]}},{"name":"AddPoolParams","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"limit","type":{"defined":"Limit"}},{"name":"fees","type":{"defined":"Fees"}},{"name":"maxRequestExecutionSec","type":"i64"}]}},{"name":"BorrowFromCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"CloseBorrowPositionParams","type":{"kind":"struct","fields":[]}},{"name":"CreateAndDelegateStakeAccountParams","type":{"kind":"struct","fields":[{"name":"stakeAccountIndex","type":"u64"},{"name":"stakeAmountLamports","type":"u64"}]}},{"name":"CreateDecreasePositionMarketRequestParams","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"priceSlippage","type":"u64"},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"entirePosition","type":{"option":"bool"}},{"name":"counter","type":"u64"}]}},{"name":"CreateDecreasePositionRequest2Params","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"requestType","type":{"defined":"RequestType"}},{"name":"priceSlippage","type":{"option":"u64"}},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"triggerPrice","type":{"option":"u64"}},{"name":"triggerAboveThreshold","type":{"option":"bool"}},{"name":"entirePosition","type":{"option":"bool"}},{"name":"counter","type":"u64"}]}},{"name":"CreateIncreasePositionMarketRequestParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralTokenDelta","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"priceSlippage","type":"u64"},{"name":"jupiterMinimumOut","type":{"option":"u64"}},{"name":"counter","type":"u64"}]}},{"name":"CreateTokenMetadataParams","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"DecreasePosition4Params","type":{"kind":"struct","fields":[]}},{"name":"DecreasePositionWithInternalSwapParams","type":{"kind":"struct","fields":[]}},{"name":"DecreasePositionWithTpslAndInternalSwapParams","type":{"kind":"struct","fields":[]}},{"name":"DecreasePositionWithTpslParams","type":{"kind":"struct","fields":[]}},{"name":"DepositParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"GetAddLiquidityAmountAndFee2Params","type":{"kind":"struct","fields":[{"name":"tokenAmountIn","type":"u64"}]}},{"name":"GetAssetsUnderManagement2Params","type":{"kind":"struct","fields":[{"name":"mode","type":{"option":{"defined":"PriceCalcMode"}}}]}},{"name":"GetRemoveLiquidityAmountAndFee2Params","type":{"kind":"struct","fields":[{"name":"lpAmountIn","type":"u64"}]}},{"name":"IncreasePosition4Params","type":{"kind":"struct","fields":[]}},{"name":"IncreasePositionPreSwapParams","type":{"kind":"struct","fields":[]}},{"name":"IncreasePositionWithInternalSwapParams","type":{"kind":"struct","fields":[]}},{"name":"InitParams","type":{"kind":"struct","fields":[{"name":"allowSwap","type":"bool"},{"name":"allowAddLiquidity","type":"bool"},{"name":"allowRemoveLiquidity","type":"bool"},{"name":"allowIncreasePosition","type":"bool"},{"name":"allowDecreasePosition","type":"bool"},{"name":"allowCollateralWithdrawal","type":"bool"},{"name":"allowLiquidatePosition","type":"bool"}]}},{"name":"InstantCreateLimitOrderParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralTokenDelta","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"triggerPrice","type":"u64"},{"name":"triggerAboveThreshold","type":"bool"},{"name":"counter","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantCreateTpslParams","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"},{"name":"triggerAboveThreshold","type":"bool"},{"name":"entirePosition","type":"bool"},{"name":"counter","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantDecreasePosition2Params","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"priceSlippage","type":"u64"},{"name":"entirePosition","type":{"option":"bool"}},{"name":"requestTime","type":"i64"},{"name":"counter","type":"u64"}]}},{"name":"InstantDecreasePositionParams","type":{"kind":"struct","fields":[{"name":"collateralUsdDelta","type":"u64"},{"name":"sizeUsdDelta","type":"u64"},{"name":"priceSlippage","type":"u64"},{"name":"entirePosition","type":{"option":"bool"}},{"name":"requestTime","type":"i64"}]}},{"name":"InstantIncreasePositionPreSwapParams","type":{"kind":"struct","fields":[{"name":"amountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}},{"name":"InstantIncreasePositionParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"collateralTokenDelta","type":{"option":"u64"}},{"name":"side","type":{"defined":"Side"}},{"name":"priceSlippage","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantUpdateLimitOrderParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"InstantUpdateTpslParams","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"},{"name":"requestTime","type":"i64"}]}},{"name":"LiquidateBorrowPositionParams","type":{"kind":"struct","fields":[]}},{"name":"LiquidateFullPosition4Params","type":{"kind":"struct","fields":[]}},{"name":"OperatorSetCustodyConfigParams","type":{"kind":"struct","fields":[{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"hourlyFundingDbps","type":"u64"},{"name":"targetRatioBps","type":"u64"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"jumpRate","type":{"defined":"JumpRateState"}},{"name":"priceImpactFeeFactor","type":"u64"},{"name":"priceImpactExponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"},{"name":"borrowLendParameters","type":{"defined":"BorrowLendParams"}},{"name":"borrowHourlyFundingDbps","type":"u64"},{"name":"borrowLimitInTokenAmount","type":"u64"},{"name":"minInterestFeeBps","type":"u64"},{"name":"minInterestFeeGracePeriodSeconds","type":"u64"},{"name":"maxTotalStakedAmountLamports","type":"u64"},{"name":"externalSwapFeeMultiplierBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"withdrawalLimitTokenAmount","type":"u64"},{"name":"withdrawalLimitIntervalSeconds","type":"u64"}]}},{"name":"OperatorSetPoolConfigParams","type":{"kind":"struct","fields":[{"name":"fees","type":{"defined":"Fees"}},{"name":"limit","type":{"defined":"Limit"}},{"name":"maxRequestExecutionSec","type":"i64"},{"name":"maxTriggerPriceDiffBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"maxLpTokenPriceChangeBps","type":"u64"}]}},{"name":"PartialLiquidateBorrowPositionParams","type":{"kind":"struct","fields":[]}},{"name":"RefreshAssetsUnderManagementParams","type":{"kind":"struct","fields":[]}},{"name":"RemoveLiquidity2Params","type":{"kind":"struct","fields":[{"name":"lpAmountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}},{"name":"RepayToCustodyParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"SetCustodyConfigParams","type":{"kind":"struct","fields":[{"name":"oracle","type":{"defined":"OracleParams"}},{"name":"pricing","type":{"defined":"PricingParams"}},{"name":"permissions","type":{"defined":"Permissions"}},{"name":"hourlyFundingDbps","type":"u64"},{"name":"targetRatioBps","type":"u64"},{"name":"increasePositionBps","type":"u64"},{"name":"decreasePositionBps","type":"u64"},{"name":"dovesOracle","type":"publicKey"},{"name":"maxPositionSizeUsd","type":"u64"},{"name":"jumpRate","type":{"defined":"JumpRateState"}},{"name":"priceImpactFeeFactor","type":"u64"},{"name":"priceImpactExponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"},{"name":"dovesAgOracle","type":"publicKey"},{"name":"borrowLendParameters","type":{"defined":"BorrowLendParams"}},{"name":"borrowHourlyFundingDbps","type":"u64"},{"name":"borrowLimitInTokenAmount","type":"u64"},{"name":"minInterestFeeBps","type":"u64"},{"name":"minInterestFeeGracePeriodSeconds","type":"u64"},{"name":"maxTotalStakedAmountLamports","type":"u64"},{"name":"externalSwapFeeMultiplierBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"withdrawalLimitIntervalSeconds","type":"u64"},{"name":"withdrawalLimitTokenAmount","type":"u64"}]}},{"name":"SetMaxGlobalSizesParams","type":{"kind":"struct","fields":[{"name":"maxGlobalLongSize","type":"u64"},{"name":"maxGlobalShortSize","type":"u64"},{"name":"recoveryId","type":"u8"},{"name":"signature","type":{"array":["u8",64]}},{"name":"referenceId","type":{"array":["u8",16]}},{"name":"timestamp","type":"u64"}]}},{"name":"SetPerpetualsConfigParams","type":{"kind":"struct","fields":[{"name":"permissions","type":{"defined":"Permissions"}}]}},{"name":"SetPoolConfigParams","type":{"kind":"struct","fields":[{"name":"fees","type":{"defined":"Fees"}},{"name":"limit","type":{"defined":"Limit"}},{"name":"maxRequestExecutionSec","type":"i64"},{"name":"parameterUpdateOracle","type":{"defined":"Secp256k1Pubkey"}},{"name":"maxTriggerPriceDiffBps","type":"u64"},{"name":"disableClosePositionRequest","type":"bool"},{"name":"maxLpTokenPriceChangeBps","type":"u64"}]}},{"name":"SetTestTimeParams","type":{"kind":"struct","fields":[{"name":"time","type":"i64"}]}},{"name":"Swap2Params","type":{"kind":"struct","fields":[{"name":"amountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}},{"name":"SwapWithTokenLedgerParams","type":{"kind":"struct","fields":[{"name":"minAmountOut","type":"u64"}]}},{"name":"TestInitParams","type":{"kind":"struct","fields":[{"name":"allowSwap","type":"bool"},{"name":"allowAddLiquidity","type":"bool"},{"name":"allowRemoveLiquidity","type":"bool"},{"name":"allowIncreasePosition","type":"bool"},{"name":"allowDecreasePosition","type":"bool"},{"name":"allowCollateralWithdrawal","type":"bool"},{"name":"allowLiquidatePosition","type":"bool"}]}},{"name":"TransferAdminParams","type":{"kind":"struct","fields":[]}},{"name":"UpdateDecreasePositionRequest2Params","type":{"kind":"struct","fields":[{"name":"sizeUsdDelta","type":"u64"},{"name":"triggerPrice","type":"u64"}]}},{"name":"WithdrawParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"WithdrawFees2Params","type":{"kind":"struct","fields":[]}},{"name":"PriceImpactBuffer","type":{"kind":"struct","fields":[{"name":"openInterest","type":{"array":["i64",60]}},{"name":"lastUpdated","type":"i64"},{"name":"feeFactor","type":"u64"},{"name":"exponent","type":"f32"},{"name":"deltaImbalanceThresholdDecimal","type":"u64"},{"name":"maxFeeBps","type":"u64"}]}},{"name":"Assets","type":{"kind":"struct","fields":[{"name":"feesReserves","type":"u64"},{"name":"owned","type":"u64"},{"name":"locked","type":"u64"},{"name":"guaranteedUsd","type":"u64"},{"name":"globalShortSizes","type":"u64"},{"name":"globalShortAveragePrices","type":"u64"}]}},{"name":"PricingParams","type":{"kind":"struct","fields":[{"name":"tradeImpactFeeScalar","type":"u64"},{"name":"buffer","type":"u64"},{"name":"swapSpread","type":"u64"},{"name":"maxLeverage","type":"u64"},{"name":"maxGlobalLongSizes","type":"u64"},{"name":"maxGlobalShortSizes","type":"u64"}]}},{"name":"FundingRateState","type":{"kind":"struct","fields":[{"name":"cumulativeInterestRate","type":"u128"},{"name":"lastUpdate","type":"i64"},{"name":"hourlyFundingDbps","type":"u64"}]}},{"name":"JumpRateState","type":{"kind":"struct","fields":[{"name":"minRateBps","type":"u64"},{"name":"maxRateBps","type":"u64"},{"name":"targetRateBps","type":"u64"},{"name":"targetUtilizationRate","type":"u64"}]}},{"name":"BorrowLendParams","type":{"kind":"struct","fields":[{"name":"borrowsLimitInBps","type":"u64"},{"name":"maintainanceMarginBps","type":"u64"},{"name":"protocolFeeBps","type":"u64"},{"name":"liquidationMargin","type":"u64"},{"name":"liquidationFeeBps","type":"u64"}]}},{"name":"OraclePrice","type":{"kind":"struct","fields":[{"name":"price","type":"u64"},{"name":"exponent","type":"i32"}]}},{"name":"Price","type":{"kind":"struct","fields":[{"name":"price","type":"u64"},{"name":"expo","type":"i32"},{"name":"publishTime","type":"i64"}]}},{"name":"OracleParams","type":{"kind":"struct","fields":[{"name":"oracleAccount","type":"publicKey"},{"name":"oracleType","type":{"defined":"OracleType"}},{"name":"buffer","type":"u64"},{"name":"maxPriceAgeSec","type":"u32"}]}},{"name":"AmountAndFee","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"fee","type":"u64"},{"name":"feeBps","type":"u64"}]}},{"name":"Permissions","type":{"kind":"struct","fields":[{"name":"allowSwap","type":"bool"},{"name":"allowAddLiquidity","type":"bool"},{"name":"allowRemoveLiquidity","type":"bool"},{"name":"allowIncreasePosition","type":"bool"},{"name":"allowDecreasePosition","type":"bool"},{"name":"allowCollateralWithdrawal","type":"bool"},{"name":"allowLiquidatePosition","type":"bool"}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"swapMultiplier","type":"u64"},{"name":"stableSwapMultiplier","type":"u64"},{"name":"addRemoveLiquidityBps","type":"u64"},{"name":"swapBps","type":"u64"},{"name":"taxBps","type":"u64"},{"name":"stableSwapBps","type":"u64"},{"name":"stableSwapTaxBps","type":"u64"},{"name":"liquidationRewardBps","type":"u64"},{"name":"protocolShareBps","type":"u64"}]}},{"name":"PoolApr","type":{"kind":"struct","fields":[{"name":"lastUpdated","type":"i64"},{"name":"feeAprBps","type":"u64"},{"name":"realizedFeeUsd","type":"u64"}]}},{"name":"Limit","type":{"kind":"struct","fields":[{"name":"maxAumUsd","type":"u128"},{"name":"tokenWeightageBufferBps","type":"u128"},{"name":"buffer","type":"u64"}]}},{"name":"Secp256k1Pubkey","type":{"kind":"struct","fields":[{"name":"prefix","type":"u8"},{"name":"key","type":{"array":["u8",32]}}]}},{"name":"PriceImpactMechanism","type":{"kind":"enum","variants":[{"name":"TradeSize"},{"name":"DeltaImbalance"}]}},{"name":"OracleType","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Test"},{"name":"Pyth"}]}},{"name":"PriceCalcMode","type":{"kind":"enum","variants":[{"name":"Min"},{"name":"Max"},{"name":"Ignore"}]}},{"name":"PriceStaleTolerance","type":{"kind":"enum","variants":[{"name":"Strict"},{"name":"Loose"}]}},{"name":"TradePoolType","type":{"kind":"enum","variants":[{"name":"Increase"},{"name":"Decrease"}]}},{"name":"RequestType","type":{"kind":"enum","variants":[{"name":"Market"},{"name":"Trigger"}]}},{"name":"RequestChange","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Increase"},{"name":"Decrease"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Long"},{"name":"Short"}]}}],"events":[{"name":"CreatePositionRequestEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralMint","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"priceSlippage","type":{"option":"u64"},"index":false},{"name":"jupiterMinimumOut","type":{"option":"u64"},"index":false},{"name":"preSwapAmount","type":{"option":"u64"},"index":false},{"name":"requestChange","type":"u8","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false}]},{"name":"InstantCreateTpslEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"entirePosition","type":"bool","index":false},{"name":"openTime","type":"i64","index":false}]},{"name":"InstantUpdateTpslEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"entirePosition","type":"bool","index":false},{"name":"updateTime","type":"i64","index":false}]},{"name":"ClosePositionRequestEvent","fields":[{"name":"entirePosition","type":{"option":"bool"},"index":false},{"name":"executed","type":"bool","index":false},{"name":"requestChange","type":"u8","index":false},{"name":"requestType","type":"u8","index":false},{"name":"side","type":"u8","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"openTime","type":"i64","index":false}]},{"name":"IncreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"positionRequestChange","type":"u8","index":false},{"name":"positionRequestType","type":"u8","index":false},{"name":"positionRequestCollateralDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralUsdDelta","type":"u64","index":false},{"name":"collateralTokenDelta","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":{"option":"u64"},"index":false},{"name":"feeToken","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false}]},{"name":"IncreasePositionPreSwapEvent","fields":[{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"transferAmount","type":"u64","index":false},{"name":"collateralCustodyPreSwapAmount","type":"u64","index":false}]},{"name":"DecreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"positionRequestChange","type":"u8","index":false},{"name":"positionRequestType","type":"u8","index":false},{"name":"hasProfit","type":"bool","index":false},{"name":"pnlDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"transferAmountUsd","type":"u64","index":false},{"name":"transferToken","type":{"option":"u64"},"index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":{"option":"u64"},"index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false},{"name":"originalPositionCollateralUsd","type":"u64","index":false},{"name":"positionCollateralUsd","type":"u64","index":false},{"name":"positionOpenTime","type":"i64","index":false},{"name":"positionPrice","type":"u64","index":false}]},{"name":"DecreasePositionPostSwapEvent","fields":[{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"swapAmount","type":"u64","index":false},{"name":"jupiterMinimumOut","type":{"option":"u64"},"index":false}]},{"name":"LiquidateFullPositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionCollateralMint","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"hasProfit","type":"bool","index":false},{"name":"pnlDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"transferAmountUsd","type":"u64","index":false},{"name":"transferToken","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"liquidationFeeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false},{"name":"originalPositionCollateralUsd","type":"u64","index":false},{"name":"positionCollateralUsd","type":"u64","index":false},{"name":"positionOpenTime","type":"i64","index":false},{"name":"positionPrice","type":"u64","index":false}]},{"name":"PoolSwapEvent","fields":[{"name":"receivingCustodyKey","type":"publicKey","index":false},{"name":"dispensingCustodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"swapUsdAmount","type":"u64","index":false},{"name":"amountOutAfterFees","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"ownerKey","type":"publicKey","index":false},{"name":"receivingAccountKey","type":"publicKey","index":false}]},{"name":"PoolSwapExactOutEvent","fields":[{"name":"receivingCustodyKey","type":"publicKey","index":false},{"name":"dispensingCustodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"amountInAfterFees","type":"u64","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"swapUsdAmount","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"ownerKey","type":"publicKey","index":false},{"name":"receivingAccountKey","type":"publicKey","index":false}]},{"name":"AddLiquidityEvent","fields":[{"name":"custodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"tokenAmountIn","type":"u64","index":false},{"name":"prePoolAmountUsd","type":"u128","index":false},{"name":"tokenAmountUsd","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"tokenAmountAfterFee","type":"u64","index":false},{"name":"mintAmountUsd","type":"u64","index":false},{"name":"lpAmount","type":"u64","index":false},{"name":"postPoolAmountUsd","type":"u128","index":false}]},{"name":"RemoveLiquidityEvent","fields":[{"name":"custodyKey","type":"publicKey","index":false},{"name":"poolKey","type":"publicKey","index":false},{"name":"lpAmountIn","type":"u64","index":false},{"name":"removeAmountUsd","type":"u64","index":false},{"name":"feeBps","type":"u64","index":false},{"name":"removeTokenAmount","type":"u64","index":false},{"name":"tokenAmountAfterFee","type":"u64","index":false},{"name":"postPoolAmountUsd","type":"u128","index":false}]},{"name":"InstantCreateLimitOrderEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralMint","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionRequestKey","type":"publicKey","index":false},{"name":"positionRequestMint","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralDelta","type":"u64","index":false},{"name":"openTime","type":"i64","index":false}]},{"name":"InstantIncreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"collateralUsdDelta","type":"u64","index":false},{"name":"collateralTokenDelta","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":"u64","index":false},{"name":"feeToken","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false}]},{"name":"InstantDecreasePositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionSide","type":"u8","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionCollateralCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"desiredMint","type":"publicKey","index":false},{"name":"hasProfit","type":"bool","index":false},{"name":"pnlDelta","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"sizeUsdDelta","type":"u64","index":false},{"name":"transferAmountUsd","type":"u64","index":false},{"name":"transferToken","type":"u64","index":false},{"name":"price","type":"u64","index":false},{"name":"priceSlippage","type":"u64","index":false},{"name":"feeUsd","type":"u64","index":false},{"name":"openTime","type":"i64","index":false},{"name":"referral","type":{"option":"publicKey"},"index":false},{"name":"positionFeeUsd","type":"u64","index":false},{"name":"fundingFeeUsd","type":"u64","index":false},{"name":"originalPositionCollateralUsd","type":"u64","index":false},{"name":"positionCollateralUsd","type":"u64","index":false},{"name":"priceImpactFeeUsd","type":"u64","index":false},{"name":"positionOpenTime","type":"i64","index":false},{"name":"positionPrice","type":"u64","index":false},{"name":"positionRequest","type":{"option":"publicKey"},"index":false}]},{"name":"DepositCollateralEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"depositAmount","type":"u64","index":false},{"name":"userTokenAccount","type":"publicKey","index":false},{"name":"time","type":"i64","index":false}]},{"name":"WithdrawCollateralEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"withdrawAmount","type":"u64","index":false},{"name":"userTokenAccount","type":"publicKey","index":false},{"name":"custody","type":"publicKey","index":false},{"name":"previousCollateralAmount","type":"u64","index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"collateralAmountUsd","type":"u64","index":false},{"name":"marginUsd","type":"u64","index":false},{"name":"time","type":"i64","index":false}]},{"name":"BorrowFromCustodyEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"sizeCustodyToken","type":"u64","index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"collateralAmountUsd","type":"u64","index":false},{"name":"marginUsd","type":"u64","index":false},{"name":"updateTime","type":"i64","index":false}]},{"name":"RepayToCustodyEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"positionKey","type":"publicKey","index":false},{"name":"positionMint","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"sizeCustodyToken","type":"u64","index":false},{"name":"updateTime","type":"i64","index":false},{"name":"interest","type":"u128","index":false}]},{"name":"LiquidateBorrowPositionEvent","fields":[{"name":"positionKey","type":"publicKey","index":false},{"name":"positionCustody","type":"publicKey","index":false},{"name":"positionSizeUsd","type":"u64","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"collateralLockedInUsd","type":"u64","index":false},{"name":"collateralLockedInLp","type":"u64","index":false},{"name":"remainingCollateralInLp","type":"u64","index":false},{"name":"custodyTokenPrice","type":"u64","index":false},{"name":"totalBorrowsInUsd","type":"u64","index":false},{"name":"liquidationFeeUsd","type":"u64","index":false},{"name":"liquidationTime","type":"i64","index":false}]},{"name":"RedeemStakeEvent","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"stakeInfo","type":"publicKey","index":false},{"name":"stakeRewards","type":"u64","index":false},{"name":"custodyTotalStakedAmount","type":"u64","index":false},{"name":"currentStakedAmount","type":"u64","index":false},{"name":"totalStakingRewards","type":"u64","index":false},{"name":"redeemTime","type":"i64","index":false}]},{"name":"WithdrawStakeEvent","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"stakeInfo","type":"publicKey","index":false},{"name":"stakeRewards","type":"u64","index":false},{"name":"custodyTotalStakedAmount","type":"u64","index":false},{"name":"totalStakingRewards","type":"u64","index":false},{"name":"withdrawAmount","type":"u64","index":false},{"name":"withdrawTime","type":"i64","index":false}]},{"name":"DelegateStakeEvent","fields":[{"name":"custody","type":"publicKey","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"stakeInfo","type":"publicKey","index":false},{"name":"custodyTotalStakedAmount","type":"u64","index":false},{"name":"stakeAmount","type":"u64","index":false},{"name":"validatorVoteAccount","type":"publicKey","index":false},{"name":"delegateTime","type":"i64","index":false}]},{"name":"WithdrawFeesEvent","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"custody","type":"publicKey","index":false},{"name":"custodyMint","type":"publicKey","index":false},{"name":"receivingTokenAccount","type":"publicKey","index":false},{"name":"totalTradeSwapFees","type":"u64","index":false},{"name":"poolTradeSwapFees","type":"u64","index":false},{"name":"protocolTradeSwapFees","type":"u64","index":false},{"name":"totalBorrowLendingFees","type":"u64","index":false},{"name":"poolBorrowLendingFees","type":"u64","index":false},{"name":"protocolBorrowLendingFees","type":"u64","index":false},{"name":"poolTotalFeesUsd","type":"u64","index":false},{"name":"aprBpsBefore","type":"u64","index":false},{"name":"aprBpsAfter","type":"u64","index":false},{"name":"aprBpsUpdatedAt","type":"i64","index":false},{"name":"poolRealizedFeeUsdBefore","type":"u64","index":false},{"name":"poolRealizedFeeUsdAfter","type":"u64","index":false},{"name":"curtime","type":"i64","index":false}]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Overflow in arithmetic operation"},{"code":6001,"name":"UnsupportedOracle","msg":"Unsupported price oracle"},{"code":6002,"name":"InvalidOracleAccount","msg":"Invalid oracle account"},{"code":6003,"name":"StaleOraclePrice","msg":"Stale oracle price"},{"code":6004,"name":"InvalidOraclePrice","msg":"Invalid oracle price"},{"code":6005,"name":"InvalidEnvironment","msg":"Instruction is not allowed in production"},{"code":6006,"name":"InvalidCollateralAccount","msg":"Invalid collateral account"},{"code":6007,"name":"InvalidCollateralAmount","msg":"Invalid collateral amount"},{"code":6008,"name":"CollateralSlippage","msg":"Collateral slippage"},{"code":6009,"name":"InvalidPositionState","msg":"Invalid position state"},{"code":6010,"name":"InvalidPerpetualsConfig","msg":"Invalid perpetuals config"},{"code":6011,"name":"InvalidPoolConfig","msg":"Invalid pool config"},{"code":6012,"name":"InvalidInstruction","msg":"Invalid instruction"},{"code":6013,"name":"InvalidCustodyConfig","msg":"Invalid custody config"},{"code":6014,"name":"InvalidCustodyBalance","msg":"Invalid custody balance"},{"code":6015,"name":"InvalidArgument","msg":"Invalid argument"},{"code":6016,"name":"InvalidPositionRequest","msg":"Invalid position request"},{"code":6017,"name":"InvalidPositionRequestInputAta","msg":"Invalid position request input ata"},{"code":6018,"name":"InvalidMint","msg":"Invalid mint"},{"code":6019,"name":"InsufficientTokenAmount","msg":"Insufficient token amount"},{"code":6020,"name":"InsufficientAmountReturned","msg":"Insufficient token amount returned"},{"code":6021,"name":"MaxPriceSlippage","msg":"Price slippage limit exceeded"},{"code":6022,"name":"MaxLeverage","msg":"Position leverage limit exceeded"},{"code":6023,"name":"CustodyAmountLimit","msg":"Custody amount limit exceeded"},{"code":6024,"name":"PoolAmountLimit","msg":"Pool amount limit exceeded"},{"code":6025,"name":"PersonalPoolAmountLimit","msg":"Personal pool amount limit exceeded"},{"code":6026,"name":"UnsupportedToken","msg":"Token is not supported"},{"code":6027,"name":"InstructionNotAllowed","msg":"Instruction is not allowed at this time"},{"code":6028,"name":"JupiterProgramMismatch","msg":"Jupiter Program ID mismatch"},{"code":6029,"name":"ProgramMismatch","msg":"Program ID mismatch"},{"code":6030,"name":"AddressMismatch","msg":"Address mismatch"},{"code":6031,"name":"KeeperATAMissing","msg":"Missing keeper ATA"},{"code":6032,"name":"SwapAmountMismatch","msg":"Swap amount mismatch"},{"code":6033,"name":"CPINotAllowed","msg":"CPI not allowed"},{"code":6034,"name":"InvalidKeeper","msg":"Invalid Keeper"},{"code":6035,"name":"ExceedExecutionPeriod","msg":"Exceed execution period"},{"code":6036,"name":"InvalidRequestType","msg":"Invalid Request Type"},{"code":6037,"name":"InvalidTriggerPrice","msg":"Invalid Trigger Price"},{"code":6038,"name":"TriggerPriceSlippage","msg":"Trigger Price Slippage"},{"code":6039,"name":"MissingTriggerPrice","msg":"Missing Trigger Price"},{"code":6040,"name":"MissingPriceSlippage","msg":"Missing Price Slippage"},{"code":6041,"name":"InvalidPriceCalcMode","msg":"Invalid Price Calc Mode"},{"code":6042,"name":"RequestUpdatedTooRecent","msg":"Request Updated Too Recent"},{"code":6043,"name":"ExceedTokenWeightage","msg":"Exceed Token Weightage"},{"code":6044,"name":"OraclePublishTimeTooEarly","msg":"Oracle Publish Time Too Early"},{"code":6045,"name":"PullOraclePublishTimeTooEarly","msg":"Pull Oracle Publish Time Too Early"},{"code":6046,"name":"StalePullOraclePrice","msg":"Stale Pull Oracle Price"},{"code":6047,"name":"InvalidPullOraclePrice","msg":"Invalid Pull Oracle Price"},{"code":6048,"name":"PullOracleNotVerified","msg":"Pull Oracle Not Verified"},{"code":6049,"name":"PriceDiffTooLarge","msg":"Price Diff Between Pull and Push Oracle is Too Large"},{"code":6050,"name":"InvalidDovesOraclePrice","msg":"Invalid Doves Oracle Price"},{"code":6051,"name":"InvalidRequestTime","msg":"Invalid Request Time"},{"code":6052,"name":"PositionUpdatedTooRecent","msg":"Position Updated Too Recent"},{"code":6053,"name":"LedgerTokenAccountDoesNotMatch","msg":"Ledger token account does not match"},{"code":6054,"name":"InvalidTokenLedger","msg":"Invalid token ledger"},{"code":6055,"name":"OraclePriceDifferenceTooLarge","msg":"Oracle Price Difference Too Large"},{"code":6056,"name":"InvalidOracleSigner","msg":"Invalid Oracle Signer"},{"code":6057,"name":"InvalidOracleTimestamp","msg":"Invalid Oracle Timestamp"},{"code":6058,"name":"InvalidMaxGlobalLongSize","msg":"New Max Global Long Size Too Low"},{"code":6059,"name":"InvalidMaxGlobalShortSize","msg":"New Max Global Short Size Too Low"},{"code":6060,"name":"BorrowsDisabled","msg":"Borrows disabled for this custody"},{"code":6061,"name":"BorrowLimitsExceeded","msg":"Borrows limit exceeded for this custody"},{"code":6062,"name":"WithdrawExceedsMarginLimits","msg":"Withdraw exceeds margin of the custody"},{"code":6063,"name":"CannotLiquidate","msg":"Cannot liquidate"},{"code":6064,"name":"CannotDelegateStake","msg":"Cannot delegate stake to deactivated account"},{"code":6065,"name":"ExceededMaxTotalStakedAmount","msg":"Max total staked amount exceeded"},{"code":6066,"name":"LpTokenPriceChangeLimitExceeded","msg":"LP token price change exceeds limit"}]} \ No newline at end of file diff --git a/idls/jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json b/idls/jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json new file mode 100644 index 0000000..106f2b7 --- /dev/null +++ b/idls/jupiter_stable.JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr.json @@ -0,0 +1 @@ +{"address":"JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr","metadata":{"name":"jup_stable","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"create_benefactor","discriminator":[184,241,45,0,53,40,201,54],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"payer","writable":true,"signer":true},{"name":"benefactor_authority"},{"name":"benefactor","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,101,110,101,102,97,99,116,111,114]},{"kind":"account","path":"benefactor_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"}]},{"name":"create_operator","discriminator":[145,40,238,75,181,252,59,11],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"payer","writable":true,"signer":true},{"name":"operator"},{"name":"new_operator_authority"},{"name":"new_operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"new_operator_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"OperatorRole"}}}]},{"name":"create_vault","discriminator":[29,237,247,208,193,82,54,135],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"payer","writable":true,"signer":true},{"name":"mint"},{"name":"config"},{"name":"authority","relations":["config"]},{"name":"vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116]},{"kind":"account","path":"mint"}]}},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"delete_benefactor","discriminator":[216,227,84,147,79,177,152,147],"accounts":[{"name":"operator_authority","writable":true,"signer":true,"relations":["operator"]},{"name":"operator"},{"name":"receiver","writable":true},{"name":"benefactor","writable":true}],"args":[]},{"name":"delete_operator","discriminator":[208,84,168,116,138,201,98,16],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"payer","writable":true,"signer":true},{"name":"operator"},{"name":"deleted_operator","writable":true}],"args":[]},{"name":"init","discriminator":[220,59,207,236,108,250,47,100],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"upgrade_authority","signer":true},{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"upgrade_authority"}]}},{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","writable":true,"signer":true},{"name":"metadata","writable":true},{"name":"program_data"},{"name":"program","address":"JUPUSDecMzAVgztLe6eGhwUBj1Pn3j9WAXwmtHmfbRr"},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"decimals","type":"u8"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"manage_benefactor","discriminator":[22,231,128,62,115,219,149,14],"accounts":[{"name":"operator_authority","writable":true,"signer":true,"relations":["operator"]},{"name":"operator"},{"name":"benefactor","writable":true}],"args":[{"name":"action","type":{"defined":{"name":"BenefactorManagementAction"}}}]},{"name":"manage_config","discriminator":[119,51,144,55,24,242,232,231],"accounts":[{"name":"operator_authority","writable":true,"signer":true,"relations":["operator"]},{"name":"operator"},{"name":"config","writable":true}],"args":[{"name":"action","type":{"defined":{"name":"ConfigManagementAction"}}}]},{"name":"manage_operator","discriminator":[82,172,106,235,147,246,96,85],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"managed_operator","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"action","type":{"defined":{"name":"OperatorManagementAction"}}}]},{"name":"manage_vault","discriminator":[165,7,106,242,73,193,195,128],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"vault","writable":true}],"args":[{"name":"action","type":{"defined":{"name":"VaultManagementAction"}}}]},{"name":"mint","discriminator":[51,57,225,47,182,146,137,166],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"user_collateral_token_account","writable":true},{"name":"user_lp_token_account","writable":true},{"name":"config","writable":true},{"name":"authority"},{"name":"lp_mint","writable":true},{"name":"vault","writable":true},{"name":"vault_mint"},{"name":"custodian"},{"name":"custodian_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"custodian"},{"kind":"account","path":"vault_token_program"},{"kind":"account","path":"vault_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"benefactor","writable":true},{"name":"lp_token_program"},{"name":"vault_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"amount","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"redeem","discriminator":[184,12,86,149,70,196,97,225],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"user_lp_token_account","writable":true},{"name":"user_collateral_token_account","writable":true},{"name":"config","writable":true},{"name":"authority"},{"name":"lp_mint","writable":true},{"name":"vault","writable":true},{"name":"vault_token_account","writable":true},{"name":"vault_mint"},{"name":"benefactor","writable":true},{"name":"lp_token_program"},{"name":"vault_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"amount","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"withdraw","discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"operator_authority","signer":true,"relations":["operator"]},{"name":"operator"},{"name":"custodian"},{"name":"custodian_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"custodian"},{"kind":"account","path":"token_program"},{"kind":"account","path":"vault_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"config"},{"name":"authority"},{"name":"vault","writable":true},{"name":"vault_token_account","writable":true},{"name":"vault_mint"},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]}],"accounts":[{"name":"Benefactor","discriminator":[98,159,41,233,19,232,104,12]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"Vault","discriminator":[211,8,232,43,2,152,117,119]}],"events":[{"name":"MintV0Event","discriminator":[217,98,231,213,105,77,68,88]},{"name":"MintV1Event","discriminator":[63,113,88,48,163,187,48,83]},{"name":"RedeemV0Event","discriminator":[50,202,68,30,122,77,84,153]},{"name":"RedeemV1Event","discriminator":[67,51,207,92,219,144,44,2]}],"errors":[{"code":6000,"name":"SomeError","msg":""},{"code":6001,"name":"AdminArrayFull","msg":"Admin Array Full"},{"code":6002,"name":"NotAuthorized","msg":"Not Authorized"},{"code":6003,"name":"BadInput","msg":"Bad Input"},{"code":6004,"name":"BenefactorDisabled","msg":"Benefactor Disabled"},{"code":6005,"name":"BenefactorActive","msg":"Benefactor Active"},{"code":6006,"name":"VaultNotActive","msg":"Vault Not Active"},{"code":6007,"name":"InsufficientAmount","msg":"Insufficient Amount"},{"code":6008,"name":"InvalidFeeRate","msg":"Invalid Fee Rate"},{"code":6009,"name":"MintLimitExceeded","msg":"Mint Limit Exceeded"},{"code":6010,"name":"RedeemLimitExceeded","msg":"Redeem Limit Exceeded"},{"code":6011,"name":"SlippageToleranceExceeded","msg":"Slippage Tolerance Exceeded"},{"code":6012,"name":"MathOverflow","msg":"Math Overflow"},{"code":6013,"name":"InvalidLPMint","msg":"Invalid LP Mint"},{"code":6014,"name":"InvalidVaultMint","msg":"Invalid Vault Mint"},{"code":6015,"name":"InvalidAuthority","msg":"Invalid Authority"},{"code":6016,"name":"InvalidVaultTokenAccount","msg":"Invalid Vault Token Account"},{"code":6017,"name":"InvalidTokenProgram","msg":"Invalid Token Program"},{"code":6018,"name":"InvalidVaultFeeTokenAccount","msg":"Invalid Vault Fee Token Account"},{"code":6019,"name":"BadOracle","msg":"Bad Oracle"},{"code":6020,"name":"NoValidPrice","msg":"No Valid Price"},{"code":6021,"name":"InvalidBenefactor","msg":"Invalid Benefactor"},{"code":6022,"name":"InvalidCustodian","msg":"Invalid Custodian"},{"code":6023,"name":"InvalidPeriodLimit","msg":"Invalid Rate Limit Window"},{"code":6024,"name":"MissingOracleAccounts","msg":"Missing Oracle Accounts"},{"code":6025,"name":"NoOraclesFound","msg":"No Oracles Found"},{"code":6026,"name":"ZeroAmount","msg":"Zero Amount"},{"code":6027,"name":"ProtocolPaused","msg":"Protocol Paused"},{"code":6028,"name":"OperatorDisabled","msg":"Operator Disabled"},{"code":6029,"name":"VaultDisabled","msg":"Vault Disabled"},{"code":6030,"name":"VaultEnabled","msg":"Vault Enabled"},{"code":6031,"name":"VaultIsDry","msg":"Vault Is Dry"},{"code":6032,"name":"InvalidPegPriceUSD","msg":"Invalid Peg Price USD"},{"code":6033,"name":"NoValidOracle","msg":"No Valid Oracle"},{"code":6034,"name":"PriceConfidenceTooWide","msg":"Price Confidence Too Wide"},{"code":6035,"name":"OperatorCannotDeleteItself","msg":"Operator Cannot Delete Itself"}],"types":[{"name":"Benefactor","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"status","type":{"defined":{"name":"BenefactorStatus"}}},{"name":"_padding0","type":{"array":["u8",7]}},{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"},{"name":"_padding1","type":{"array":["u8",4]}},{"name":"period_limits","type":{"array":[{"defined":{"name":"PeriodLimit"}},4]}},{"name":"total_minted","type":{"array":["u8",16]}},{"name":"total_redeemed","type":{"array":["u8",16]}},{"name":"fee_overrides","type":{"array":[{"defined":{"name":"FeeOverride"}},4]}},{"name":"reserved","type":{"array":["u8",96]}}]}},{"name":"BenefactorManagementAction","type":{"kind":"enum","variants":[{"name":"Disable"},{"name":"SetStatus","fields":[{"name":"status","type":{"defined":{"name":"BenefactorStatus"}}}]},{"name":"UpdateFeeRates","fields":[{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"}]},{"name":"UpdatePeriodLimit","fields":[{"name":"index","type":"u8"},{"name":"duration_seconds","type":"u64"},{"name":"max_mint_amount","type":"u64"},{"name":"max_redeem_amount","type":"u64"}]},{"name":"ResetPeriodLimit","fields":[{"name":"index","type":"u8"}]},{"name":"UpdateFeeOverride","fields":[{"name":"index","type":"u8"},{"name":"mint","type":"pubkey"},{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"}]},{"name":"DeleteFeeOverride","fields":[{"name":"index","type":"u8"}]}]}},{"name":"BenefactorStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Disabled"}]}},{"name":"Config","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"token_program","type":"pubkey"},{"name":"period_limits","type":{"array":[{"defined":{"name":"PeriodLimit"}},4]}},{"name":"peg_price_usd","type":"u64"},{"name":"decimals","type":"u8"},{"name":"is_mint_redeem_enabled","type":"u8"},{"name":"authority_bump","type":"u8"},{"name":"config_bump","type":"u8"},{"name":"_padding","type":{"array":["u8",4]}},{"name":"reserved","type":{"array":["u8",192]}}]}},{"name":"ConfigManagementAction","type":{"kind":"enum","variants":[{"name":"Pause"},{"name":"UpdatePauseFlag","fields":[{"name":"is_mint_redeem_enabled","type":"bool"}]},{"name":"UpdatePeriodLimit","fields":[{"name":"index","type":"u8"},{"name":"duration_seconds","type":"u64"},{"name":"max_mint_amount","type":"u64"},{"name":"max_redeem_amount","type":"u64"}]},{"name":"ResetPeriodLimit","fields":[{"name":"index","type":"u8"}]},{"name":"SetPegPriceUSD","fields":[{"name":"peg_price_usd","type":"u64"}]}]}},{"name":"DovesOracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",32]}},{"name":"reserved3","type":{"array":["u8",24]}}]}},{"name":"EmptyOracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"reserved","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",32]}},{"name":"reserved3","type":{"array":["u8",24]}}]}},{"name":"FeeOverride","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"mint_fee_rate","type":"u16"},{"name":"redeem_fee_rate","type":"u16"},{"name":"_padding","type":{"array":["u8",4]}}]}},{"name":"MintV0Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"mint_amount","type":"u64"}]}},{"name":"MintV1Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"mint_amount","type":"u64"},{"name":"collateral","type":"pubkey"},{"name":"benefactor","type":"pubkey"}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"operator_authority","type":"pubkey"},{"name":"role","type":"u64"},{"name":"status","type":{"defined":{"name":"OperatorStatus"}}},{"name":"_padding0","type":{"array":["u8",7]}},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"OperatorManagementAction","type":{"kind":"enum","variants":[{"name":"SetStatus","fields":[{"name":"status","type":{"defined":{"name":"OperatorStatus"}}}]},{"name":"SetRole","fields":[{"name":"role","type":{"defined":{"name":"OperatorRole"}}}]},{"name":"ClearRole","fields":[{"name":"role","type":{"defined":{"name":"OperatorRole"}}}]}]}},{"name":"OperatorRole","type":{"kind":"enum","variants":[{"name":"Admin"},{"name":"PeriodManager"},{"name":"GlobalDisabler"},{"name":"VaultManager"},{"name":"VaultDisabler"},{"name":"BenefactorManager"},{"name":"BenefactorDisabler"},{"name":"PegManager"},{"name":"CollateralManager"}]}},{"name":"OperatorStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}},{"name":"OracleConfig","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Pyth","fields":[{"array":["u8",32]},"pubkey"]},{"name":"SwitchboardOnDemand","fields":["pubkey"]},{"name":"Doves","fields":["pubkey"]}]}},{"name":"OracleType","repr":{"kind":"c"},"type":{"kind":"enum","variants":[{"name":"Empty","fields":[{"defined":{"name":"EmptyOracle"}}]},{"name":"Pyth","fields":[{"defined":{"name":"PythV2Oracle"}}]},{"name":"Doves","fields":[{"defined":{"name":"DovesOracle"}}]},{"name":"SwitchboardOnDemand","fields":[{"defined":{"name":"SwitchboardOnDemandOracle"}}]}]}},{"name":"PeriodLimit","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"duration_seconds","docs":["Window duration in seconds (0 = disabled)"],"type":"u64"},{"name":"max_mint_amount","docs":["Maximum mint amount in this window"],"type":"u64"},{"name":"max_redeem_amount","docs":["Maximum redeem amount in this window"],"type":"u64"},{"name":"minted_amount","docs":["Amount minted in current window"],"type":"u64"},{"name":"redeemed_amount","docs":["Amount redeemed in current window"],"type":"u64"},{"name":"window_start","docs":["Window start timestamp"],"type":"i64"}]}},{"name":"PythV2Oracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"feed_id","type":{"array":["u8",32]}},{"name":"account","type":"pubkey"},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",24]}}]}},{"name":"RedeemV0Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"redeem_amount","type":"u64"}]}},{"name":"RedeemV1Event","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"net_amount","type":"u64"},{"name":"oracle_price","type":"u64"},{"name":"one_to_one_amount","type":"u64"},{"name":"oracle_amount","type":"u64"},{"name":"redeem_amount","type":"u64"},{"name":"collateral","type":"pubkey"},{"name":"benefactor","type":"pubkey"}]}},{"name":"SwitchboardOnDemandOracle","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"reserved","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"reserved2","type":{"array":["u8",24]}}]}},{"name":"Vault","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"custodian","type":"pubkey"},{"name":"token_account","type":"pubkey"},{"name":"token_program","type":"pubkey"},{"name":"stalesness_threshold","type":"u64"},{"name":"min_oracle_price_usd","type":"u64"},{"name":"max_oracle_price_usd","type":"u64"},{"name":"status","type":{"defined":{"name":"VaultStatus"}}},{"name":"_padding1","type":{"array":["u8",7]}},{"name":"bump","type":"u8"},{"name":"decimals","type":"u8"},{"name":"_padding2","type":{"array":["u8",6]}},{"name":"oracles","type":{"array":[{"defined":{"name":"OracleType"}},5]}},{"name":"_padding3","type":{"array":["u8",3]}},{"name":"period_limits","type":{"array":[{"defined":{"name":"PeriodLimit"}},4]}},{"name":"reserved1","type":{"array":["u8",32]}},{"name":"total_minted","type":{"array":["u8",16]}},{"name":"total_redeemed","type":{"array":["u8",16]}},{"name":"reserved","type":{"array":["u8",256]}}]}},{"name":"VaultManagementAction","type":{"kind":"enum","variants":[{"name":"Disable"},{"name":"SetStatus","fields":[{"name":"status","type":{"defined":{"name":"VaultStatus"}}}]},{"name":"UpdateOracle","fields":[{"name":"index","type":"u8"},{"name":"oracle","type":{"defined":{"name":"OracleConfig"}}}]},{"name":"UpdatePeriodLimit","fields":[{"name":"index","type":"u8"},{"name":"duration_seconds","type":"u64"},{"name":"max_mint_amount","type":"u64"},{"name":"max_redeem_amount","type":"u64"}]},{"name":"ResetPeriodLimit","fields":[{"name":"index","type":"u8"}]},{"name":"SetCustodian","fields":[{"name":"new_custodian","type":"pubkey"}]},{"name":"SetStalesnessThreshold","fields":[{"name":"stalesness_threshold","type":"u64"}]},{"name":"SetMinOraclePrice","fields":[{"name":"min_oracle_price_usd","type":"u64"}]},{"name":"SetMaxOraclePrice","fields":[{"name":"max_oracle_price_usd","type":"u64"}]}]}},{"name":"VaultStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}}]} \ No newline at end of file diff --git a/idls/jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json b/idls/jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json new file mode 100644 index 0000000..cd8a53a --- /dev/null +++ b/idls/jupiter_v4.JUP4Fb2cqiRUcaTHdrPC8h2gNsA2ETXiPDD33WcGuJB.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"jupiter","instructions":[{"name":"route","accounts":[{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"destinationTokenAccount","isMut":false,"isSigner":false}],"args":[{"name":"swapLeg","type":{"defined":"SwapLeg"}},{"name":"inAmount","type":"u64"},{"name":"quotedOutAmount","type":"u64"},{"name":"slippageBps","type":"u16"},{"name":"platformFeeBps","type":"u8"}]},{"name":"whirlpoolSwapExactOutput","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenAuthority","isMut":false,"isSigner":true},{"name":"whirlpool","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountA","isMut":true,"isSigner":false},{"name":"tokenVaultA","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountB","isMut":true,"isSigner":false},{"name":"tokenVaultB","isMut":true,"isSigner":false},{"name":"tickArray0","isMut":true,"isSigner":false},{"name":"tickArray1","isMut":true,"isSigner":false},{"name":"tickArray2","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false,"docs":["Oracle is currently unused and will be enabled on subsequent updates"]}],"args":[{"name":"outAmount","type":"u64"},{"name":"inAmountWithSlippage","type":{"defined":"AmountWithSlippage"}},{"name":"aToB","type":"bool"},{"name":"platformFeeBps","type":"u8"}]},{"name":"raydiumSwapExactOutput","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"ammId","isMut":true,"isSigner":false},{"name":"ammAuthority","isMut":false,"isSigner":false},{"name":"ammOpenOrders","isMut":true,"isSigner":false},{"name":"poolCoinTokenAccount","isMut":true,"isSigner":false},{"name":"poolPcTokenAccount","isMut":true,"isSigner":false},{"name":"serumProgramId","isMut":false,"isSigner":false},{"name":"serumMarket","isMut":true,"isSigner":false},{"name":"serumBids","isMut":true,"isSigner":false},{"name":"serumAsks","isMut":true,"isSigner":false},{"name":"serumEventQueue","isMut":true,"isSigner":false},{"name":"serumCoinVaultAccount","isMut":true,"isSigner":false},{"name":"serumPcVaultAccount","isMut":true,"isSigner":false},{"name":"serumVaultSigner","isMut":false,"isSigner":false},{"name":"userSourceTokenAccount","isMut":true,"isSigner":false},{"name":"userDestinationTokenAccount","isMut":true,"isSigner":false},{"name":"userSourceOwner","isMut":false,"isSigner":true}],"args":[{"name":"outAmount","type":"u64"},{"name":"inAmountWithSlippage","type":{"defined":"AmountWithSlippage"}},{"name":"platformFeeBps","type":"u8"}]},{"name":"raydiumClmmSwapExactOutput","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"ammConfig","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false},{"name":"observationState","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tickArray","isMut":true,"isSigner":false}],"args":[{"name":"outAmount","type":"u64"},{"name":"inAmountWithSlippage","type":{"defined":"AmountWithSlippage"}},{"name":"platformFeeBps","type":"u8"}]},{"name":"createOpenOrders","accounts":[{"name":"openOrders","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false}],"args":[]},{"name":"createOpenOrderV2","accounts":[{"name":"openOrders","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false}],"args":[]},{"name":"mercurialSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"swapState","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"poolAuthority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceTokenAccount","isMut":true,"isSigner":false},{"name":"destinationTokenAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"cykuraSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"signer","isMut":false,"isSigner":true},{"name":"factoryState","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false},{"name":"lastObservationState","isMut":true,"isSigner":false},{"name":"coreProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"serumSwap","accounts":[{"name":"market","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"vaultSigner","isMut":false,"isSigner":false}]},{"name":"authority","isMut":false,"isSigner":true},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"saberSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"swapAuthority","isMut":false,"isSigner":false},{"name":"userAuthority","isMut":false,"isSigner":false},{"name":"inputUserAccount","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputUserAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"feesTokenAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"saberAddDecimals","accounts":[{"name":"addDecimalsProgram","isMut":false,"isSigner":false},{"name":"wrapper","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userUnderlyingTokens","isMut":true,"isSigner":false},{"name":"userWrappedTokens","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"tokenSwap","accounts":[{"name":"tokenSwapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"source","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"poolFee","isMut":true,"isSigner":false}],"args":[]},{"name":"senchaSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":true,"isSigner":false},{"name":"userAuthority","isMut":false,"isSigner":false},{"name":"inputUserAccount","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"inputFeesAccount","isMut":true,"isSigner":false},{"name":"outputUserAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"outputFeesAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"stepSwap","accounts":[{"name":"tokenSwapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"source","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"poolFee","isMut":true,"isSigner":false}],"args":[]},{"name":"cropperSwap","accounts":[{"name":"tokenSwapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"swap","isMut":false,"isSigner":false},{"name":"swapState","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"source","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"poolFee","isMut":true,"isSigner":false}],"args":[]},{"name":"raydiumSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"ammId","isMut":true,"isSigner":false},{"name":"ammAuthority","isMut":false,"isSigner":false},{"name":"ammOpenOrders","isMut":true,"isSigner":false},{"name":"poolCoinTokenAccount","isMut":true,"isSigner":false},{"name":"poolPcTokenAccount","isMut":true,"isSigner":false},{"name":"serumProgramId","isMut":false,"isSigner":false},{"name":"serumMarket","isMut":true,"isSigner":false},{"name":"serumBids","isMut":true,"isSigner":false},{"name":"serumAsks","isMut":true,"isSigner":false},{"name":"serumEventQueue","isMut":true,"isSigner":false},{"name":"serumCoinVaultAccount","isMut":true,"isSigner":false},{"name":"serumPcVaultAccount","isMut":true,"isSigner":false},{"name":"serumVaultSigner","isMut":false,"isSigner":false},{"name":"userSourceTokenAccount","isMut":true,"isSigner":false},{"name":"userDestinationTokenAccount","isMut":true,"isSigner":false},{"name":"userSourceOwner","isMut":false,"isSigner":true}],"args":[]},{"name":"cremaSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"clmmConfig","isMut":false,"isSigner":false},{"name":"clmmpool","isMut":true,"isSigner":false},{"name":"tokenA","isMut":false,"isSigner":false},{"name":"tokenB","isMut":false,"isSigner":false},{"name":"accountA","isMut":true,"isSigner":false},{"name":"accountB","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tickArrayMap","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"partner","isMut":false,"isSigner":false},{"name":"partnerAtaA","isMut":true,"isSigner":false},{"name":"partnerAtaB","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"lifinitySwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"amm","isMut":false,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"destinationInfo","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"feeAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"pythAccount","isMut":false,"isSigner":false},{"name":"pythPcAccount","isMut":false,"isSigner":false},{"name":"configAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"marinadeDeposit","accounts":[{"name":"marinadeFinanceProgram","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"liqPoolMsolLegAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"transferFrom","isMut":true,"isSigner":false},{"name":"mintTo","isMut":true,"isSigner":false},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"userWsolTokenAccount","isMut":true,"isSigner":false},{"name":"tempWsolTokenAccount","isMut":true,"isSigner":false},{"name":"userTransferAuthority","isMut":true,"isSigner":true},{"name":"wsolMint","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"marinadeUnstake","accounts":[{"name":"marinadeFinanceProgram","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"getMsolFrom","isMut":true,"isSigner":false},{"name":"getMsolFromAuthority","isMut":false,"isSigner":true},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"userWsolTokenAccount","isMut":true,"isSigner":false}],"args":[]},{"name":"aldrinSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"poolSigner","isMut":false,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"baseTokenVault","isMut":true,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"feePoolTokenAccount","isMut":true,"isSigner":false},{"name":"walletAuthority","isMut":false,"isSigner":true},{"name":"userBaseTokenAccount","isMut":true,"isSigner":false},{"name":"userQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"aldrinV2Swap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"poolSigner","isMut":false,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"baseTokenVault","isMut":true,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"feePoolTokenAccount","isMut":true,"isSigner":false},{"name":"walletAuthority","isMut":false,"isSigner":true},{"name":"userBaseTokenAccount","isMut":true,"isSigner":false},{"name":"userQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"curve","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"whirlpoolSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenAuthority","isMut":false,"isSigner":true},{"name":"whirlpool","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountA","isMut":true,"isSigner":false},{"name":"tokenVaultA","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountB","isMut":true,"isSigner":false},{"name":"tokenVaultB","isMut":true,"isSigner":false},{"name":"tickArray0","isMut":true,"isSigner":false},{"name":"tickArray1","isMut":true,"isSigner":false},{"name":"tickArray2","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false,"docs":["Oracle is currently unused and will be enabled on subsequent updates"]}],"args":[]},{"name":"invariantSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tickmap","isMut":true,"isSigner":false},{"name":"accountX","isMut":true,"isSigner":false},{"name":"accountY","isMut":true,"isSigner":false},{"name":"reserveX","isMut":true,"isSigner":false},{"name":"reserveY","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"meteoraSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"userSourceToken","isMut":true,"isSigner":false},{"name":"userDestinationToken","isMut":true,"isSigner":false},{"name":"aVault","isMut":true,"isSigner":false},{"name":"bVault","isMut":true,"isSigner":false},{"name":"aTokenVault","isMut":true,"isSigner":false},{"name":"bTokenVault","isMut":true,"isSigner":false},{"name":"aVaultLpMint","isMut":true,"isSigner":false},{"name":"bVaultLpMint","isMut":true,"isSigner":false},{"name":"aVaultLp","isMut":true,"isSigner":false},{"name":"bVaultLp","isMut":true,"isSigner":false},{"name":"adminTokenFee","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"vaultProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"goosefxSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"controller","isMut":false,"isSigner":false},{"name":"pair","isMut":true,"isSigner":false},{"name":"sslIn","isMut":true,"isSigner":false},{"name":"sslOut","isMut":true,"isSigner":false},{"name":"liabilityVaultIn","isMut":true,"isSigner":false},{"name":"swappedLiabilityVaultIn","isMut":true,"isSigner":false},{"name":"liabilityVaultOut","isMut":true,"isSigner":false},{"name":"swappedLiabilityVaultOut","isMut":true,"isSigner":false},{"name":"userInAta","isMut":true,"isSigner":false},{"name":"userOutAta","isMut":true,"isSigner":false},{"name":"feeCollectorAta","isMut":true,"isSigner":false},{"name":"userWallet","isMut":false,"isSigner":true},{"name":"feeCollector","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"deltafiSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"marketConfig","isMut":false,"isSigner":false},{"name":"swapInfo","isMut":true,"isSigner":false},{"name":"userSourceToken","isMut":true,"isSigner":false},{"name":"userDestinationToken","isMut":true,"isSigner":false},{"name":"swapSourceToken","isMut":true,"isSigner":false},{"name":"swapDestinationToken","isMut":true,"isSigner":false},{"name":"deltafiUser","isMut":true,"isSigner":false},{"name":"adminDestinationToken","isMut":true,"isSigner":false},{"name":"pythPriceBase","isMut":false,"isSigner":false},{"name":"pythPriceQuote","isMut":false,"isSigner":false},{"name":"userAuthority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"balansolSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"pool","isMut":true,"isSigner":false},{"name":"taxMan","isMut":true,"isSigner":false},{"name":"bidMint","isMut":false,"isSigner":false},{"name":"treasurer","isMut":false,"isSigner":false},{"name":"srcTreasury","isMut":true,"isSigner":false},{"name":"srcAssociatedTokenAccount","isMut":true,"isSigner":false},{"name":"askMint","isMut":false,"isSigner":false},{"name":"dstTreasury","isMut":true,"isSigner":false},{"name":"dstAssociatedTokenAccount","isMut":true,"isSigner":false},{"name":"dstTokenAccountTaxman","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"marcoPoloSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tokenX","isMut":false,"isSigner":false},{"name":"tokenY","isMut":false,"isSigner":false},{"name":"poolXAccount","isMut":true,"isSigner":false},{"name":"poolYAccount","isMut":true,"isSigner":false},{"name":"swapperXAccount","isMut":true,"isSigner":false},{"name":"swapperYAccount","isMut":true,"isSigner":false},{"name":"swapper","isMut":true,"isSigner":true},{"name":"referrerXAccount","isMut":true,"isSigner":false},{"name":"referrerYAccount","isMut":true,"isSigner":false},{"name":"referrer","isMut":true,"isSigner":false},{"name":"programAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"dradexSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"pair","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"dexUser","isMut":false,"isSigner":false},{"name":"marketUser","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"t0Vault","isMut":true,"isSigner":false},{"name":"t1Vault","isMut":true,"isSigner":false},{"name":"t0User","isMut":true,"isSigner":false},{"name":"t1User","isMut":true,"isSigner":false},{"name":"master","isMut":false,"isSigner":false},{"name":"signer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"logger","isMut":false,"isSigner":false}],"args":[]},{"name":"lifinityV2Swap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"amm","isMut":true,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"destinationInfo","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"feeAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"oracleMainAccount","isMut":false,"isSigner":false},{"name":"oracleSubAccount","isMut":false,"isSigner":false},{"name":"oraclePcAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"raydiumClmmSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"ammConfig","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false},{"name":"inputTokenAccount","isMut":true,"isSigner":false},{"name":"outputTokenAccount","isMut":true,"isSigner":false},{"name":"inputVault","isMut":true,"isSigner":false},{"name":"outputVault","isMut":true,"isSigner":false},{"name":"observationState","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tickArray","isMut":true,"isSigner":false}],"args":[]},{"name":"phoenixSwap","accounts":[{"name":"swapProgram","isMut":false,"isSigner":false},{"name":"logAuthority","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"trader","isMut":false,"isSigner":true},{"name":"baseAccount","isMut":true,"isSigner":false},{"name":"quoteAccount","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"claimBonk","accounts":[{"name":"openOrders","isMut":false,"isSigner":false},{"name":"bonkMint","isMut":false,"isSigner":false},{"name":"openOrdersBonkTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"openOrdersOwner","isMut":true,"isSigner":false},{"name":"claimerTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]}],"types":[{"name":"AmountWithSlippage","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"slippageBps","type":"u16"}]}},{"name":"SplitLegDeeper","type":{"kind":"struct","fields":[{"name":"percent","type":"u8"},{"name":"swapLeg","type":{"defined":"SwapLegSwap"}}]}},{"name":"SplitLeg","type":{"kind":"struct","fields":[{"name":"percent","type":"u8"},{"name":"swapLeg","type":{"defined":"SwapLegDeeper"}}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"SwapLegSwap","type":{"kind":"enum","variants":[{"name":"PlaceholderOne"},{"name":"PlaceholderTwo"},{"name":"Swap","fields":[{"name":"swap","type":{"defined":"Swap"}}]}]}},{"name":"SwapLegDeeper","type":{"kind":"enum","variants":[{"name":"Chain","fields":[{"name":"swap_legs","type":{"vec":{"defined":"SwapLegSwap"}}}]},{"name":"Split","fields":[{"name":"split_legs","type":{"vec":{"defined":"SplitLegDeeper"}}}]},{"name":"Swap","fields":[{"name":"swap","type":{"defined":"Swap"}}]}]}},{"name":"SwapLeg","type":{"kind":"enum","variants":[{"name":"Chain","fields":[{"name":"swap_legs","type":{"vec":{"defined":"SwapLegDeeper"}}}]},{"name":"Split","fields":[{"name":"split_legs","type":{"vec":{"defined":"SplitLeg"}}}]},{"name":"Swap","fields":[{"name":"swap","type":{"defined":"Swap"}}]}]}},{"name":"Swap","type":{"kind":"enum","variants":[{"name":"Saber"},{"name":"SaberAddDecimalsDeposit"},{"name":"SaberAddDecimalsWithdraw"},{"name":"TokenSwap"},{"name":"Sencha"},{"name":"Step"},{"name":"Cropper"},{"name":"Raydium"},{"name":"Crema","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Lifinity"},{"name":"Mercurial"},{"name":"Cykura"},{"name":"Serum","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"MarinadeDeposit"},{"name":"MarinadeUnstake"},{"name":"Aldrin","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"AldrinV2","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"Whirlpool","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Invariant","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Meteora"},{"name":"GooseFX"},{"name":"DeltaFi","fields":[{"name":"stable","type":"bool"}]},{"name":"Balansol"},{"name":"MarcoPolo","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Dradex","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"LifinityV2"},{"name":"RaydiumClmm"},{"name":"Openbook","fields":[{"name":"side","type":{"defined":"Side"}}]},{"name":"Phoenix","fields":[{"name":"side","type":{"defined":"Side"}}]}]}}],"events":[{"name":"Swap","fields":[{"name":"amm","type":"publicKey","index":false},{"name":"inputMint","type":"publicKey","index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputMint","type":"publicKey","index":false},{"name":"outputAmount","type":"u64","index":false}]},{"name":"Fee","fields":[{"name":"account","type":"publicKey","index":false},{"name":"mint","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"EmptyRoute","msg":"Empty route"},{"code":6001,"name":"SlippageToleranceExceeded","msg":"Slippage tolerance exceeded"},{"code":6002,"name":"InvalidCalculation","msg":"Invalid calculation"},{"code":6003,"name":"MissingPlatformFeeAccount","msg":"Missing platform fee account"},{"code":6004,"name":"InvalidSlippage","msg":"Invalid slippage"},{"code":6005,"name":"NotEnoughPercent","msg":"Not enough percent to 100"},{"code":6006,"name":"InAmountsStackIsEmpty","msg":"In amounts stack is empty"},{"code":6007,"name":"OutAmountsStackIsEmpty","msg":"Out amounts stack is empty"},{"code":6008,"name":"NotEnoughAccountKeys","msg":"Not Enough Account keys"},{"code":6009,"name":"NonZeroMinimumOutAmountNotSupported","msg":"Non zero minimum out amount not supported"}]} \ No newline at end of file diff --git a/idls/jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json b/idls/jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json new file mode 100644 index 0000000..f385542 --- /dev/null +++ b/idls/jupiter_v6.JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4.json @@ -0,0 +1 @@ +{"address":"JUP6LkbZbjS1jKKwapdHNy74zcZ3tLUZoi5QNyVTaV4","metadata":{"name":"jupiter","version":"0.1.0","spec":"0.1.0","description":"Jupiter aggregator program"},"instructions":[{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"wallet","writable":true,"address":"7JQeyNK55fkUPUmEotupBFpiBGpgEQYLe8Ht1VdSfxcP"},{"name":"program_authority","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"id","type":"u8"}],"returns":"u64"},{"name":"claim_token","discriminator":[116,206,27,191,166,19,0,73],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"wallet","address":"7JQeyNK55fkUPUmEotupBFpiBGpgEQYLe8Ht1VdSfxcP"},{"name":"program_authority"},{"name":"program_token_account","writable":true},{"name":"destination_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"wallet"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"mint"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"id","type":"u8"}],"returns":"u64"},{"name":"close_token","discriminator":[26,74,236,151,104,64,183,249],"accounts":[{"name":"operator","signer":true,"address":"9RAufBfjGQjDfrwxeyKmZWPADHSb8HcoqCdrmpqvCr1g"},{"name":"wallet","writable":true,"address":"7JQeyNK55fkUPUmEotupBFpiBGpgEQYLe8Ht1VdSfxcP"},{"name":"program_authority"},{"name":"program_token_account","writable":true},{"name":"mint","writable":true},{"name":"token_program"}],"args":[{"name":"id","type":"u8"},{"name":"burn_all","type":"bool"}]},{"name":"create_token_ledger","discriminator":[232,242,197,253,240,143,129,52],"accounts":[{"name":"token_ledger","writable":true,"signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_token_account","discriminator":[147,241,123,100,244,132,174,118],"accounts":[{"name":"token_account","writable":true},{"name":"user","writable":true,"signer":true},{"name":"mint"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"}]},{"name":"close_wsol_token_account","discriminator":[203,129,103,133,197,125,107,86],"accounts":[{"name":"token_account","writable":true},{"name":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"exact_out_route","discriminator":[208,51,239,151,123,43,237,92],"accounts":[{"name":"token_program"},{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"route","discriminator":[229,23,203,151,122,227,173,42],"accounts":[{"name":"token_program"},{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"route_with_token_ledger","discriminator":[150,86,71,116,167,93,14,104],"accounts":[{"name":"token_program"},{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_ledger"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"set_token_ledger","discriminator":[228,85,185,112,78,79,77,2],"accounts":[{"name":"token_ledger","writable":true},{"name":"token_account"}],"args":[]},{"name":"shared_accounts_exact_out_route","discriminator":[176,209,105,168,154,125,69,62],"accounts":[{"name":"token_program"},{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"shared_accounts_route","discriminator":[193,32,155,51,65,214,156,129],"accounts":[{"name":"token_program"},{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"shared_accounts_route_with_token_ledger","discriminator":[230,121,143,80,119,159,106,170],"accounts":[{"name":"token_program"},{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"token_2022_program","optional":true},{"name":"token_ledger"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStep"}}}},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u8"}],"returns":"u64"},{"name":"exact_out_route_v2","discriminator":[157,138,184,82,21,244,243,36],"accounts":[{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"destination_token_account","writable":true,"optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"},{"name":"route_v2","discriminator":[187,100,250,204,49,196,175,20],"accounts":[{"name":"user_transfer_authority","signer":true},{"name":"user_source_token_account","writable":true},{"name":"user_destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"destination_token_account","writable":true,"optional":true},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"},{"name":"shared_accounts_exact_out_route_v2","discriminator":[53,96,229,202,216,187,250,24],"accounts":[{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"out_amount","type":"u64"},{"name":"quoted_in_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"},{"name":"shared_accounts_route_v2","discriminator":[209,152,83,147,124,254,216,233],"accounts":[{"name":"program_authority"},{"name":"user_transfer_authority","signer":true},{"name":"source_token_account","writable":true},{"name":"program_source_token_account","writable":true},{"name":"program_destination_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"source_token_program"},{"name":"destination_token_program"},{"name":"event_authority","address":"D8cy77BBepLMngZx6ZukaTff5hCt1HrWyKk3Hnd9oitf"},{"name":"program"}],"args":[{"name":"id","type":"u8"},{"name":"in_amount","type":"u64"},{"name":"quoted_out_amount","type":"u64"},{"name":"slippage_bps","type":"u16"},{"name":"platform_fee_bps","type":"u16"},{"name":"positive_slippage_bps","type":"u16"},{"name":"route_plan","type":{"vec":{"defined":{"name":"RoutePlanStepV2"}}}}],"returns":"u64"}],"accounts":[{"name":"TokenLedger","discriminator":[156,247,9,188,54,108,85,77]}],"events":[{"name":"FeeEvent","discriminator":[73,79,78,127,184,213,13,220]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"SwapsEvent","discriminator":[152,47,78,235,192,96,110,106]},{"name":"CandidateSwapResults","discriminator":[45,9,244,30,229,52,168,123]},{"name":"CandidateSwapQuoteError","discriminator":[248,134,37,55,145,177,114,79]},{"name":"BestSwapOutAmountViolation","discriminator":[124,66,196,51,218,173,46,93]}],"errors":[{"code":6000,"name":"EmptyRoute","msg":"Empty route"},{"code":6001,"name":"SlippageToleranceExceeded","msg":"Slippage tolerance exceeded"},{"code":6002,"name":"InvalidCalculation","msg":"Invalid calculation"},{"code":6003,"name":"MissingPlatformFeeAccount","msg":"Missing platform fee account"},{"code":6004,"name":"InvalidSlippage","msg":"Invalid slippage"},{"code":6005,"name":"NotEnoughPercent","msg":"Not enough percent to 100"},{"code":6006,"name":"InvalidInputIndex","msg":"Token input index is invalid"},{"code":6007,"name":"InvalidOutputIndex","msg":"Token output index is invalid"},{"code":6008,"name":"NotEnoughAccountKeys","msg":"Not Enough Account keys"},{"code":6009,"name":"NonZeroMinimumOutAmountNotSupported","msg":"Non zero minimum out amount not supported"},{"code":6010,"name":"InvalidRoutePlan","msg":"Invalid route plan"},{"code":6011,"name":"InvalidReferralAuthority","msg":"Invalid referral authority"},{"code":6012,"name":"LedgerTokenAccountDoesNotMatch","msg":"Token account doesn't match the ledger"},{"code":6013,"name":"InvalidTokenLedger","msg":"Invalid token ledger"},{"code":6014,"name":"IncorrectTokenProgramID","msg":"Token program ID is invalid"},{"code":6015,"name":"TokenProgramNotProvided","msg":"Token program not provided"},{"code":6016,"name":"SwapNotSupported","msg":"Swap not supported"},{"code":6017,"name":"ExactOutAmountNotMatched","msg":"Exact out amount doesn't match"},{"code":6018,"name":"SourceAndDestinationMintCannotBeTheSame","msg":"Source mint and destination mint cannot the same"},{"code":6019,"name":"InvalidMint","msg":"Invalid mint"},{"code":6020,"name":"InvalidProgramAuthority","msg":"Invalid program authority"},{"code":6021,"name":"InvalidOutputTokenAccount","msg":"Invalid output token account"},{"code":6022,"name":"InvalidFeeWallet","msg":"Invalid fee wallet"},{"code":6023,"name":"InvalidAuthority","msg":"Invalid authority"},{"code":6024,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6025,"name":"InvalidTokenAccount","msg":"Invalid token account"},{"code":6026,"name":"BondingCurveAlreadyCompleted","msg":"Bonding curve already completed"}],"types":[{"name":"FeeEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":"u8"},{"name":"length","type":"u8"}]}},{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookReward"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"}]}},{"name":"DefiTunaAccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"}]}},{"name":"RoutePlanStep","type":{"kind":"struct","fields":[{"name":"swap","type":{"defined":{"name":"Swap"}}},{"name":"percent","type":"u8"},{"name":"input_index","type":"u8"},{"name":"output_index","type":"u8"}]}},{"name":"RoutePlanStepV2","type":{"kind":"struct","fields":[{"name":"swap","type":{"defined":{"name":"Swap"}}},{"name":"bps","type":"u16"},{"name":"input_index","type":"u8"},{"name":"output_index","type":"u8"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"BisonFiPredictSide","type":{"kind":"enum","variants":[{"name":"Yes"},{"name":"No"}]}},{"name":"Swap","type":{"kind":"enum","variants":[{"name":"Saber"},{"name":"SaberAddDecimalsDeposit"},{"name":"SaberAddDecimalsWithdraw"},{"name":"TokenSwap"},{"name":"Sencha"},{"name":"Step"},{"name":"Cropper"},{"name":"Raydium"},{"name":"Crema","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Lifinity"},{"name":"Mercurial"},{"name":"Cykura"},{"name":"Serum","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"MarinadeDeposit"},{"name":"MarinadeUnstake"},{"name":"Aldrin","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"AldrinV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"Whirlpool","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Invariant","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Meteora"},{"name":"GooseFX"},{"name":"DeltaFi","fields":[{"name":"stable","type":"bool"}]},{"name":"Balansol"},{"name":"MarcoPolo","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"Dradex","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"LifinityV2"},{"name":"RaydiumClmm"},{"name":"Openbook","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"Phoenix","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"Symmetry","fields":[{"name":"from_token_id","type":"u64"},{"name":"to_token_id","type":"u64"}]},{"name":"TokenSwapV2"},{"name":"HeliumTreasuryManagementRedeemV0"},{"name":"StakeDexStakeWrappedSol"},{"name":"StakeDexSwapViaStake","fields":[{"name":"bridge_stake_seed","type":"u32"}]},{"name":"GooseFXV2"},{"name":"Perps"},{"name":"PerpsAddLiquidity"},{"name":"PerpsRemoveLiquidity"},{"name":"MeteoraDlmm"},{"name":"OpenBookV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"RaydiumClmmV2"},{"name":"StakeDexPrefundWithdrawStakeAndDepositStake","fields":[{"name":"bridge_stake_seed","type":"u32"}]},{"name":"Clone","fields":[{"name":"pool_index","type":"u8"},{"name":"quantity_is_input","type":"bool"},{"name":"quantity_is_collateral","type":"bool"}]},{"name":"SanctumS","fields":[{"name":"src_lst_value_calc_accs","type":"u8"},{"name":"dst_lst_value_calc_accs","type":"u8"},{"name":"src_lst_index","type":"u32"},{"name":"dst_lst_index","type":"u32"}]},{"name":"SanctumSAddLiquidity","fields":[{"name":"lst_value_calc_accs","type":"u8"},{"name":"lst_index","type":"u32"}]},{"name":"SanctumSRemoveLiquidity","fields":[{"name":"lst_value_calc_accs","type":"u8"},{"name":"lst_index","type":"u32"}]},{"name":"RaydiumCP"},{"name":"WhirlpoolSwapV2","fields":[{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"OneIntro"},{"name":"PumpWrappedBuy"},{"name":"PumpWrappedSell"},{"name":"PerpsV2"},{"name":"PerpsV2AddLiquidity"},{"name":"PerpsV2RemoveLiquidity"},{"name":"MoonshotWrappedBuy"},{"name":"MoonshotWrappedSell"},{"name":"StabbleStableSwap"},{"name":"StabbleWeightedSwap"},{"name":"Obric","fields":[{"name":"x_to_y","type":"bool"}]},{"name":"FoxBuyFromEstimatedCost"},{"name":"FoxClaimPartial","fields":[{"name":"is_y","type":"bool"}]},{"name":"SolFi","fields":[{"name":"is_quote_to_base","type":"bool"}]},{"name":"SolayerDelegateNoInit"},{"name":"SolayerUndelegateNoInit"},{"name":"TokenMill","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"DaosFunBuy"},{"name":"DaosFunSell"},{"name":"ZeroFi"},{"name":"StakeDexWithdrawWrappedSol"},{"name":"VirtualsBuy"},{"name":"VirtualsSell"},{"name":"Perena","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"}]},{"name":"PumpSwapBuy"},{"name":"PumpSwapSell"},{"name":"Gamma"},{"name":"MeteoraDlmmSwapV2","fields":[{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"Woofi"},{"name":"MeteoraDammV2"},{"name":"MeteoraDynamicBondingCurveSwap"},{"name":"StabbleStableSwapV2"},{"name":"StabbleWeightedSwapV2"},{"name":"RaydiumLaunchlabBuy","fields":[{"name":"share_fee_rate","type":"u64"}]},{"name":"RaydiumLaunchlabSell","fields":[{"name":"share_fee_rate","type":"u64"}]},{"name":"BoopdotfunWrappedBuy"},{"name":"BoopdotfunWrappedSell"},{"name":"Plasma","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"GoonFi","fields":[{"name":"is_bid","type":"bool"},{"name":"blacklist_bump","type":"u8"}]},{"name":"HumidiFi","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"MeteoraDynamicBondingCurveSwapWithRemainingAccounts"},{"name":"TesseraV","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"PumpWrappedBuyV2"},{"name":"PumpWrappedSellV2"},{"name":"PumpSwapBuyV2"},{"name":"PumpSwapSellV2"},{"name":"Heaven","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"SolFiV2","fields":[{"name":"is_quote_to_base","type":"bool"}]},{"name":"Aquifer"},{"name":"PumpWrappedBuyV3"},{"name":"PumpWrappedSellV3"},{"name":"PumpSwapBuyV3"},{"name":"PumpSwapSellV3"},{"name":"JupiterLendDeposit"},{"name":"JupiterLendRedeem"},{"name":"DefiTuna","fields":[{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"AlphaQ","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"RaydiumV2"},{"name":"SarosDlmm","fields":[{"name":"swap_for_y","type":"bool"}]},{"name":"Futarchy","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"MeteoraDammV2WithRemainingAccounts"},{"name":"Obsidian"},{"name":"WhaleStreet","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"DynamicV1","fields":[{"name":"candidate_swaps","type":{"vec":{"defined":{"name":"CandidateSwap"}}}},{"name":"best_position","type":{"option":"u8"}}]},{"name":"PumpWrappedBuyV4"},{"name":"PumpWrappedSellV4"},{"name":"CarrotIssue"},{"name":"CarrotRedeem"},{"name":"Manifest","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"BisonFi","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"HumidiFiV2","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"PerenaStar","fields":[{"name":"is_mint","type":"bool"}]},{"name":"JupiterRfqV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"fill_data","type":"bytes"}]},{"name":"GoonFiV2","fields":[{"name":"is_bid","type":"bool"}]},{"name":"Scorch","fields":[{"name":"swap_id","type":"u128"}]},{"name":"VaultLiquidUnstake","fields":[{"name":"lst_amounts","type":{"array":["u64",5]}},{"name":"seed","type":"u64"}]},{"name":"XOrca"},{"name":"Quantum","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"WhaleStreetV2","fields":[{"name":"side","type":{"defined":{"name":"Side"}}},{"name":"auth_amount_in","type":"u64"},{"name":"auth","type":"u64"}]},{"name":"Riptide","fields":[{"name":"amount_is_token_a","type":"bool"}]},{"name":"RunnerRodeo"},{"name":"TaurusFi","fields":[{"name":"is_base_in","type":"bool"}]},{"name":"Omnipair"},{"name":"MSwap"},{"name":"Hylo","fields":[{"name":"swap_type","type":{"defined":{"name":"HyloSwapType"}}}]},{"name":"VoltrDeposit"},{"name":"VoltrWithdraw"},{"name":"SanctumSV2","fields":[{"name":"src_lst_value_calc_accs","type":"u8"},{"name":"dst_lst_value_calc_accs","type":"u8"},{"name":"src_lst_index","type":"u32"},{"name":"dst_lst_index","type":"u32"}]},{"name":"LemmingsFi","fields":[{"name":"is_base_in","type":"bool"}]},{"name":"ScaleVmmBuy"},{"name":"ScaleVmmSell"},{"name":"ScaleAmmBuy"},{"name":"ScaleAmmSell"},{"name":"BisonFiV2","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"Trends"},{"name":"HumaDeposit"},{"name":"HumaInstantWithdraw"},{"name":"Kipseli","fields":[{"name":"is_base_to_quote","type":"bool"}]},{"name":"DynamicV2","fields":[{"name":"candidate_swaps","type":{"vec":{"defined":{"name":"CandidateSwapWithBps"}}}},{"name":"max_split_quote_calls","type":"u8"},{"name":"max_split_candidates","type":"u8"}]},{"name":"PumpSwapBuyV3WithCashbackClaim"},{"name":"PumpSwapSellV3WithCashbackClaim"},{"name":"PumpWrappedBuyV4WithCashbackClaim"},{"name":"PumpWrappedSellV4WithCashbackClaim"},{"name":"GoonFiV3","fields":[{"name":"is_bid","type":"bool"}]},{"name":"PumpWrappedBuyV5","fields":[{"name":"claim_cashback","type":"bool"}]},{"name":"PumpWrappedSellV5","fields":[{"name":"claim_cashback","type":"bool"}]},{"name":"ZeroFiSwapV2"},{"name":"BisonFiPredict","fields":[{"name":"side","type":{"defined":{"name":"BisonFiPredictSide"}}},{"name":"is_buy","type":"bool"}]},{"name":"ByrealDynamicV3"},{"name":"Flux","fields":[{"name":"swap_id","type":"u64"},{"name":"base_to_quote","type":"bool"}]}]}},{"name":"CandidateSwapWithBps","type":{"kind":"struct","fields":[{"name":"candidate_swap","type":{"defined":{"name":"CandidateSwap"}}},{"name":"bps","type":"u32"}]}},{"name":"CandidateSwap","type":{"kind":"enum","variants":[{"name":"HumidiFi","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"TesseraV","fields":[{"name":"side","type":{"defined":{"name":"Side"}}}]},{"name":"HumidiFiV2","fields":[{"name":"swap_id","type":"u64"},{"name":"is_base_to_quote","type":"bool"}]},{"name":"RaydiumV2"},{"name":"RaydiumClmm"},{"name":"Whirlpool","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"ZeroFi"},{"name":"BisonFiV2","fields":[{"name":"a_to_b","type":"bool"}]},{"name":"GoonFiV2","fields":[{"name":"is_bid","type":"bool"}]},{"name":"GoonFiV3","fields":[{"name":"is_bid","type":"bool"}]},{"name":"WhirlpoolV2","fields":[{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"ZeroFiSwapV2"}]}},{"name":"HyloSwapType","type":{"kind":"enum","variants":[{"name":"MintStable"},{"name":"RedeemStable"},{"name":"MintLever"},{"name":"RedeemLever"},{"name":"SwapStableToLever"},{"name":"SwapLeverToStable"},{"name":"StabilityPoolDeposit"},{"name":"StabilityPoolWithdraw"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"amm","type":"pubkey"},{"name":"input_mint","type":"pubkey"},{"name":"input_amount","type":"u64"},{"name":"output_mint","type":"pubkey"},{"name":"output_amount","type":"u64"}]}},{"name":"SwapEventV2","type":{"kind":"struct","fields":[{"name":"input_mint","type":"pubkey"},{"name":"input_amount","type":"u64"},{"name":"output_mint","type":"pubkey"},{"name":"output_amount","type":"u64"}]}},{"name":"SwapsEvent","type":{"kind":"struct","fields":[{"name":"swap_events","type":{"vec":{"defined":{"name":"SwapEventV2"}}}}]}},{"name":"TokenLedger","type":{"kind":"struct","fields":[{"name":"token_account","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"BestSwapOutAmountViolation","type":{"kind":"struct","fields":[{"name":"expected_out_amount","type":"u64"},{"name":"out_amount","type":"u64"}]}},{"name":"CandidateSwapResult","type":{"kind":"enum","variants":[{"name":"OutAmount","fields":["u64"]},{"name":"ProgramError","fields":["u64"]}]}},{"name":"CandidateSwapResults","type":{"kind":"struct","fields":[{"name":"results","type":{"vec":{"defined":{"name":"CandidateSwapResult"}}}}]}},{"name":"CandidateSwapQuoteError","type":{"kind":"struct","fields":[{"name":"candidate_index","type":"u64"},{"name":"in_amount","type":"u64"},{"name":"error_code","type":"u64"}]}}]} \ No newline at end of file diff --git a/idls/kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json b/idls/kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json new file mode 100644 index 0000000..eb8500e --- /dev/null +++ b/idls/kamino.6LtLpnUFNByNXLyCoK9wA2MykKAmQNZKBdY8s47dehDc.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"yvaults","instructions":[{"name":"initializeStrategy","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false,"docs":["Program owner also checked."]},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":true,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false}],"args":[{"name":"strategyType","type":"u64"},{"name":"tokenACollateralId","type":"u64"},{"name":"tokenBCollateralId","type":"u64"}]},{"name":"initializeKaminoReward","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":true},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"kaminoRewardIndex","type":"u64"},{"name":"collateralToken","type":"u64"}]},{"name":"addKaminoRewards","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"rewardAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"kaminoRewardIndex","type":"u64"},{"name":"amount","type":"u64"}]},{"name":"initializeGlobalConfig","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"collInfo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u64"},{"name":"mode","type":"u64"},{"name":"value","type":{"array":["u8",32]}}]},{"name":"insertCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u64"},{"name":"params","type":{"defined":"CollateralInfoParams"}}]},{"name":"initializeSharesMetadata","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":false,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateSharesMetadata","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":false,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateGlobalConfig","accounts":[{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"key","type":"u16"},{"name":"index","type":"u16"},{"name":"value","type":{"array":["u8",32]}}]},{"name":"updateTreasuryFeeVault","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"feeMint","isMut":false,"isSigner":false},{"name":"treasuryFeeVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralId","type":"u16"}]},{"name":"updateStrategyConfig","accounts":[{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"newAccount","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u16"},{"name":"value","type":{"array":["u8",128]}}]},{"name":"updateRewardMapping","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":true},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"rewardIndex","type":"u8"},{"name":"collateralToken","type":"u8"}]},{"name":"openLiquidityPosition","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionMint","isMut":true,"isSigner":false},{"name":"positionMetadataAccount","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"system","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"oldTickArrayLowerOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldTickArrayUpperOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionMintOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionTokenAccountOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true},{"name":"consensusAccount","isMut":false,"isSigner":false}],"args":[{"name":"tickLowerIndex","type":"i64"},{"name":"tickUpperIndex","type":"i64"},{"name":"bump","type":"u8"}]},{"name":"closeStrategy","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"oldPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionMintOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldPositionTokenAccountOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldTickArrayLowerOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"oldTickArrayUpperOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"userTokenAAta","isMut":true,"isSigner":false},{"name":"userTokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":true,"isSigner":false},{"name":"tokenBMint","isMut":true,"isSigner":false},{"name":"reward0Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward1Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward2Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"kaminoReward0Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"kaminoReward1Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"kaminoReward2Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userReward0Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userReward1Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userReward2Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userKaminoReward0Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userKaminoReward1Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"userKaminoReward2Ata","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"system","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"tokenMaxA","type":"u64"},{"name":"tokenMaxB","type":"u64"}]},{"name":"invest","accounts":[{"name":"actionsAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"referencePriceTick","type":"i32"}]},{"name":"depositAndInvest","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false,"docs":["check that the pool is owned either by orca or by raydium"]},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"tokenMaxA","type":"u64"},{"name":"tokenMaxB","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenAVault","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenBVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"executiveWithdraw","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"action","type":"u8"}]},{"name":"collectFeesAndRewards","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenAVault","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenBVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":false,"isSigner":false},{"name":"reward0Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward1Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"reward2Vault","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"poolRewardVault0","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"poolRewardVault1","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"poolRewardVault2","isMut":true,"isSigner":false,"docs":["If rewards are uninitialized, pass this as strategy."]},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"swapRewards","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenAVault","isMut":true,"isSigner":false},{"name":"treasuryFeeTokenBVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"userTokenAAta","isMut":true,"isSigner":false},{"name":"userTokenBAta","isMut":true,"isSigner":false},{"name":"userRewardTokenAccount","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"scopePricesReward","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"rewardTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"tokenAIn","type":"u64"},{"name":"tokenBIn","type":"u64"},{"name":"rewardIndex","type":"u64"},{"name":"rewardCollateralId","type":"u64"},{"name":"minCollateralTokenOut","type":"u64"}]},{"name":"checkExpectedVaultsBalances","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"tokenAAta","isMut":false,"isSigner":false},{"name":"tokenBAta","isMut":false,"isSigner":false}],"args":[{"name":"tokenAAtaBalance","type":"u64"},{"name":"tokenBAtaBalance","type":"u64"}]},{"name":"singleTokenDepositAndInvestWithMin","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false,"docs":["check that the pool is owned either by orca or by raydium"]},{"name":"position","isMut":true,"isSigner":false},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","isMut":true,"isSigner":false},{"name":"positionTokenAccount","isMut":true,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArrayLower","isMut":true,"isSigner":false},{"name":"tickArrayUpper","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram2022","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"tokenAMinPostDepositBalance","type":"u64"},{"name":"tokenBMinPostDepositBalance","type":"u64"}]},{"name":"singleTokenDepositWithMin","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"sharesMintAuthority","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"tokenAMinPostDepositBalance","type":"u64"},{"name":"tokenBMinPostDepositBalance","type":"u64"}]},{"name":"flashSwapUnevenVaultsStart","docs":["Start of a Flash swap uneven vaults.","","This needs to be the first instruction of the transaction or preceded only by a","ComputeBudget.","","This ix has to be paired with a `flash_swap_uneven_vaults_end` (`FlashSwapUnevenVaultsEnd`)","as the last instruction of the transaction. No other instruction targeted the program is","allowed.","The instructions between the start and end instructions are expected to perform the swap."],"accounts":[{"name":"swapper","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"consensusAccount","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"aToB","type":"bool"}]},{"name":"flashSwapUnevenVaultsEnd","docs":["End of Flash swap uneven vaults.","","See [`flash_swap_uneven_vaults_start`] for details.","","Warning: This instruction is allowed to be used independently from","`FlashSwapUnevenVaultsStart` and shall not perform any operation","that can be exploited when used alone."],"accounts":[{"name":"swapper","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAAta","isMut":true,"isSigner":false},{"name":"tokenBAta","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tickArrayLower","isMut":false,"isSigner":false},{"name":"tickArrayUpper","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"consensusAccount","isMut":false,"isSigner":false}],"args":[{"name":"minRepayAmount","type":"u64"},{"name":"amountToLeaveToUser","type":"u64"},{"name":"aToB","type":"bool"}]},{"name":"emergencySwap","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"poolTokenVaultA","isMut":true,"isSigner":false},{"name":"poolTokenVaultB","isMut":true,"isSigner":false},{"name":"tickArray0","isMut":true,"isSigner":false,"docs":["Payer must send this correctly."]},{"name":"tickArray1","isMut":true,"isSigner":false,"docs":["Payer must send this correctly."]},{"name":"tickArray2","isMut":true,"isSigner":false,"docs":["Payer must send this correctly."]},{"name":"oracle","isMut":true,"isSigner":false},{"name":"poolProgram","isMut":false,"isSigner":false},{"name":"scopePricesA","isMut":false,"isSigner":false},{"name":"scopePricesB","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":false,"isSigner":false},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false}],"args":[{"name":"aToB","type":"bool"},{"name":"targetLimitBps","type":"u64"}]},{"name":"withdrawFromTreasury","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"treasuryFeeVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"permisionlessWithdrawFromTreasury","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"treasuryFeeVault","isMut":true,"isSigner":false},{"name":"treasuryFeeVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawFromTopup","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"topupVault","isMut":true,"isSigner":false},{"name":"system","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"changePool","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false},{"name":"oldPosition","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"newPool","isMut":false,"isSigner":false},{"name":"strategyRewardVault0OrBaseVaultAuthority","isMut":false,"isSigner":false},{"name":"strategyRewardVault1OrBaseVaultAuthority","isMut":false,"isSigner":false},{"name":"strategyRewardVault2OrBaseVaultAuthority","isMut":false,"isSigner":false}],"args":[]},{"name":"closeProgramAccount","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"program","isMut":false,"isSigner":false},{"name":"programData","isMut":false,"isSigner":false},{"name":"closingAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"orcaSwap","accounts":[{"name":"funder","isMut":true,"isSigner":true},{"name":"tokenATokenProgram","isMut":false,"isSigner":false},{"name":"tokenBTokenProgram","isMut":false,"isSigner":false},{"name":"memoProgram","isMut":false,"isSigner":false},{"name":"tokenAuthority","isMut":false,"isSigner":false},{"name":"whirlpool","isMut":false,"isSigner":false},{"name":"tokenOwnerAccountA","isMut":false,"isSigner":false},{"name":"tokenVaultA","isMut":false,"isSigner":false},{"name":"tokenOwnerAccountB","isMut":false,"isSigner":false},{"name":"tokenVaultB","isMut":false,"isSigner":false},{"name":"tokenMintA","isMut":false,"isSigner":false},{"name":"tokenMintB","isMut":false,"isSigner":false},{"name":"tickArray0","isMut":false,"isSigner":false},{"name":"tickArray1","isMut":false,"isSigner":false},{"name":"tickArray2","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"whirlpoolProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"otherAmountThreshold","type":"u64"},{"name":"sqrtPriceLimit","type":"u128"},{"name":"amountSpecifiedIsInput","type":"bool"},{"name":"aToB","type":"bool"}]},{"name":"signTerms","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"ownerSignatureState","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"signature","type":{"array":["u8",64]}}]},{"name":"updateStrategyAdmin","accounts":[{"name":"pendingAdmin","isMut":true,"isSigner":true},{"name":"strategy","isMut":true,"isSigner":false}],"args":[]},{"name":"resizeTokenInfos","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"tokenInfos","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"deprecateCollateralInfo","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenInfos","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u64"}]}],"accounts":[{"name":"Whirlpool","docs":["External types"],"type":{"kind":"struct","fields":[{"name":"whirlpoolsConfig","type":"publicKey"},{"name":"whirlpoolBump","type":{"array":["u8",1]}},{"name":"tickSpacing","type":"u16"},{"name":"tickSpacingSeed","type":{"array":["u8",2]}},{"name":"feeRate","type":"u16"},{"name":"protocolFeeRate","type":"u16"},{"name":"liquidity","type":"u128"},{"name":"sqrtPrice","type":"u128"},{"name":"tickCurrentIndex","type":"i32"},{"name":"protocolFeeOwedA","type":"u64"},{"name":"protocolFeeOwedB","type":"u64"},{"name":"tokenMintA","type":"publicKey"},{"name":"tokenVaultA","type":"publicKey"},{"name":"feeGrowthGlobalA","type":"u128"},{"name":"tokenMintB","type":"publicKey"},{"name":"tokenVaultB","type":"publicKey"},{"name":"feeGrowthGlobalB","type":"u128"},{"name":"rewardLastUpdatedTimestamp","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"WhirlpoolRewardInfo"},3]}}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"publicKey"},{"name":"positionMint","type":"publicKey"},{"name":"liquidity","type":"u128"},{"name":"tickLowerIndex","type":"i32"},{"name":"tickUpperIndex","type":"i32"},{"name":"feeGrowthCheckpointA","type":"u128"},{"name":"feeOwedA","type":"u64"},{"name":"feeGrowthCheckpointB","type":"u128"},{"name":"feeOwedB","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"PositionRewardInfo"},3]}}]}},{"name":"PoolState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"ammConfig","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"tokenMint0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"publicKey"},{"name":"tokenMint1","type":"publicKey"},{"name":"tokenVault0","docs":["Token pair vault"],"type":"publicKey"},{"name":"tokenVault1","type":"publicKey"},{"name":"observationKey","docs":["observation account key"],"type":"publicKey"},{"name":"mintDecimals0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mintDecimals1","type":"u8"},{"name":"tickSpacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrtPriceX64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tickCurrent","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"observationIndex","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"observationUpdateDuration","type":"u16"},{"name":"feeGrowthGlobal0X64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"feeGrowthGlobal1X64","type":"u128"},{"name":"protocolFeesToken0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocolFeesToken1","type":"u64"},{"name":"swapInAmountToken0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swapOutAmountToken1","type":"u128"},{"name":"swapInAmountToken1","type":"u128"},{"name":"swapOutAmountToken0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",7]}},{"name":"rewardInfos","type":{"array":[{"defined":"RewardInfo"},3]}},{"name":"tickArrayBitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"totalFeesToken0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"totalFeesClaimedToken0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"totalFeesToken1","type":"u64"},{"name":"totalFeesClaimedToken1","type":"u64"},{"name":"fundFeesToken0","type":"u64"},{"name":"fundFeesToken1","type":"u64"},{"name":"openTime","type":"u64"},{"name":"padding1","type":{"array":["u64",25]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"nftMint","docs":["Mint address of the tokenized position"],"type":"publicKey"},{"name":"poolId","docs":["The ID of the pool with which this token is connected"],"type":"publicKey"},{"name":"tickLowerIndex","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tickUpperIndex","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"feeGrowthInside0LastX64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"feeGrowthInside1LastX64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"tokenFeesOwed0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"tokenFeesOwed1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"PositionRewardInfo"},3]}},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"ProtocolPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"poolId","docs":["The ID of the pool with which this token is connected"],"type":"publicKey"},{"name":"tickLowerIndex","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tickUpperIndex","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"feeGrowthInside0LastX64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"feeGrowthInside1LastX64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"tokenFeesOwed0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"tokenFeesOwed1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"rewardGrowthInside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"WhirlpoolStrategy","type":{"kind":"struct","fields":[{"name":"adminAuthority","type":"publicKey"},{"name":"globalConfig","type":"publicKey"},{"name":"baseVaultAuthority","type":"publicKey"},{"name":"baseVaultAuthorityBump","type":"u64"},{"name":"pool","type":"publicKey"},{"name":"poolTokenVaultA","type":"publicKey"},{"name":"poolTokenVaultB","type":"publicKey"},{"name":"tickArrayLower","type":"publicKey"},{"name":"tickArrayUpper","type":"publicKey"},{"name":"position","type":"publicKey"},{"name":"positionMint","type":"publicKey"},{"name":"positionMetadata","type":"publicKey"},{"name":"positionTokenAccount","type":"publicKey"},{"name":"tokenAVault","type":"publicKey"},{"name":"tokenBVault","type":"publicKey"},{"name":"deprecated0","type":{"array":["publicKey",2]}},{"name":"deprecated1","type":{"array":["u64",2]}},{"name":"tokenAMint","type":"publicKey"},{"name":"tokenBMint","type":"publicKey"},{"name":"tokenAMintDecimals","type":"u64"},{"name":"tokenBMintDecimals","type":"u64"},{"name":"tokenAAmounts","type":"u64"},{"name":"tokenBAmounts","type":"u64"},{"name":"tokenACollateralId","type":"u64"},{"name":"tokenBCollateralId","type":"u64"},{"name":"deprecated2","type":"publicKey"},{"name":"deprecated3","type":"publicKey"},{"name":"sharesMint","type":"publicKey"},{"name":"sharesMintDecimals","type":"u64"},{"name":"sharesMintAuthority","type":"publicKey"},{"name":"sharesMintAuthorityBump","type":"u64"},{"name":"sharesIssued","type":"u64"},{"name":"status","type":"u64"},{"name":"reward0Amount","type":"u64"},{"name":"reward0Vault","type":"publicKey"},{"name":"reward0CollateralId","type":"u64"},{"name":"reward0Decimals","type":"u64"},{"name":"reward1Amount","type":"u64"},{"name":"reward1Vault","type":"publicKey"},{"name":"reward1CollateralId","type":"u64"},{"name":"reward1Decimals","type":"u64"},{"name":"reward2Amount","type":"u64"},{"name":"reward2Vault","type":"publicKey"},{"name":"reward2CollateralId","type":"u64"},{"name":"reward2Decimals","type":"u64"},{"name":"depositCapUsd","type":"u64"},{"name":"feesACumulative","type":"u64"},{"name":"feesBCumulative","type":"u64"},{"name":"reward0AmountCumulative","type":"u64"},{"name":"reward1AmountCumulative","type":"u64"},{"name":"reward2AmountCumulative","type":"u64"},{"name":"depositCapUsdPerIxn","type":"u64"},{"name":"withdrawalCapA","type":{"defined":"WithdrawalCaps"}},{"name":"withdrawalCapB","type":{"defined":"WithdrawalCaps"}},{"name":"maxPriceDeviationBps","type":"u64"},{"name":"swapVaultMaxSlippageBps","type":"u32"},{"name":"swapVaultMaxSlippageFromReferenceBps","type":"u32"},{"name":"strategyType","type":"u64"},{"name":"padding0","type":"u64"},{"name":"withdrawFee","type":"u64"},{"name":"feesFee","type":"u64"},{"name":"reward0Fee","type":"u64"},{"name":"reward1Fee","type":"u64"},{"name":"reward2Fee","type":"u64"},{"name":"positionTimestamp","type":"u64"},{"name":"kaminoRewards","type":{"array":[{"defined":"KaminoRewardInfo"},3]}},{"name":"strategyDex","type":"u64"},{"name":"raydiumProtocolPositionOrBaseVaultAuthority","type":"publicKey"},{"name":"allowDepositWithoutInvest","type":"u64"},{"name":"raydiumPoolConfigOrBaseVaultAuthority","type":"publicKey"},{"name":"depositBlocked","type":"u8"},{"name":"creationStatus","type":"u8"},{"name":"investBlocked","type":"u8"},{"name":"shareCalculationMethod","docs":["share_calculation_method can be either DOLAR_BASED=0 or PROPORTION_BASED=1"],"type":"u8"},{"name":"withdrawBlocked","type":"u8"},{"name":"reservedFlag2","type":"u8"},{"name":"localAdminBlocked","type":"u8"},{"name":"flashVaultSwapAllowed","type":"u8"},{"name":"referenceSwapPriceA","type":{"defined":"Price"}},{"name":"referenceSwapPriceB","type":{"defined":"Price"}},{"name":"isCommunity","type":"u8"},{"name":"rebalanceType","type":"u8"},{"name":"flashSwapInProgress","type":"u8"},{"name":"padding1","type":{"array":["u8",5]}},{"name":"rebalanceRaw","type":{"defined":"RebalanceRaw"}},{"name":"padding2","type":{"array":["u8",7]}},{"name":"tokenAFeesFromRewardsCumulative","type":"u64"},{"name":"tokenBFeesFromRewardsCumulative","type":"u64"},{"name":"strategyLookupTable","type":"publicKey"},{"name":"lastSwapUnevenStepTimestamp","type":"u64"},{"name":"farm","type":"publicKey"},{"name":"rebalancesCap","type":{"defined":"WithdrawalCaps"}},{"name":"padding3NonZeroed","type":{"array":["u64",4]}},{"name":"tokenATokenProgram","type":"publicKey"},{"name":"tokenBTokenProgram","type":"publicKey"},{"name":"pendingAdmin","type":"publicKey"},{"name":"maxDeviationFromRefPriceOnInvestBps","type":"u32"},{"name":"padding3","type":"u32"},{"name":"lastInvestSlot","type":"u64"},{"name":"padding4","type":"u64"},{"name":"padding5","type":{"array":["u128",12]}},{"name":"padding6","type":{"array":["u128",32]}},{"name":"padding7","type":{"array":["u128",32]}},{"name":"padding8","type":{"array":["u128",32]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"emergencyMode","type":"u64"},{"name":"blockDeposit","type":"u64"},{"name":"blockInvest","type":"u64"},{"name":"blockWithdraw","type":"u64"},{"name":"blockCollectFees","type":"u64"},{"name":"blockCollectRewards","type":"u64"},{"name":"blockSwapRewards","type":"u64"},{"name":"blockSwapUnevenVaults","type":"u32"},{"name":"blockEmergencySwap","type":"u32"},{"name":"minWithdrawalFeeBps","type":"u64"},{"name":"scopeProgramId","type":"publicKey"},{"name":"deprecated","type":"publicKey"},{"name":"padding0NonZeroed","type":{"array":["u64",256]}},{"name":"actionsAuthority","type":"publicKey"},{"name":"adminAuthority","type":"publicKey"},{"name":"treasuryFeeVaults","type":{"array":["publicKey",256]}},{"name":"tokenInfos","type":"publicKey"},{"name":"blockLocalAdmin","type":"u64"},{"name":"minPerformanceFeeBps","type":"u64"},{"name":"minSwapUnevenSlippageToleranceBps","type":"u64"},{"name":"minReferencePriceSlippageToleranceBps","type":"u64"},{"name":"actionsAfterRebalanceDelaySeconds","type":"u64"},{"name":"treasuryFeeVaultReceiver","type":"publicKey"},{"name":"scopePriceIds","type":{"array":["publicKey",16]}},{"name":"maxDeviationFromRefPriceOnInvestBps","type":"u32"},{"name":"padding1","type":"u32"},{"name":"investCooldownSlots","type":"u64"},{"name":"minInvestTriggerValueUsd","type":"u64"},{"name":"padding","type":{"array":["u64",1968]}}]}},{"name":"CollateralInfos","type":{"kind":"struct","fields":[{"name":"infos","type":{"array":[{"defined":"CollateralInfo"},303]}}]}},{"name":"ScopeChainAccount","type":{"kind":"struct","fields":[{"name":"chainArray","type":{"array":[{"array":["u16",4]},512]}}]}},{"name":"TermsSignature","type":{"kind":"struct","fields":[{"name":"signature","type":{"array":["u8",64]}}]}}],"types":[{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growthInsideCheckpoint","type":"u128"},{"name":"amountOwed","type":"u64"}]}},{"name":"WhirlpoolRewardInfo","type":{"kind":"struct","fields":[{"name":"mint","docs":["Reward token mint."],"type":"publicKey"},{"name":"vault","docs":["Reward vault token account."],"type":"publicKey"},{"name":"authority","docs":["Authority account that has permission to initialize the reward and set emissions."],"type":"publicKey"},{"name":"emissionsPerSecondX64","docs":["Q64.64 number that indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"growthGlobalX64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"RewardInfo","type":{"kind":"struct","fields":[{"name":"rewardState","docs":["Reward state"],"type":"u8"},{"name":"openTime","docs":["Reward open time"],"type":"u64"},{"name":"endTime","docs":["Reward end time"],"type":"u64"},{"name":"lastUpdateTime","docs":["Reward last update time"],"type":"u64"},{"name":"emissionsPerSecondX64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"rewardTotalEmissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"rewardClaimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"tokenMint","docs":["Reward token mint."],"type":"publicKey"},{"name":"tokenVault","docs":["Reward vault token account."],"type":"publicKey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"publicKey"},{"name":"rewardGrowthGlobalX64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"RebalanceRaw","type":{"kind":"struct","fields":[{"name":"params","type":{"array":["u8",128]}},{"name":"state","type":{"array":["u8",256]}},{"name":"referencePriceType","type":"u8"}]}},{"name":"CollateralInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"lowerHeuristic","type":"u64"},{"name":"upperHeuristic","type":"u64"},{"name":"expHeuristic","type":"u64"},{"name":"maxTwapDivergenceBps","type":"u64"},{"name":"scopeTwapPriceChain","type":{"array":["u16",4]}},{"name":"scopePriceChain","type":{"array":["u16",4]}},{"name":"name","type":{"array":["u8",32]}},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"maxIgnorableAmountAsReward","type":"u64"},{"name":"disabled","type":"u8"},{"name":"padding0","type":{"array":["u8",7]}},{"name":"scopeStakingRateChain","type":{"array":["u16",4]}},{"name":"scopeFeed","type":"publicKey"},{"name":"padding","type":{"array":["u64",4]}}]}},{"name":"CollateralInfoParams","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"lowerHeuristic","type":"u64"},{"name":"upperHeuristic","type":"u64"},{"name":"expHeuristic","type":"u64"},{"name":"maxTwapDivergenceBps","type":"u64"},{"name":"scopeTwapPriceChain","type":{"array":["u16",4]}},{"name":"scopePriceChain","type":{"array":["u16",4]}},{"name":"name","type":{"array":["u8",32]}},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"maxIgnorableAmountAsReward","type":"u64"},{"name":"disabled","type":"u8"},{"name":"scopeStakingRateChain","type":{"array":["u16",4]}},{"name":"scopeFeed","type":"publicKey"}]}},{"name":"KaminoRewardInfo","type":{"kind":"struct","fields":[{"name":"decimals","type":"u64"},{"name":"rewardVault","type":"publicKey"},{"name":"rewardMint","type":"publicKey"},{"name":"rewardCollateralId","type":"u64"},{"name":"lastIssuanceTs","type":"u64"},{"name":"rewardPerSecond","type":"u64"},{"name":"amountUncollected","type":"u64"},{"name":"amountIssuedCumulative","type":"u64"},{"name":"amountAvailable","type":"u64"}]}},{"name":"WithdrawalCaps","type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"Price","type":{"kind":"struct","fields":[{"name":"value","type":"u64"},{"name":"exp","type":"u64"}]}},{"name":"RebalanceAutodriftParams","type":{"kind":"struct","fields":[{"name":"initDriftTicksPerEpoch","type":"u32"},{"name":"ticksBelowMid","type":"i32"},{"name":"ticksAboveMid","type":"i32"},{"name":"frontrunMultiplierBps","type":"u16"},{"name":"stakingRateASource","type":{"defined":"StakingRateSource"}},{"name":"stakingRateBSource","type":{"defined":"StakingRateSource"}},{"name":"initDriftDirection","type":{"defined":"DriftDirection"}}]}},{"name":"RebalanceAutodriftWindow","type":{"kind":"struct","fields":[{"name":"stakingRateA","type":{"option":{"defined":"Price"}}},{"name":"stakingRateB","type":{"option":{"defined":"Price"}}},{"name":"epoch","type":"u64"},{"name":"theoreticalTick","type":"i32"},{"name":"stratMidTick","type":"i32"}]}},{"name":"RebalanceAutodriftState","type":{"kind":"struct","fields":[{"name":"lastWindow","type":{"defined":"RebalanceAutodriftWindow"}},{"name":"currentWindow","type":{"defined":"RebalanceAutodriftWindow"}},{"name":"step","type":{"defined":"RebalanceAutodriftStep"}}]}},{"name":"RebalanceDriftParams","type":{"kind":"struct","fields":[{"name":"startMidTick","type":"i32"},{"name":"ticksBelowMid","type":"i32"},{"name":"ticksAboveMid","type":"i32"},{"name":"secondsPerTick","type":"u64"},{"name":"direction","type":{"defined":"DriftDirection"}}]}},{"name":"RebalanceDriftState","type":{"kind":"struct","fields":[{"name":"step","type":{"defined":"RebalanceDriftStep"}},{"name":"lastDriftTimestamp","type":"u64"},{"name":"lastMidTick","type":"i32"}]}},{"name":"RebalanceExpanderState","type":{"kind":"struct","fields":[{"name":"initialPoolPrice","type":"u128"},{"name":"expansionCount","type":"u16"}]}},{"name":"RebalanceManualState","type":{"kind":"struct","fields":[]}},{"name":"PeriodicRebalanceState","type":{"kind":"struct","fields":[{"name":"lastRebalanceTimestamp","type":"u64"}]}},{"name":"RebalancePricePercentageWithResetState","type":{"kind":"struct","fields":[{"name":"lastRebalanceLowerResetPoolPrice","type":"u128"},{"name":"lastRebalanceUpperResetPoolPrice","type":"u128"}]}},{"name":"RebalancePricePercentageState","type":{"kind":"struct","fields":[{"name":"lastRebalanceLowerPoolPrice","type":"u128"},{"name":"lastRebalanceUpperPoolPrice","type":"u128"}]}},{"name":"RebalanceTakeProfitState","type":{"kind":"struct","fields":[{"name":"step","type":{"defined":"RebalanceTakeProfitStep"}}]}},{"name":"BinAddLiquidityStrategy","type":{"kind":"enum","variants":[{"name":"Uniform","fields":[{"name":"currentBinIndex","type":"i32"},{"name":"lowerBinIndex","type":"i32"},{"name":"upperBinIndex","type":"i32"},{"name":"amountXToDeposit","type":"u64"},{"name":"amountYToDeposit","type":"u64"},{"name":"xCurrentBin","type":"u64"},{"name":"yCurrentBin","type":"u64"}]},{"name":"CurrentTick","fields":["i32"]}]}},{"name":"SimulationPrice","type":{"kind":"enum","variants":[{"name":"PoolPrice"},{"name":"SqrtPrice","fields":["u128"]},{"name":"TickIndex","fields":["i32"]}]}},{"name":"DexSpecificPrice","type":{"kind":"enum","variants":[{"name":"SqrtPrice","fields":["u128"]},{"name":"Q64_64","fields":["u128"]}]}},{"name":"RemoveLiquidityMode","type":{"kind":"enum","variants":[{"name":"Liquidity","fields":["u128"]},{"name":"Bps","fields":["u16"]},{"name":"All"}]}},{"name":"WithdrawalCapAccumulatorAction","type":{"kind":"enum","variants":[{"name":"KeepAccumulator"},{"name":"ResetAccumulator"}]}},{"name":"RebalanceEffects","type":{"kind":"enum","variants":[{"name":"NewRange","fields":["i32","i32"]},{"name":"WithdrawAndFreeze"}]}},{"name":"SwapLimit","type":{"kind":"enum","variants":[{"name":"Bps","fields":["u64"]},{"name":"Absolute","fields":[{"name":"srcAmountToSwap","docs":["Amount of src token expected by the user to perform the swap"],"type":"u64"},{"name":"dstAmountToVault","docs":["Amount of dst token the user provides in exchange"],"type":"u64"},{"name":"aToB","type":"bool"}]}]}},{"name":"MintingMethod","type":{"kind":"enum","variants":[{"name":"PriceBased"},{"name":"Proportional"}]}},{"name":"GlobalConfigOption","type":{"kind":"enum","variants":[{"name":"EmergencyMode"},{"name":"BlockDeposit"},{"name":"BlockInvest"},{"name":"BlockWithdraw"},{"name":"BlockCollectFees"},{"name":"BlockCollectRewards"},{"name":"BlockSwapRewards"},{"name":"BlockSwapUnevenVaults"},{"name":"WithdrawalFeeBps"},{"name":"DeprecatedSwapDiscountBps"},{"name":"ActionsAuthority"},{"name":"DeprecatedTreasuryFeeVaults"},{"name":"AdminAuthority"},{"name":"BlockEmergencySwap"},{"name":"BlockLocalAdmin"},{"name":"UpdateTokenInfos"},{"name":"ScopeProgramId"},{"name":"UpdateScopePriceId"},{"name":"MinPerformanceFeeBps"},{"name":"MinSwapUnevenSlippageToleranceBps"},{"name":"MinReferencePriceSlippageToleranceBps"},{"name":"ActionsAfterRebalanceDelaySeconds"},{"name":"TreasuryFeeVaultReceiver"},{"name":"AddScopePriceId"},{"name":"MaxDeviationFromRefPriceOnInvestBps"},{"name":"InvestCooldownSlots"},{"name":"MinInvestTriggerValueUsd"}]}},{"name":"StrategyConfigOption","type":{"kind":"enum","variants":[{"name":"UpdateDepositCap"},{"name":"UpdateDepositCapIxn"},{"name":"UpdateWithdrawalCapACapacity"},{"name":"UpdateWithdrawalCapAInterval"},{"name":"UpdateWithdrawalCapACurrentTotal"},{"name":"UpdateWithdrawalCapBCapacity"},{"name":"UpdateWithdrawalCapBInterval"},{"name":"UpdateWithdrawalCapBCurrentTotal"},{"name":"UpdateMaxDeviationBps"},{"name":"UpdateSwapVaultMaxSlippage"},{"name":"UpdateStrategyType"},{"name":"UpdateDepositFee"},{"name":"UpdateWithdrawFee"},{"name":"UpdateCollectFeesFee"},{"name":"UpdateReward0Fee"},{"name":"UpdateReward1Fee"},{"name":"UpdateReward2Fee"},{"name":"UpdateAdminAuthority"},{"name":"KaminoRewardIndex0TS"},{"name":"KaminoRewardIndex1TS"},{"name":"KaminoRewardIndex2TS"},{"name":"KaminoRewardIndex0RewardPerSecond"},{"name":"KaminoRewardIndex1RewardPerSecond"},{"name":"KaminoRewardIndex2RewardPerSecond"},{"name":"UpdateDepositBlocked"},{"name":"UpdateRaydiumProtocolPositionOrBaseVaultAuthority"},{"name":"UpdateRaydiumPoolConfigOrBaseVaultAuthority"},{"name":"UpdateInvestBlocked"},{"name":"UpdateWithdrawBlocked"},{"name":"UpdateLocalAdminBlocked"},{"name":"DeprecatedUpdateCollateralIdA"},{"name":"DeprecatedUpdateCollateralIdB"},{"name":"UpdateFlashVaultSwap"},{"name":"AllowDepositWithoutInvest"},{"name":"UpdateSwapVaultMaxSlippageFromRef"},{"name":"ResetReferencePrices"},{"name":"UpdateStrategyCreationState"},{"name":"UpdateIsCommunity"},{"name":"UpdateRebalanceType"},{"name":"UpdateRebalanceParams"},{"name":"UpdateDepositMintingMethod"},{"name":"UpdateLookupTable"},{"name":"UpdateReferencePriceType"},{"name":"UpdateReward0Amount"},{"name":"UpdateReward1Amount"},{"name":"UpdateReward2Amount"},{"name":"UpdateFarm"},{"name":"UpdateRebalancesCapCapacity"},{"name":"UpdateRebalancesCapInterval"},{"name":"UpdateRebalancesCapCurrentTotal"},{"name":"DeprecatedUpdateSwapUnevenAuthority"},{"name":"UpdatePendingStrategyAdmin"},{"name":"UpdateMaxDeviationFromRefPriceOnInvestBps"}]}},{"name":"StrategyStatus","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Active"},{"name":"Frozen"},{"name":"Rebalancing"},{"name":"NoPosition"}]}},{"name":"StrategyType","type":{"kind":"enum","variants":[{"name":"Stable"},{"name":"Pegged"},{"name":"Volatile"}]}},{"name":"CreationStatus","type":{"kind":"enum","variants":[{"name":"IGNORED"},{"name":"SHADOW"},{"name":"LIVE"},{"name":"DEPRECATED"},{"name":"STAGING"}]}},{"name":"ExecutiveWithdrawAction","type":{"kind":"enum","variants":[{"name":"Freeze"},{"name":"Unfreeze"},{"name":"Rebalance"}]}},{"name":"ReferencePriceType","type":{"kind":"enum","variants":[{"name":"POOL"},{"name":"TWAP"}]}},{"name":"LiquidityCalculationMode","type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Withdraw"}]}},{"name":"UpdateCollateralInfoMode","type":{"kind":"enum","variants":[{"name":"CollateralId"},{"name":"LowerHeuristic"},{"name":"UpperHeuristic"},{"name":"ExpHeuristic"},{"name":"TwapDivergence"},{"name":"UpdateScopeTwap"},{"name":"UpdateScopeChain"},{"name":"UpdateName"},{"name":"UpdatePriceMaxAge"},{"name":"UpdateTwapMaxAge"},{"name":"UpdateDisabled"},{"name":"UpdateStakingRateChain"},{"name":"UpdateMaxIgnorableAmountAsReward"},{"name":"UpdateScopeFeed"}]}},{"name":"BalanceStatus","type":{"kind":"enum","variants":[{"name":"Balanced"},{"name":"Unbalanced"}]}},{"name":"RebalanceAutodriftStep","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Autodrifting"}]}},{"name":"StakingRateSource","type":{"kind":"enum","variants":[{"name":"Constant"},{"name":"Scope"}]}},{"name":"DriftDirection","type":{"kind":"enum","variants":[{"name":"Increasing"},{"name":"Decreasing"}]}},{"name":"RebalanceDriftStep","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Drifting"}]}},{"name":"ExpanderStep","type":{"kind":"enum","variants":[{"name":"ExpandOrContract","fields":["u16"]},{"name":"Recenter"}]}},{"name":"RebalanceTakeProfitToken","type":{"kind":"enum","variants":[{"name":"A"},{"name":"B"}]}},{"name":"RebalanceTakeProfitStep","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"TakingProfit"},{"name":"Finished"}]}},{"name":"RebalanceAction","type":{"kind":"enum","variants":[{"name":"NewPriceRange","fields":[{"defined":"DexSpecificPrice"},{"defined":"DexSpecificPrice"}]},{"name":"NewTickRange","fields":["i32","i32"]},{"name":"WithdrawAndFreeze"}]}},{"name":"RebalanceType","type":{"kind":"enum","variants":[{"name":"Manual"},{"name":"PricePercentage"},{"name":"PricePercentageWithReset"},{"name":"Drift"},{"name":"TakeProfit"},{"name":"PeriodicRebalance"},{"name":"Expander"},{"name":"Autodrift"}]}},{"name":"CollateralTestToken","type":{"kind":"enum","variants":[{"name":"USDC"},{"name":"USDH"},{"name":"SOL"},{"name":"ETH"},{"name":"BTC"},{"name":"MSOL"},{"name":"STSOL"},{"name":"USDT"},{"name":"ORCA"},{"name":"MNDE"},{"name":"HBB"},{"name":"JSOL"},{"name":"USH"},{"name":"DAI"},{"name":"LDO"},{"name":"SCNSOL"},{"name":"UXD"},{"name":"HDG"},{"name":"DUST"},{"name":"USDR"},{"name":"RATIO"},{"name":"UXP"},{"name":"JITOSOL"},{"name":"RAY"},{"name":"BONK"},{"name":"SAMO"},{"name":"LaineSOL"},{"name":"BSOL"}]}},{"name":"ScopePriceIdTest","type":{"kind":"enum","variants":[{"name":"SOL"},{"name":"ETH"},{"name":"BTC"},{"name":"SRM"},{"name":"RAY"},{"name":"FTT"},{"name":"MSOL"},{"name":"scnSOL_SOL"},{"name":"BNB"},{"name":"AVAX"},{"name":"DaoSOL_SOL"},{"name":"SaberMSOL_SOL"},{"name":"USDH"},{"name":"StSOL"},{"name":"CSOL_SOL"},{"name":"CETH_ETH"},{"name":"CBTC_BTC"},{"name":"CMSOL_SOL"},{"name":"wstETH"},{"name":"LDO"},{"name":"USDC"},{"name":"CUSDC_USDC"},{"name":"USDT"},{"name":"ORCA"},{"name":"MNDE"},{"name":"HBB"},{"name":"CORCA_ORCA"},{"name":"CSLND_SLND"},{"name":"CSRM_SRM"},{"name":"CRAY_RAY"},{"name":"CFTT_FTT"},{"name":"CSTSOL_STSOL"},{"name":"SLND"},{"name":"DAI"},{"name":"JSOL_SOL"},{"name":"USH"},{"name":"UXD"},{"name":"USDH_TWAP"},{"name":"USH_TWAP"},{"name":"UXD_TWAP"},{"name":"HDG"},{"name":"DUST"},{"name":"USDR"},{"name":"USDR_TWAP"},{"name":"RATIO"},{"name":"UXP"},{"name":"KUXDUSDCORCA"},{"name":"JITOSOL_SOL"},{"name":"SOL_EMA"},{"name":"ETH_EMA"},{"name":"BTC_EMA"},{"name":"SRM_EMA"},{"name":"RAY_EMA"},{"name":"FTT_EMA"},{"name":"MSOL_EMA"},{"name":"BNB_EMA"},{"name":"AVAX_EMA"},{"name":"STSOL_EMA"},{"name":"USDC_EMA"},{"name":"USDT_EMA"},{"name":"SLND_EMA"},{"name":"DAI_EMA"},{"name":"wstETH_TWAP"},{"name":"DUST_TWAP"},{"name":"BONK"},{"name":"BONK_TWAP"},{"name":"SAMO"},{"name":"SAMO_TWAP"},{"name":"BSOL"},{"name":"LaineSOL"}]}},{"name":"DEX","type":{"kind":"enum","variants":[{"name":"Orca"},{"name":"Raydium"},{"name":"Meteora"}]}}],"errors":[{"code":6000,"name":"IntegerOverflow","msg":"Integer overflow"},{"code":6001,"name":"OperationForbidden","msg":"Operation Forbidden"},{"code":6002,"name":"ZeroAmount","msg":"[DEPRECATED] Zero amount"},{"code":6003,"name":"UnableToDeserializeAccount","msg":"Unable to deserialize account"},{"code":6004,"name":"VaultBalanceDoesNotMatchTokenA","msg":"[DEPRECATED] Vault balance does not match for token A"},{"code":6005,"name":"VaultBalanceDoesNotMatchTokenB","msg":"[DEPRECATED] Vault balance does not match for token B"},{"code":6006,"name":"SharesIssuedAmountDoesNotMatch","msg":"[DEPRECATED] Shares issued amount does not match"},{"code":6007,"name":"GlobalConfigKeyError","msg":"Key is not present in global config"},{"code":6008,"name":"SystemInEmergencyMode","msg":"[DEPRECATED] System is in emergency mode"},{"code":6009,"name":"GlobalDepositBlocked","msg":"Global deposit is currently blocked"},{"code":6010,"name":"GlobalWithdrawBlocked","msg":"Global withdraw is currently blocked"},{"code":6011,"name":"GlobalInvestBlocked","msg":"Global invest is currently blocked"},{"code":6012,"name":"OutOfRangeIntegralConversion","msg":"Out of range integral conversion attempted"},{"code":6013,"name":"MathOverflow","msg":"[DEPRECATED] Mathematical operation with overflow"},{"code":6014,"name":"TooMuchLiquidityToWithdraw","msg":"Unable to withdraw more liquidity than available in position"},{"code":6015,"name":"DepositAmountsZero","msg":"Deposit amounts must be greater than zero"},{"code":6016,"name":"SharesZero","msg":"Number of shares to withdraw must be greater than zero"},{"code":6017,"name":"StrategyNotActive","msg":"Strategy not active"},{"code":6018,"name":"UnharvestedAmounts","msg":"There are unharvested gains"},{"code":6019,"name":"InvalidRewardMapping","msg":"Reward mapping incorrect"},{"code":6020,"name":"InvalidRewardIndex","msg":"Reward index incorrect"},{"code":6021,"name":"OwnRewardUninitialized","msg":"Cannot use uninitialized reward vault"},{"code":6022,"name":"PriceNotValid","msg":"Price is not valid"},{"code":6023,"name":"SwapRewardImbalanced","msg":"Must provide almost equal amounts of tokens"},{"code":6024,"name":"SwapRewardTooSmall","msg":"Swap reward is zero or less than requested"},{"code":6025,"name":"SwapRewardLessThanRequested","msg":"Swap reward is less than what user requested as minimum"},{"code":6026,"name":"SwapRewardLessThanMinimum","msg":"Swap reward is less than minimum acceptable"},{"code":6027,"name":"WrongDiscriminator","msg":"Wrong discriminator"},{"code":6028,"name":"WrongMint","msg":"Wrong mint"},{"code":6029,"name":"WrongVault","msg":"Wrong vault"},{"code":6030,"name":"SwapAmountsZero","msg":"Swap amounts must be greater than zero"},{"code":6031,"name":"PriceTooOld","msg":"Price too old"},{"code":6032,"name":"CannotInvestZeroAmount","msg":"Cannot invest zero amount"},{"code":6033,"name":"MaxInvestableZero","msg":"Cannot have zero investable amount"},{"code":6034,"name":"CollectFeesBlocked","msg":"Collect fees is blocked"},{"code":6035,"name":"CollectRewardsBlocked","msg":"Collect rewards is blocked"},{"code":6036,"name":"SwapRewardsBlocked","msg":"Swap rewards is blocked"},{"code":6037,"name":"WrongRewardCollateralID","msg":"Reward collateral ID is incorrect for strategy"},{"code":6038,"name":"InvalidPositionAccount","msg":"Position account doesn't match internal records"},{"code":6039,"name":"CouldNotDeserializeScope","msg":"Scope account could not be deserialized"},{"code":6040,"name":"WrongCollateralID","msg":"[DEPRECATED] Collateral ID invalid for strategy"},{"code":6041,"name":"CollateralTokensExceedDepositCap","msg":"Collaterals exceed deposit cap"},{"code":6042,"name":"SwapUnevenVaultsBlocked","msg":"Swap uneven vaults is blocked"},{"code":6043,"name":"VaultsAreAlreadyBalanced","msg":"Cannot swap as vaults are already balanced"},{"code":6044,"name":"CannotSwapUnevenOutOfRange","msg":"Cannot swap uneven vaults when position is out of range"},{"code":6045,"name":"DivideByZero","msg":"Cannot divide by zero"},{"code":6046,"name":"DeltaATooLarge","msg":"[DEPRECATED] Delta A too large"},{"code":6047,"name":"DeltaBTooLarge","msg":"[DEPRECATED] Delta B too large"},{"code":6048,"name":"CannotExecutiveWithdrawZeroAmount","msg":"[DEPRECATED] Cannot executive withdraw zero amount"},{"code":6049,"name":"CannotWithdrawZeroAmount","msg":"Cannot withdraw zero amount"},{"code":6050,"name":"CannotCollectFeesOnZeroLiquidityPosition","msg":"[DEPRECATED] Cannot collect fees on zero liquidity position"},{"code":6051,"name":"StrategyNotActiveWhenDepositing","msg":"Cannot deposit inactive position"},{"code":6052,"name":"CannotOpenPositionWithExistingPosition","msg":"Cannot open position with existing opened position"},{"code":6053,"name":"CollateralTokensExceedDepositCapPerIxn","msg":"Collaterals exceed deposit ixn cap"},{"code":6054,"name":"CannotDepositOutOfRange","msg":"Cannot deposit when strategy out of range"},{"code":6055,"name":"CannotInvestOutOfRange","msg":"Cannot invest when strategy out of range"},{"code":6056,"name":"WithdrawalCapReached","msg":"Withdrawal cap is reached"},{"code":6057,"name":"TimestampDecrease","msg":"Timestamp decrease"},{"code":6058,"name":"CPINotAllowed","msg":"CPI not allowed"},{"code":6059,"name":"OrcaPriceTooDifferentFromScope","msg":"Cannot use orca price as it is too different from scope price"},{"code":6060,"name":"LowerTickLargerThanUpperTick","msg":"Lower tick larger than upper tick"},{"code":6061,"name":"LowerTickTooLow","msg":"Lower tick is lower than the minimal supported low tick"},{"code":6062,"name":"UpperTickTooLarge","msg":"Upper tick is larger than the maximum supported tick"},{"code":6063,"name":"LowerTickNotMultipleOfTickSpacing","msg":"Lower tick is not a multiple of tick spacing"},{"code":6064,"name":"UpperTickNotMultipleOfTickSpacing","msg":"Upper tick is not a multiple of tick spacing"},{"code":6065,"name":"CannotChangeAdminAuthority","msg":"Cannot change admin authority"},{"code":6066,"name":"CannotResizeAccount","msg":"Cannot resize with smaller new size"},{"code":6067,"name":"ScopeChainUpdateFailed","msg":"Scope chain update failed"},{"code":6068,"name":"PriceTooDivergentFromTwap","msg":"Price too divergent from twap"},{"code":6069,"name":"ExistingRewardOverride","msg":"[DEPRECATED] Can not override the existing reward"},{"code":6070,"name":"WrongKaminoRewardId","msg":"Kamino reward id exceeds the available slots"},{"code":6071,"name":"KaminoRewardNotExist","msg":"Kamino reward is not initialized"},{"code":6072,"name":"KaminoRewardAlreadyExists","msg":"Kamino reward is already initialized"},{"code":6073,"name":"KaminoCollateralNotValid","msg":"Kamino collateral is not valid"},{"code":6074,"name":"KaminoRewardExceedsAvailableAmount","msg":"[DEPRECATED] Expected kamino reward is bigger then the available amount within the vault"},{"code":6075,"name":"SwapUnevenVaultsOvershoot","msg":"Swap uneven vaults result in the opposite unbalance of the vaults"},{"code":6076,"name":"BpsNotInRange","msg":"Bps parameter passed to instruction is not in range"},{"code":6077,"name":"EmergencySwapBlocked","msg":"Emergency Swap is blocked"},{"code":6078,"name":"StrategyNotFrozen","msg":"Strategy is expected to be frozen for this operation"},{"code":6079,"name":"UnexpectedTokenAmountsPostSwap","msg":"Token left in vault post swap are lower than expected"},{"code":6080,"name":"AccountNotBelongToDEX","msg":"Account doesn't belong to the DEX"},{"code":6081,"name":"WrongDEXProgramID","msg":"Wrong DEX program ID"},{"code":6082,"name":"OrcaRewardUninitialized","msg":"Cannot use uninitialized orca reward vault"},{"code":6083,"name":"InvalidAdminAuthority","msg":"Invalid admin authority"},{"code":6084,"name":"PriceIsBiggerThanHeuristic","msg":"Token price is bigger than heuristic"},{"code":6085,"name":"PriceIsLowerThanHeuristic","msg":"Token price is lower than heuristic"},{"code":6086,"name":"AccountDifferentThanExpected","msg":"Account different than expected"},{"code":6087,"name":"SwapAmountsTooSmall","msg":"Swap amount below the minimum value"},{"code":6088,"name":"InvalidDexProgramId","msg":"Invalid dex program id"},{"code":6089,"name":"StrategyDepositBlocked","msg":"Strategy deposit is currently blocked"},{"code":6090,"name":"StrategyInvestBlocked","msg":"Strategy invest is currently blocked"},{"code":6091,"name":"StrategyWithdrawBlocked","msg":"Strategy withdraw is currently blocked"},{"code":6092,"name":"WrongSwapVaultDirection","msg":"Vault swap can't be performed in the required direction"},{"code":6093,"name":"SwapVaultsTooBig","msg":"Provided amount for vault swap is over the limit"},{"code":6094,"name":"SwapVaultsCashOutputBelowMinimum","msg":"Token out for cash based vault swap is below minimum expected"},{"code":6095,"name":"FlashIxsNotEnded","msg":"Flash ixs initiated without the closing ix in the transaction"},{"code":6096,"name":"FlashTxWithUnexpectedIxs","msg":"Some unexpected instructions are present in the tx. Either before or after the flash ixs, or some ix target the same program between"},{"code":6097,"name":"FlashIxsAccountMismatch","msg":"Some accounts differ between the two flash ixs"},{"code":6098,"name":"FlashIxsIncludeScope","msg":"A scope ix is present in a flash tx"},{"code":6099,"name":"FlashVaultSwapBlocked","msg":"Flash vault swap is blocked on this strategy"},{"code":6100,"name":"FlashVaultSwapWrongAmountToLeave","msg":"Unexpected amount of tokens in ata prior flash vault swap (wrong amount_to_leave_to_user)"},{"code":6101,"name":"DepositLessThanMinimum","msg":"Deposit amount less than minimal allowed"},{"code":6102,"name":"DepositWithoutInvestDisallowed","msg":"Cannot deposit without invest"},{"code":6103,"name":"InvalidScopeChain","msg":"Invalid Scope Chain"},{"code":6104,"name":"InvalidScopeTWAPChain","msg":"Invalid Scope TWAP Chain"},{"code":6105,"name":"PositionHasRemainingLiquidity","msg":"Existent position has liquidity, new position creation is forbidden"},{"code":6106,"name":"PoolRebalancing","msg":"Deposit is not allowed as pool is rebalancing"},{"code":6107,"name":"PermissionlessRebalancingDisabled","msg":"Permissionless rebalancing is disabled"},{"code":6108,"name":"ManualRebalanceInvalidOwner","msg":"Only the owner of the strategy can manually rebalance it"},{"code":6109,"name":"InvalidRebalanceType","msg":"Invalid rebalance type for the strategy"},{"code":6110,"name":"NoRebalanceNecessary","msg":"No rebalance necessary based on current rebalance type/parameters"},{"code":6111,"name":"TickArraysDoNotMatchRebalance","msg":"The given tick arrays do not match the rebalance result"},{"code":6112,"name":"StrategyPositionNotValid","msg":"Expected strategy position to be initialized"},{"code":6113,"name":"CouldNotDeserializeRebalanceState","msg":"Rebalance state could not be deserialized"},{"code":6114,"name":"CouldNotSerializeRebalanceState","msg":"Rebalance state could not be serialized"},{"code":6115,"name":"CouldNotDeserializeRebalanceParams","msg":"Rebalance params could not be deserialized"},{"code":6116,"name":"NotEnoughTokensForRatio","msg":"Deposit is not allowed as token amounts are not enough to match our holdings ratio"},{"code":6117,"name":"AmountsRepresentZeroShares","msg":"The provided amounts are too small"},{"code":6118,"name":"MaxLossExceeded","msg":"Rouding errors exceed the maximal loss tolerance"},{"code":6119,"name":"RewardNotStrategyToken","msg":"Reward does not match strategy token"},{"code":6120,"name":"DecimalToU64ConversionFailed","msg":"Decimal to u64 conversion failed"},{"code":6121,"name":"DecimalOperationFailed","msg":"Decimal operation failed"},{"code":6122,"name":"VaultBalancesCausesWrongSharesIssuance","msg":"Deposit is not allowed as the strategy is not fully invested in the pool "},{"code":6123,"name":"TokenDisabled","msg":"Token cannot be used in strategy creation"},{"code":6124,"name":"InvalidReferencePriceType","msg":"Invalid reference price type"},{"code":6125,"name":"TokenToSwapNotEnough","msg":"Token amount to be swapped is not enough"},{"code":6126,"name":"TokenAccountBalanceMismatch","msg":"Token amount in ata is different than the expected amount"},{"code":6127,"name":"UnexpectedProgramIdForPrerequisiteIx","msg":"Unexpected programID for prerequisite ix"},{"code":6128,"name":"ComputeFeesAndRewardsUpdateError","msg":"Got an error from the dex specific function while computing the fees/rewards update"},{"code":6129,"name":"SharesNotZero","msg":"There must be no shares issued when closing a strategy"},{"code":6130,"name":"InvalidScopeStakingRateChain","msg":"Invalid Scope staking rate Chain"},{"code":6131,"name":"StakingRateNotValid","msg":"Staking rate (provided by Scope) is not valid"},{"code":6132,"name":"DecimalToU128ConversionFailed","msg":"Decimal to u128 conversion failed"},{"code":6133,"name":"DecimalNegativeSqrtRoot","msg":"Decimal sqrt on negative number"},{"code":6134,"name":"DriftingOppositeDirection","msg":"Drifting strategy is moving in the opposite direction"},{"code":6135,"name":"WrongRewardCollateralId","msg":"Wrong reward collateral_id"},{"code":6136,"name":"CollateralInfoAlreadyExists","msg":"Collateral info already exists for given index"},{"code":6137,"name":"InvestTooEarly","msg":"Invest is too early after the position was opened"},{"code":6138,"name":"SwapUnevenTooEarly","msg":"Swap uneven is too early after the position was opened"},{"code":6139,"name":"FlashSwapTooEarly","msg":"Flash swap is too early after the position was opened"},{"code":6140,"name":"RebalancesCapReached","msg":"Rebalance caps reached, no rebalances are allowed until the end of the current interval"},{"code":6141,"name":"SwapUnevenInvalidAuthority","msg":"Cannot swap uneven because authority is set and the given signer does not correspond"},{"code":6142,"name":"InvalidTick","msg":"Invalid tick requested"},{"code":6143,"name":"MeteoraMathOverflow","msg":"Meteora math overflowed"},{"code":6144,"name":"StrategyTickArrayNotValid","msg":"Expected strategy tick arrays to be initialized"},{"code":6145,"name":"WrongEventAuthority","msg":"Wrong event authority"},{"code":6146,"name":"StrategyFieldUpdateNotAllowed","msg":"Strategy field update is not allowed"},{"code":6147,"name":"UnsupportedDex","msg":"DEX is not supported for this operation"},{"code":6148,"name":"InvalidBPSValue","msg":"Invalid BPS value provided"},{"code":6149,"name":"RewardVaultOverrideNotAllowed","msg":"Reward vault override not allowed"},{"code":6150,"name":"ComputeFeesAndRewardsInvalidReward","msg":"Got invalid reward from the dex specific function while computing the fees/rewards update"},{"code":6151,"name":"EmptyTreasury","msg":"No tokens to withdraw from treasury fee vault"},{"code":6152,"name":"ChangingPoolRewardMintMismatch","msg":"New pool reward mint does not match the old pool reward mint"},{"code":6153,"name":"ProvidedRewardVaultMismatch","msg":"The provided reward vault does not match the strategy state"},{"code":6154,"name":"RepeatedMint","msg":"The provided reward vault does not match the strategy state"},{"code":6155,"name":"UnsupportedTokenExtension","msg":"The token extension is not supported by the program"},{"code":6156,"name":"UnsupportedDexForToken22","msg":"Cannot initialize strategy with this dex while having a mint with token22"},{"code":6157,"name":"GlobalConfigInvalidScopePriceIndex","msg":"Scope price index is not present in global config"},{"code":6158,"name":"GlobalConfigScopePricesIdsFull","msg":"Scope prices ids array in global config is full"},{"code":6159,"name":"GlobalConfigAlreadyContainsScopePriceId","msg":"Scope prices ids array already contains given scope price id"},{"code":6160,"name":"GlobalConfigExpectedScopePricesAccount","msg":"Expected scope prices account being passed in when adding or updating a scope prices feed"},{"code":6161,"name":"RewardScopePriceAccountNotPresent","msg":"A reward scope price account should have been passed in, but it is missing"},{"code":6162,"name":"IncorrectScopePricesAccountID","msg":"Incorrect scope prices account id passed in"},{"code":6163,"name":"CouldNotCalculatePriceTwap","msg":"Could not calculate get_price_usd_unchecked()"},{"code":6164,"name":"ReferencePriceTooFarFromPoolPrice","msg":"Reference price is too far from the current pool price"},{"code":6165,"name":"InvestCooldownNotElapsed","msg":"Invest cooldown has not elapsed"},{"code":6166,"name":"InvestAmountBelowMinimum","msg":"Uninvested value is below the minimum invest trigger"},{"code":6167,"name":"DepositAndInvestDisabled","msg":"Deposit and invest is disabled on mainnet"}]} \ No newline at end of file diff --git a/idls/kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json b/idls/kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json new file mode 100644 index 0000000..730916d --- /dev/null +++ b/idls/kamino_farms.FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr.json @@ -0,0 +1 @@ +{"version":"1.6.5","name":"farms","instructions":[{"name":"initializeGlobalConfig","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"treasuryVaultsAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateGlobalConfig","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":"u8"},{"name":"value","type":{"array":["u8",32]}}]},{"name":"initializeFarm","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeFarmDelegated","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmDelegate","isMut":false,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeReward","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"rewardTreasuryVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"treasuryVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"addRewards","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"payerRewardTokenAta","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"rewardIndex","type":"u64"}]},{"name":"updateFarmConfig","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"mode","type":"u16"},{"name":"data","type":"bytes"}]},{"name":"initializeUser","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"delegatee","isMut":false,"isSigner":false},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"transferOwnership","accounts":[{"name":"oldOwner","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"newOwner","isMut":false,"isSigner":false},{"name":"oldUserState","isMut":true,"isSigner":false},{"name":"newUserState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"rewardUserOnce","accounts":[{"name":"delegateAuthority","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"userState","isMut":true,"isSigner":false}],"args":[{"name":"rewardIndex","type":"u64"},{"name":"amount","type":"u64"},{"name":"expectedRewardIssuedUnclaimed","type":"u64"}]},{"name":"refreshFarm","accounts":[{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"stake","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"setStakeDelegated","accounts":[{"name":"delegateAuthority","isMut":false,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false}],"args":[{"name":"newAmount","type":"u64"}]},{"name":"harvestReward","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"userRewardTokenAccount","isMut":true,"isSigner":false},{"name":"rewardsVault","isMut":true,"isSigner":false},{"name":"rewardsTreasuryVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"rewardIndex","type":"u64"}]},{"name":"unstake","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[{"name":"stakeSharesScaled","type":"u128"}]},{"name":"refreshUserState","accounts":[{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"withdrawUnstakedDeposits","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"userState","isMut":true,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"userAta","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawTreasury","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardTreasuryVault","isMut":true,"isSigner":false},{"name":"treasuryVaultAuthority","isMut":false,"isSigner":false},{"name":"withdrawDestinationTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositToFarmVault","accounts":[{"name":"depositor","isMut":false,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"depositorAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawFromFarmVault","accounts":[{"name":"withdrawAuthority","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"withdrawerTokenAccount","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawSlashedAmount","accounts":[{"name":"crank","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"slashedAmountSpillAddress","isMut":true,"isSigner":false},{"name":"farmVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateFarmAdmin","accounts":[{"name":"pendingFarmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false}],"args":[]},{"name":"updateGlobalConfigAdmin","accounts":[{"name":"pendingGlobalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[]},{"name":"withdrawReward","accounts":[{"name":"farmAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"rewardMint","isMut":false,"isSigner":false},{"name":"rewardVault","isMut":true,"isSigner":false},{"name":"farmVaultsAuthority","isMut":false,"isSigner":false},{"name":"adminRewardTokenAta","isMut":true,"isSigner":false},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"},{"name":"rewardIndex","type":"u64"}]},{"name":"updateSecondDelegatedAuthority","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"farmState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"newSecondDelegatedAuthority","isMut":false,"isSigner":false}],"args":[]},{"name":"idlMissingTypes","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"globalConfigOptionKind","type":{"defined":"GlobalConfigOption"}},{"name":"farmConfigOptionKind","type":{"defined":"FarmConfigOption"}},{"name":"timeUnit","type":{"defined":"TimeUnit"}},{"name":"lockingMode","type":{"defined":"LockingMode"}},{"name":"rewardType","type":{"defined":"RewardType"}}]}],"accounts":[{"name":"FarmState","type":{"kind":"struct","fields":[{"name":"farmAdmin","type":"publicKey"},{"name":"globalConfig","type":"publicKey"},{"name":"token","type":{"defined":"TokenInfo"}},{"name":"rewardInfos","type":{"array":[{"defined":"RewardInfo"},10]}},{"name":"numRewardTokens","type":"u64"},{"name":"numUsers","docs":["Data used to calculate the rewards of the user"],"type":"u64"},{"name":"totalStakedAmount","docs":["The number of token in the `farm_vault` staked (getting rewards and fees)","Set such as `farm_vault.amount = total_staked_amount + total_pending_amount`"],"type":"u64"},{"name":"farmVault","type":"publicKey"},{"name":"farmVaultsAuthority","type":"publicKey"},{"name":"farmVaultsAuthorityBump","type":"u64"},{"name":"delegateAuthority","docs":["Only used for delegate farms","Set to `default()` otherwise"],"type":"publicKey"},{"name":"timeUnit","docs":["Raw representation of a `TimeUnit`","Seconds = 0, Slots = 1"],"type":"u8"},{"name":"isFarmFrozen","docs":["Automatically set to true in case of a full authority withdrawal","If true, the farm is frozen and no more deposits are allowed"],"type":"u8"},{"name":"isFarmDelegated","docs":["Indicates if the farm is a delegate farm","If true, the farm is a delegate farm and the `delegate_authority` is set*"],"type":"u8"},{"name":"isRewardUserOnceEnabled","docs":["If set to 1, indicates that the \"reward user once\" feature is enabled"],"type":"u8"},{"name":"isHarvestingPermissionless","type":"u8"},{"name":"padding0","type":{"array":["u8",3]}},{"name":"withdrawAuthority","docs":["Withdraw authority for the farm, allowed to lock deposited funds and withdraw them","Set to `default()` if unused (only the depositors can withdraw their funds)"],"type":"publicKey"},{"name":"depositWarmupPeriod","docs":["Delay between a user deposit and the moment it is considered as staked","0 if unused"],"type":"u32"},{"name":"withdrawalCooldownPeriod","docs":["Delay between a user unstake and the ability to withdraw his deposit."],"type":"u32"},{"name":"totalActiveStakeScaled","docs":["Total active stake of tokens in the farm (scaled from `Decimal` representation)."],"type":"u128"},{"name":"totalPendingStakeScaled","docs":["Total pending stake of tokens in the farm (scaled from `Decimal` representation).","(can be used by `withdraw_authority` but don't get rewards or fees)"],"type":"u128"},{"name":"totalPendingAmount","docs":["Total pending amount of tokens in the farm"],"type":"u64"},{"name":"slashedAmountCurrent","docs":["Slashed amounts from early withdrawal"],"type":"u64"},{"name":"slashedAmountCumulative","type":"u64"},{"name":"slashedAmountSpillAddress","type":"publicKey"},{"name":"lockingMode","docs":["Locking stake"],"type":"u64"},{"name":"lockingStartTimestamp","type":"u64"},{"name":"lockingDuration","type":"u64"},{"name":"lockingEarlyWithdrawalPenaltyBps","type":"u64"},{"name":"depositCapAmount","type":"u64"},{"name":"scopePrices","type":"publicKey"},{"name":"scopeOraclePriceId","type":"u64"},{"name":"scopeOracleMaxAge","type":"u64"},{"name":"pendingFarmAdmin","type":"publicKey"},{"name":"strategyId","type":"publicKey"},{"name":"delegatedRpsAdmin","type":"publicKey"},{"name":"vaultId","type":"publicKey"},{"name":"secondDelegatedAuthority","type":"publicKey"},{"name":"padding","type":{"array":["u64",74]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"globalAdmin","type":"publicKey"},{"name":"treasuryFeeBps","type":"u64"},{"name":"treasuryVaultsAuthority","type":"publicKey"},{"name":"treasuryVaultsAuthorityBump","type":"u64"},{"name":"pendingGlobalAdmin","type":"publicKey"},{"name":"padding1","type":{"array":["u128",126]}}]}},{"name":"UserState","type":{"kind":"struct","fields":[{"name":"userId","type":"u64"},{"name":"farmState","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"isFarmDelegated","docs":["Indicate if this user state is part of a delegated farm"],"type":"u8"},{"name":"padding0","type":{"array":["u8",7]}},{"name":"rewardsTallyScaled","docs":["Rewards tally used for computation of gained rewards","(scaled from `Decimal` representation)."],"type":{"array":["u128",10]}},{"name":"rewardsIssuedUnclaimed","docs":["Number of reward tokens ready for claim"],"type":{"array":["u64",10]}},{"name":"lastClaimTs","type":{"array":["u64",10]}},{"name":"activeStakeScaled","docs":["User stake deposited and usable, generating rewards and fees.","(scaled from `Decimal` representation)."],"type":"u128"},{"name":"pendingDepositStakeScaled","docs":["User stake deposited but not usable and not generating rewards yet.","(scaled from `Decimal` representation)."],"type":"u128"},{"name":"pendingDepositStakeTs","docs":["After this timestamp, pending user stake can be moved to user stake","Initialized to now() + delayed user stake period"],"type":"u64"},{"name":"pendingWithdrawalUnstakeScaled","docs":["User deposits unstaked, pending for withdrawal, not usable and not generating rewards.","(scaled from `Decimal` representation)."],"type":"u128"},{"name":"pendingWithdrawalUnstakeTs","docs":["After this timestamp, user can withdraw their deposit."],"type":"u64"},{"name":"bump","docs":["User bump used for account address validation"],"type":"u64"},{"name":"delegatee","docs":["Delegatee used for initialisation - useful to check against"],"type":"publicKey"},{"name":"lastStakeTs","type":"u64"},{"name":"rewardsIssuedCumulative","docs":["Cumulative rewards issued to the user - ONLY used for stats/analytics","DO NOT USE IN ANY CALCULATIONS","Old userStates will have this field populated only from the point of release","not reflecting any historical data before this was released"],"type":{"array":["u64",10]}},{"name":"padding1","type":{"array":["u64",40]}}]}},{"name":"OraclePrices","type":{"kind":"struct","fields":[{"name":"oracleMappings","type":"publicKey"},{"name":"prices","type":{"array":[{"defined":"DatedPrice"},512]}}]}}],"types":[{"name":"FarmConfigOption","type":{"kind":"enum","variants":[{"name":"UpdateRewardRps"},{"name":"UpdateRewardMinClaimDuration"},{"name":"WithdrawAuthority"},{"name":"DepositWarmupPeriod"},{"name":"WithdrawCooldownPeriod"},{"name":"RewardType"},{"name":"RpsDecimals"},{"name":"LockingMode"},{"name":"LockingStartTimestamp"},{"name":"LockingDuration"},{"name":"LockingEarlyWithdrawalPenaltyBps"},{"name":"DepositCapAmount"},{"name":"SlashedAmountSpillAddress"},{"name":"ScopePricesAccount"},{"name":"ScopeOraclePriceId"},{"name":"ScopeOracleMaxAge"},{"name":"UpdateRewardScheduleCurvePoints"},{"name":"UpdatePendingFarmAdmin"},{"name":"UpdateStrategyId"},{"name":"UpdateDelegatedRpsAdmin"},{"name":"UpdateVaultId"},{"name":"UpdateExtraDelegatedAuthority"},{"name":"UpdateIsRewardUserOnceEnabled"},{"name":"UpdateDelegatedAuthority"},{"name":"UpdateIsHarvestingPermissionless"}]}},{"name":"GlobalConfigOption","type":{"kind":"enum","variants":[{"name":"SetPendingGlobalAdmin"},{"name":"SetTreasuryFeeBps"}]}},{"name":"LockingMode","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Continuous"},{"name":"WithExpiry"}]}},{"name":"RewardInfo","type":{"kind":"struct","fields":[{"name":"token","type":{"defined":"TokenInfo"}},{"name":"rewardsVault","type":"publicKey"},{"name":"rewardsAvailable","type":"u64"},{"name":"rewardScheduleCurve","type":{"defined":"RewardScheduleCurve"}},{"name":"minClaimDurationSeconds","type":"u64"},{"name":"lastIssuanceTs","type":"u64"},{"name":"rewardsIssuedUnclaimed","type":"u64"},{"name":"rewardsIssuedCumulative","type":"u64"},{"name":"rewardPerShareScaled","type":"u128"},{"name":"placeholder0","type":"u64"},{"name":"rewardType","type":"u8"},{"name":"rewardsPerSecondDecimals","type":"u8"},{"name":"padding0","type":{"array":["u8",6]}},{"name":"padding1","type":{"array":["u64",20]}}]}},{"name":"RewardPerTimeUnitPoint","type":{"kind":"struct","fields":[{"name":"tsStart","type":"u64"},{"name":"rewardPerTimeUnit","type":"u64"}]}},{"name":"RewardScheduleCurve","type":{"kind":"struct","fields":[{"name":"points","docs":["This is a stepwise function, meaning that each point represents","how many rewards are issued per time unit since the beginning","of that point until the beginning of the next point.","This is not a linear curve, there is no interpolation going on.","A curve can be [[t0, 100], [t1, 50], [t2, 0]]","meaning that from t0 to t1, 100 rewards are issued per time unit,","from t1 to t2, 50 rewards are issued per time unit, and after t2 it stops","Another curve, can be [[t0, 100], [u64::max, 0]]","meaning that from t0 to u64::max, 100 rewards are issued per time unit"],"type":{"array":[{"defined":"RewardPerTimeUnitPoint"},20]}}]}},{"name":"RewardType","type":{"kind":"enum","variants":[{"name":"Proportional"},{"name":"Constant"}]}},{"name":"TimeUnit","type":{"kind":"enum","variants":[{"name":"Seconds"},{"name":"Slots"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"decimals","type":"u64"},{"name":"tokenProgram","type":"publicKey"},{"name":"padding","type":{"array":["u64",6]}}]}},{"name":"DatedPrice","type":{"kind":"struct","fields":[{"name":"price","type":{"defined":"Price"}},{"name":"lastUpdatedSlot","type":"u64"},{"name":"unixTimestamp","type":"u64"},{"name":"reserved","type":{"array":["u64",2]}},{"name":"reserved2","type":{"array":["u16",3]}},{"name":"index","type":"u16"}]}},{"name":"Price","type":{"kind":"struct","fields":[{"name":"value","type":"u64"},{"name":"exp","type":"u64"}]}}],"errors":[{"code":6000,"name":"StakeZero","msg":"Cannot stake 0 amount"},{"code":6001,"name":"UnstakeZero","msg":"Cannot unstake 0 amount"},{"code":6002,"name":"NothingToUnstake","msg":"Nothing to unstake"},{"code":6003,"name":"NoRewardToHarvest","msg":"No reward to harvest"},{"code":6004,"name":"NoRewardInList","msg":"Reward not present in reward list"},{"code":6005,"name":"RewardAlreadyInitialized","msg":"Reward already initialized"},{"code":6006,"name":"MaxRewardNumberReached","msg":"Max number of reward tokens reached"},{"code":6007,"name":"RewardDoesNotExist","msg":"Reward does not exist"},{"code":6008,"name":"WrongRewardVaultAccount","msg":"Reward vault exists but the account is wrong"},{"code":6009,"name":"RewardVaultMismatch","msg":"Reward vault pubkey does not match staking pool vault"},{"code":6010,"name":"RewardVaultAuthorityMismatch","msg":"Reward vault authority pubkey does not match staking pool vault"},{"code":6011,"name":"NothingStaked","msg":"Nothing staked, cannot collect any rewards"},{"code":6012,"name":"IntegerOverflow","msg":"Integer overflow"},{"code":6013,"name":"ConversionFailure","msg":"Conversion failure"},{"code":6014,"name":"UnexpectedAccount","msg":"Unexpected account in instruction"},{"code":6015,"name":"OperationForbidden","msg":"Operation forbidden"},{"code":6016,"name":"MathOverflow","msg":"Mathematical operation with overflow"},{"code":6017,"name":"MinClaimDurationNotReached","msg":"Minimum claim duration has not been reached"},{"code":6018,"name":"RewardsVaultHasDelegate","msg":"Reward vault has a delegate"},{"code":6019,"name":"RewardsVaultHasCloseAuthority","msg":"Reward vault has a close authority"},{"code":6020,"name":"FarmVaultHasDelegate","msg":"Farm vault has a delegate"},{"code":6021,"name":"FarmVaultHasCloseAuthority","msg":"Farm vault has a close authority"},{"code":6022,"name":"RewardsTreasuryVaultHasDelegate","msg":"Reward vault has a delegate"},{"code":6023,"name":"RewardsTreasuryVaultHasCloseAuthority","msg":"Reward vault has a close authority"},{"code":6024,"name":"UserAtaRewardVaultMintMissmatch","msg":"User ata and reward vault have different mints"},{"code":6025,"name":"UserAtaFarmTokenMintMissmatch","msg":"User ata and farm token have different mints"},{"code":6026,"name":"TokenFarmTokenMintMissmatch","msg":"Token mint and farm token have different mints"},{"code":6027,"name":"RewardAtaRewardMintMissmatch","msg":"Reward ata mint is different than reward mint"},{"code":6028,"name":"RewardAtaOwnerNotPayer","msg":"Reward ata owner is different than payer"},{"code":6029,"name":"InvalidGlobalConfigMode","msg":"Mode to update global_config is invalid"},{"code":6030,"name":"RewardIndexOutOfRange","msg":"Reward Index is higher than number of rewards"},{"code":6031,"name":"NothingToWithdraw","msg":"No tokens available to withdraw"},{"code":6032,"name":"UserDelegatedFarmNonDelegatedMissmatch","msg":"user, user_ref, authority and payer must match for non-delegated farm"},{"code":6033,"name":"AuthorityFarmDelegateMissmatch","msg":"Authority must match farm delegate authority"},{"code":6034,"name":"FarmNotDelegated","msg":"Farm not delegated, can not complete operation"},{"code":6035,"name":"FarmDelegated","msg":"Operation not allowed for delegated farm"},{"code":6036,"name":"UnstakeNotElapsed","msg":"Unstake lockup period is not elapsed. Deposit is locked until end of unstake period"},{"code":6037,"name":"PendingWithdrawalNotWithdrawnYet","msg":"Pending withdrawal already exist and not withdrawn yet"},{"code":6038,"name":"DepositZero","msg":"Cannot deposit zero amount directly to farm vault"},{"code":6039,"name":"InvalidConfigValue","msg":"Invalid config value"},{"code":6040,"name":"InvalidPenaltyPercentage","msg":"Invalid penalty percentage"},{"code":6041,"name":"EarlyWithdrawalNotAllowed","msg":"Early withdrawal not allowed"},{"code":6042,"name":"InvalidLockingTimestamps","msg":"Invalid locking timestamps"},{"code":6043,"name":"InvalidRpsCurvePoint","msg":"Invalid reward rate curve point"},{"code":6044,"name":"InvalidTimestamp","msg":"Invalid timestamp"},{"code":6045,"name":"DepositCapReached","msg":"Deposit cap reached"},{"code":6046,"name":"MissingScopePrices","msg":"Missing Scope Prices"},{"code":6047,"name":"ScopeOraclePriceTooOld","msg":"Scope Oracle Price Too Old"},{"code":6048,"name":"InvalidOracleConfig","msg":"Invalid Oracle Config"},{"code":6049,"name":"CouldNotDeserializeScope","msg":"Could not deserialize scope"},{"code":6050,"name":"RewardAtaOwnerNotAdmin","msg":"Reward ata owner is different than farm admin"},{"code":6051,"name":"WithdrawRewardZeroAvailable","msg":"Cannot withdraw reward as available amount is zero"},{"code":6052,"name":"RewardScheduleCurveSet","msg":"Cannot withdraw reward as reward schedule is set"},{"code":6053,"name":"UnsupportedTokenExtension","msg":"Cannot initialize farm while having a mint with token22 and requested extensions"},{"code":6054,"name":"InvalidFarmConfigUpdateAuthority","msg":"Invalid authority for updating farm config"},{"code":6055,"name":"InvalidTransferOwnershipOldOwner","msg":"Invalid authority for transfer ownersip new user state initialization"},{"code":6056,"name":"InvalidTransferOwnershipFarmState","msg":"Invalid farm state for transfer ownership new user state initialization"},{"code":6057,"name":"InvalidTransferOwnershipUserStateOwnerDelegatee","msg":"Invalid user state for transfer ownership, owner must match delegatee"},{"code":6058,"name":"InvalidTransferOwnershipFarmStateLockingMode","msg":"Invalid farm state locking mode for transfer ownership, must be 0"},{"code":6059,"name":"InvalidTransferOwnershipFarmStateWithdrawCooldownPeriod","msg":"Invalid farm state withdrawal cooldown period for transfer ownership, must be 0"},{"code":6060,"name":"InvalidTransferOwnershipStakeAmount","msg":"Invalid transfer ownership stake amount, must be equal to unstaked deposits"},{"code":6061,"name":"InvalidTransferOwnershipNewOwner","msg":"Invalid authority for transfer ownersip new user state initialization"},{"code":6062,"name":"InvalidTransferOwnershipFarmStateDepositWarmupPeriod","msg":"Invalid farm state deposit warmup period for transfer ownership, must be 0 if old user has stake"},{"code":6063,"name":"RewardUserOnceFeatureDisabled","msg":"Reward User Once feature is disabled"},{"code":6064,"name":"InvalidDelegatedAuthorityUpdate","msg":"Can not set delegate_authority to default pubkey - farm is delegated"},{"code":6065,"name":"UserTokenAccountOwnerMismatch","msg":"User token account owner does not match user state owner"},{"code":6066,"name":"HarvestingNotPermissionlessPayerMismatch","msg":"Harvesting is not permissionless, payer does not match user state owner"},{"code":6067,"name":"CurrentRewardIssuedUnclaimedMismatch","msg":"Current reward issued unclaimed does not match expected value"}]} \ No newline at end of file diff --git a/idls/kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json b/idls/kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json new file mode 100644 index 0000000..566e666 --- /dev/null +++ b/idls/kamino_lending.KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD.json @@ -0,0 +1 @@ +{"version":"1.23.0","name":"kamino_lending","instructions":[{"name":"initLendingMarket","accounts":[{"name":"lendingMarketOwner","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"quoteCurrency","type":{"array":["u8",32]}}]},{"name":"updateLendingMarket","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":"u64"},{"name":"value","type":{"array":["u8",72]}}]},{"name":"updateLendingMarketOwner","accounts":[{"name":"lendingMarketOwnerCached","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":true,"isSigner":false}],"args":[]},{"name":"initReserve","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"feeReceiver","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralSupply","isMut":true,"isSigner":false},{"name":"initialLiquiditySource","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"cloneReserveConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"targetLendingMarket","isMut":false,"isSigner":false,"docs":["The lending market of the [Self::target_reserve].","","The [Self::source_reserve] can come from a different market."]},{"name":"sourceReserve","isMut":false,"isSigner":false,"docs":["The reserve to be used as source for the configuration clone."]},{"name":"targetReserve","isMut":true,"isSigner":false,"docs":["The reserve to have its configuration replaced by a clone."]}],"args":[{"name":"customizations","type":{"defined":"ReserveConfigCustomizationArgs"}}]},{"name":"initFarmsForReserve","accounts":[{"name":"lendingMarketOwner","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"farmsGlobalConfig","isMut":false,"isSigner":false},{"name":"farmState","isMut":true,"isSigner":false},{"name":"farmsVaultAuthority","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u8"}]},{"name":"updateReserveConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":{"defined":"UpdateConfigMode"}},{"name":"value","type":"bytes"},{"name":"skipConfigIntegrityValidation","type":"bool"}]},{"name":"redeemFees","accounts":[{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"reserveSupplyLiquidity","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"withdrawProtocolFee","accounts":[{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"feeVault","isMut":true,"isSigner":false},{"name":"feeCollectorAta","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"seedDepositOnInitReserve","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"initialLiquiditySource","isMut":true,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"topupReserveRewards","docs":["Sponsor a reserve's rewards distribution by topping up its `rewards_amount_available` budget."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"sourceLiquidity","isMut":true,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"socializeLoss","accounts":[{"name":"lendingMarketOwner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"socializeLossV2","accounts":[{"name":"socializeLossAccounts","accounts":[{"name":"lendingMarketOwner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"markObligationForDeleveraging","accounts":[{"name":"lendingMarketOwner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}],"args":[{"name":"autodeleverageTargetLtvPct","type":"u8"}]},{"name":"refreshReserve","accounts":[{"name":"reserve","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"pythOracle","isMut":false,"isSigner":false,"isOptional":true},{"name":"switchboardPriceOracle","isMut":false,"isSigner":false,"isOptional":true},{"name":"switchboardTwapOracle","isMut":false,"isSigner":false,"isOptional":true},{"name":"scopePrices","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"refreshReservesBatch","accounts":[],"args":[{"name":"skipPriceUpdates","type":"bool"}]},{"name":"depositReserveLiquidity","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"reserve","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"redeemReserveCollateral","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userSourceCollateral","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"initObligation","accounts":[{"name":"obligationOwner","isMut":false,"isSigner":true},{"name":"feePayer","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"seed1Account","isMut":false,"isSigner":false},{"name":"seed2Account","isMut":false,"isSigner":false},{"name":"ownerUserMetadata","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitObligationArgs"}}]},{"name":"initObligationFarmsForReserve","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveFarmState","isMut":true,"isSigner":false},{"name":"obligationFarm","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u8"}]},{"name":"refreshObligationFarmsForReserve","accounts":[{"name":"crank","isMut":false,"isSigner":true},{"name":"baseAccounts","accounts":[{"name":"obligation","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveFarmState","isMut":true,"isSigner":false,"docs":["`obligation_farm_user_state`'s own `farm_state` field, in the handler.","(Cannot live as an Anchor constraint because the handler is also reached","via `cpi_refresh_farms` from v2 host instructions, which bypass Anchor.)"]},{"name":"obligationFarmUserState","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}]},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mode","type":"u8"}]},{"name":"refreshObligation","accounts":[{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false}],"args":[]},{"name":"depositObligationCollateral","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"depositReserve","isMut":true,"isSigner":false},{"name":"reserveDestinationCollateral","isMut":true,"isSigner":false},{"name":"userSourceCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"depositObligationCollateralV2","accounts":[{"name":"depositAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"depositReserve","isMut":true,"isSigner":false},{"name":"reserveDestinationCollateral","isMut":true,"isSigner":false},{"name":"userSourceCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawObligationCollateral","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawObligationCollateralV2","accounts":[{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"borrowObligationLiquidity","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"borrowReserve","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"borrowObligationLiquidityV2","accounts":[{"name":"borrowAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"borrowReserve","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false},{"name":"borrowReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"repayObligationLiquidity","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"repayObligationLiquidityV2","accounts":[{"name":"repayAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"repayAndWithdrawAndRedeem","accounts":[{"name":"repayAccounts","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"collateralFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"debtFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u64"},{"name":"withdrawCollateralAmount","type":"u64"}]},{"name":"depositAndWithdraw","accounts":[{"name":"depositAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"depositFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"withdrawFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"withdrawCollateralAmount","type":"u64"}]},{"name":"depositReserveLiquidityAndObligationCollateral","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"depositReserveLiquidityAndObligationCollateralV2","accounts":[{"name":"depositAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveDestinationDepositCollateral","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"withdrawObligationCollateralAndRedeemReserveCollateral","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"withdrawObligationCollateralAndRedeemReserveCollateralV2","accounts":[{"name":"withdrawAccounts","accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceCollateral","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"placeholderUserDestinationCollateral","isMut":false,"isSigner":false,"isOptional":true},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"}]},{"name":"liquidateObligationAndRedeemReserveCollateral","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"repayReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"repayReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"withdrawReserveCollateralMint","isMut":true,"isSigner":false},{"name":"withdrawReserveCollateralSupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"repayLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"withdrawLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"minAcceptableReceivedLiquidityAmount","type":"u64"},{"name":"maxAllowedLtvOverridePercent","type":"u64"}]},{"name":"liquidateObligationAndRedeemReserveCollateralV2","accounts":[{"name":"liquidationAccounts","accounts":[{"name":"liquidator","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"repayReserve","isMut":true,"isSigner":false},{"name":"repayReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"repayReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserve","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityMint","isMut":false,"isSigner":false},{"name":"withdrawReserveCollateralMint","isMut":true,"isSigner":false},{"name":"withdrawReserveCollateralSupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"withdrawReserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationCollateral","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false},{"name":"repayLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"withdrawLiquidityTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"collateralFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"debtFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"minAcceptableReceivedLiquidityAmount","type":"u64"},{"name":"maxAllowedLtvOverridePercent","type":"u64"}]},{"name":"flashRepayReserveLiquidity","accounts":[{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveDestinationLiquidity","isMut":true,"isSigner":false},{"name":"userSourceLiquidity","isMut":true,"isSigner":false},{"name":"reserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"sysvarInfo","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"},{"name":"borrowInstructionIndex","type":"u8"}]},{"name":"flashBorrowReserveLiquidity","accounts":[{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false},{"name":"reserveLiquidityFeeReceiver","isMut":true,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"sysvarInfo","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"liquidityAmount","type":"u64"}]},{"name":"requestElevationGroup","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}],"args":[{"name":"elevationGroup","type":"u8"}]},{"name":"initReferrerTokenState","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"referrer","isMut":false,"isSigner":false},{"name":"referrerTokenState","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initUserMetadata","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"feePayer","isMut":true,"isSigner":true},{"name":"userMetadata","isMut":true,"isSigner":false},{"name":"referrerUserMetadata","isMut":false,"isSigner":false,"isOptional":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"userLookupTable","type":"publicKey"}]},{"name":"withdrawReferrerFees","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerTokenState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveSupplyLiquidity","isMut":true,"isSigner":false},{"name":"referrerTokenAccount","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initReferrerStateAndShortUrl","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerState","isMut":true,"isSigner":false},{"name":"referrerShortUrl","isMut":true,"isSigner":false},{"name":"referrerUserMetadata","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"shortUrl","type":"string"}]},{"name":"deleteReferrerStateAndShortUrl","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerState","isMut":true,"isSigner":false},{"name":"shortUrl","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setObligationOrder","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false}],"args":[{"name":"index","type":"u8"},{"name":"order","type":{"defined":"ObligationOrder"}}]},{"name":"setBorrowOrder","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["The [Self::obligation]'s owner."]},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation to set the [BorrowOrder] on."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The [Self::obligation]'s market - needed to validate feature flags and minimum order value."]},{"name":"reserve","isMut":false,"isSigner":false,"docs":["The reserve matching the [Self::debt_liquidity_mint] - needed for the minimum order value","check. On cancellation, this account is ignored (but still must belong to the same market)."]},{"name":"filledDebtDestination","isMut":false,"isSigner":false,"docs":["The [BorrowOrder::filled_debt_destination] to set on order creation. Not editable on order","updates.","Ignored when cancelling the order."]},{"name":"debtLiquidityMint","isMut":false,"isSigner":false,"docs":["The [BorrowOrder::debt_liquidity_mint] to set on order creation. Not editable on order","updates.","Ignored when cancelling the order."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"orderConfig","type":{"defined":"BorrowOrderConfigArgs"}},{"name":"minExpectedCurrentRemainingDebtAmount","type":"u64"}]},{"name":"updateObligationConfig","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["Obligation's owner (signer - only the owner can modify the obligation's configuration)."]},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation to update."]},{"name":"borrowReserve","isMut":false,"isSigner":false,"isOptional":true,"docs":["The reserve of a selected one among the [Obligation::borrows].","","Required only if the config update affects a single borrow (for validating its new config)."]},{"name":"depositReserve","isMut":false,"isSigner":false,"isOptional":true,"docs":["The reserve of a selected one among the [Obligation::deposits].","","Required only if the config update affects a single deposit (for validating its new config)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market (for validating the obligation's new config)."]}],"args":[{"name":"mode","type":{"defined":"UpdateObligationConfigMode"}},{"name":"value","type":"bytes"}]},{"name":"rolloverFixedTermBorrow","accounts":[{"name":"rolloverAccounts","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation with a borrow to be rolled over (or migrated)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The [Self::obligation]'s market, needed for validations against the market-wide","configuration."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The [Self::lending_market]'s authority, needed to transfer the newly-borrowed funds out of","the [Self::reserve_source_liquidity]."]},{"name":"sourceBorrowReserve","isMut":true,"isSigner":false,"docs":["The reserve used by the existing [Self::obligation]'s borrow that needs to rollover from."]},{"name":"targetBorrowReserve","isMut":true,"isSigner":false,"docs":["The reserve to rollover the borrow into - possibly (but not necessarily) the same as","[Self::source_borrow_reserve]'s (but definitely of the same liquidity mint)."]},{"name":"liquidityMint","isMut":false,"isSigner":false,"docs":["The mint of [Self::source_borrow_reserve] and [Self::target_borrow_reserve], needed to","transfer funds between them."]},{"name":"sourceBorrowReserveLiquidity","isMut":true,"isSigner":false,"docs":["The vault of [Self::source_borrow_reserve], from which the funds are transferred."]},{"name":"targetBorrowReserveLiquidity","isMut":true,"isSigner":false,"docs":["The vault of [Self::target_borrow_reserve], from which the funds are transferred."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["The token program of [Self::liquidity_mint] - needed to execute the transfer."]}]},{"name":"sourceFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"targetFarmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"fillBorrowOrder","accounts":[{"name":"borrowAccounts","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"obligation","isMut":true,"isSigner":false,"docs":["The obligation with a [BorrowOrder]."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The [Self::obligation]'s market - needed for borrowing-related configuration."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The [Self::lending_market]'s authority, needed to transfer the newly-borrowed funds out of","the [Self::reserve_source_liquidity]."]},{"name":"borrowReserve","isMut":true,"isSigner":false,"docs":["The reserve to borrow from.","","Its mint must match the asset requested by the [BorrowOrder::debt_liquidity_mint]."]},{"name":"borrowReserveLiquidityMint","isMut":false,"isSigner":false,"docs":["The mint of [Self::borrow_reserve] - needed to execute the transfer."]},{"name":"reserveSourceLiquidity","isMut":true,"isSigner":false,"docs":["The vault of [Self::borrow_reserve], from which the funds are transferred."]},{"name":"borrowReserveLiquidityFeeReceiver","isMut":true,"isSigner":false,"docs":["The fee vault of [Self::borrow_reserve], to which the fees are transferred."]},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false,"docs":["The destination token account that should receive the newly borrowed funds.","","It must match [BorrowOrder::filled_debt_destination], owner and mint.","","**Warning:** An altered destination account will prevent an order from being filled."]},{"name":"referrerTokenState","isMut":true,"isSigner":false,"isOptional":true,"docs":["The referrer's account, for accumulating fees - needed if the [Obligation::has_referrer]."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["The token program of [Self::borrow_reserve] - needed to execute the transfer."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"farmsAccounts","accounts":[{"name":"obligationFarmUserState","isMut":true,"isSigner":false,"isOptional":true},{"name":"reserveFarmState","isMut":true,"isSigner":false,"isOptional":true}]},{"name":"farmsProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"initiateObligationOwnershipTransfer","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["Current owner must sign this transaction"]},{"name":"obligation","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"newOwner","type":"publicKey"}]},{"name":"approveObligationOwnershipTransfer","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true,"docs":["Global admin must sign this transaction"]},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"obligation","isMut":true,"isSigner":false},{"name":"pendingOwner","isMut":false,"isSigner":false,"docs":["The pending owner that will receive ownership after acceptance.","Must match the pending_owner stored in the obligation."]}],"args":[]},{"name":"acceptObligationOwnership","accounts":[{"name":"pendingOwner","isMut":false,"isSigner":true,"docs":["Pending owner must sign this transaction"]},{"name":"obligation","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"abortObligationOwnershipTransfer","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["Current owner must sign this transaction"]},{"name":"obligation","isMut":true,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"enqueueToWithdraw","accounts":[{"name":"owner","isMut":true,"isSigner":true,"docs":["The depositor holding ctokens."]},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed to initialize the [Self::owner_queued_collateral_vault]."]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"userSourceCollateralTa","isMut":true,"isSigner":false,"docs":["The source of collateral to be enqueued."]},{"name":"userDestinationLiquidityTa","isMut":false,"isSigner":false,"docs":["The account to which the liquidity should be finally transferred later (to be recorded in","the ticket)."]},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":false,"isSigner":false},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The collateral's program - needed for invoking the transfer to the vault *and* (implicitly)","for handling the `init_if_needed`."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["The new account to be initialized with the issued ticket's data."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (in which the collateral will be","locked)."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The System program - needed only for `init` / `init_if_needed` of the accounts above."]},{"name":"progressCallbackCustomAccount0","isMut":false,"isSigner":false,"isOptional":true,"docs":["The first one out of maximum 2 custom accounts that may be required if the optional \"ticket","progress callback\" is configured for this ticket.","","The expected custom accounts are validated based on the `progress_callback_type` instruction","argument. The currently supported ones are:","- for [ProgressCallbackType::None] no custom accounts are expected (this is the default","behavior, when the instruction data is zeroed or absent).","- for [ProgressCallbackType::KlendQueueAccountingHandlerOnKvault], only the `_0` custom","account is required:","- the `_0` custom account must represent the `VaultState` which disinvests from the","reserve (readonly; needed to be later passed as an input to the Kvault's handler);","- the `_1` custom account is ignored;","- the `owner` account (i.e. the signer) must be a Kvault-owned PDA base authority","associated with the vault indicated by `_0` (needed to prove that Kvault is CPI'ing this","handler)."]},{"name":"progressCallbackCustomAccount1","isMut":false,"isSigner":false,"isOptional":true,"docs":["The second possible account (see the `progress_callback_custom_account_0` above)."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"collateralAmount","type":"u64"},{"name":"progressCallbackType","type":{"defined":"ProgressCallbackType"}}]},{"name":"withdrawQueuedLiquidity","accounts":[{"name":"payer","isMut":true,"isSigner":true,"docs":["The executor of the permissionless tx (not necessarily the ticket owner)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed for burning the collateral (from","[Self::owner_queued_collateral_vault]) and transferring the liquidity (from","[Self::reserve_liquidity_supply])."]},{"name":"reserve","isMut":true,"isSigner":false,"docs":["The reserve."]},{"name":"reserveLiquidityMint","isMut":false,"isSigner":false,"docs":["The liquidity mint, needed to invoke the transfer."]},{"name":"reserveCollateralMint","isMut":true,"isSigner":false,"docs":["The collateral mint, needed to burn (`mut`!) the queued collateral."]},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false,"docs":["The liquidity supply vault (to withdraw the liquidity from)."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (from which the collateral will be","burnt)."]},{"name":"userDestinationLiquidity","isMut":true,"isSigner":false,"docs":["The token account to which the liquidity should be transferred (the one recorded in the","ticket)."]},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_collateral_mint], needed for transfer."]},{"name":"liquidityTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_liquidity_mint], needed for transfer."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["The ticket's data itself.","","Note: in case of complete withdrawal, this account will be closed. In case of partial","withdrawal, its [WithdrawTicket::queued_collateral_amount] will simply be reduced, and the","ticket will maintain its position in the queue."]},{"name":"withdrawTicketOwner","isMut":true,"isSigner":false,"docs":["The owner of the [Self::withdraw_ticket]; needed only to return the rent of the","[WithdrawTicket] account (if it is getting fully-consumed and closed here)."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["The ATA program - needed for potential destination ATA creation."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The System program - needed for potential destination ATA creation."]},{"name":"progressCallbackProgram","isMut":false,"isSigner":false,"isOptional":true,"docs":["The progress callback program (if configured by the withdraw ticket)."]},{"name":"progressCallbackCustomAccount0","isMut":false,"isSigner":false,"isOptional":true,"docs":["The first one out of maximum 2 custom accounts that may be required if the withdraw ticket","defines a callback.","Please note that the constraints defined here do not mention `mut`, but a specific","[WithdrawTicket::progress_callback_type] may require it."]},{"name":"progressCallbackCustomAccount1","isMut":false,"isSigner":false,"isOptional":true,"docs":["The second possibly-required account (see the `progress_callback_custom_account_0` above)."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[],"returns":"bool"},{"name":"recoverInvalidTicketCollateral","accounts":[{"name":"payer","isMut":false,"isSigner":true,"docs":["The transaction executor.","","This instruction is, in principle, permissionless. However, only the ticket owner can use","arbitrary token account as destination for recovered collateral. Other signers can only","transfer the collateral to the ticket owner's ATA (see [Self::user_source_collateral])."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed for transferring the collateral (from","[Self::owner_queued_collateral_vault])."]},{"name":"reserve","isMut":false,"isSigner":false,"docs":["The reserve, needed only to validate the other accounts."]},{"name":"reserveCollateralMint","isMut":false,"isSigner":false,"docs":["The collateral mint, needed to invoke the transfer."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (from which the collateral will be","recovered)."]},{"name":"userSourceCollateral","isMut":true,"isSigner":false,"docs":["The ticket's owner token account to which the ticket-locked collateral should be returned.","","Only the ticket's owner can indicate an arbitrary token account here. Permissionless","executors must indicate the ticket's owner ATA."]},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_collateral_mint], needed for transfer."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["The ticket's account, necessarily marked as [WithdrawTicket::invalid] first (by the","`handler_withdraw_queued_liquidity`)."]},{"name":"withdrawTicketOwner","isMut":true,"isSigner":false,"docs":["The owner of the [Self::withdraw_ticket]; needed only to return the rent of the","[WithdrawTicket] account."]},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[{"name":"ticketSequenceNumber","type":"u64"}]},{"name":"cancelWithdrawTicket","accounts":[{"name":"owner","isMut":false,"isSigner":true,"docs":["The ticket owner (i.e. the only allowed to cancel their ticket)."]},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["The lending market."]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false,"docs":["The market's authority, needed for transferring the collateral (from","[Self::owner_queued_collateral_vault])."]},{"name":"reserve","isMut":true,"isSigner":false,"docs":["The reserve."]},{"name":"reserveCollateralMint","isMut":false,"isSigner":false,"docs":["The collateral mint, needed to invoke the transfer."]},{"name":"ownerQueuedCollateralVault","isMut":true,"isSigner":false,"docs":["The per-owner \"this reserve's queued collateral\" vault (from which the collateral will be","transferred back to the owner)."]},{"name":"userDestinationCollateral","isMut":true,"isSigner":false,"docs":["Destination for returned ctokens (owner's token account)."]},{"name":"collateralTokenProgram","isMut":false,"isSigner":false,"docs":["The program of [Self::reserve_collateral_mint], needed for transfer."]},{"name":"withdrawTicket","isMut":true,"isSigner":false,"docs":["Ticket to cancel - remains as tombstone until queue processes it."]}],"args":[{"name":"ticketSequenceNumber","type":"u64"},{"name":"collateralAmountToCancel","type":"u64"}]},{"name":"initGlobalConfig","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"programData","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"updateGlobalConfig","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"mode","type":{"defined":"UpdateGlobalConfigMode"}},{"name":"value","type":"bytes"}]},{"name":"updateGlobalConfigAdmin","accounts":[{"name":"pendingAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[]},{"name":"idlMissingTypes","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false}],"args":[{"name":"reserveFarmKind","type":{"defined":"ReserveFarmKind"}},{"name":"feeCalculation","type":{"defined":"FeeCalculation"}},{"name":"reserveStatus","type":{"defined":"ReserveStatus"}},{"name":"updateConfigMode","type":{"defined":"UpdateConfigMode"}},{"name":"updateLendingMarketConfigValue","type":{"defined":"UpdateLendingMarketConfigValue"}},{"name":"updateLendingMarketConfigMode","type":{"defined":"UpdateLendingMarketMode"}}]}],"accounts":[{"name":"UserState","type":{"kind":"struct","fields":[{"name":"userId","type":"u64"},{"name":"farmState","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"isFarmDelegated","type":"u8"},{"name":"padding0","type":{"array":["u8",7]}},{"name":"rewardsTallyScaled","type":{"array":["u128",10]}},{"name":"rewardsIssuedUnclaimed","type":{"array":["u64",10]}},{"name":"lastClaimTs","type":{"array":["u64",10]}},{"name":"activeStakeScaled","type":"u128"},{"name":"pendingDepositStakeScaled","type":"u128"},{"name":"pendingDepositStakeTs","type":"u64"},{"name":"pendingWithdrawalUnstakeScaled","type":"u128"},{"name":"pendingWithdrawalUnstakeTs","type":"u64"},{"name":"bump","type":"u64"},{"name":"delegatee","type":"publicKey"},{"name":"lastStakeTs","type":"u64"},{"name":"padding1","type":{"array":["u64",50]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"globalAdmin","docs":["Global admin of the program"],"type":"publicKey"},{"name":"pendingAdmin","docs":["Pending admin must sign a specific transaction to become the global admin"],"type":"publicKey"},{"name":"feeCollector","docs":["Fee collector is the only allowed owner of token accounts receiving protocol fees"],"type":"publicKey"},{"name":"padding","docs":["Padding to make the struct size 1024 bytes"],"type":{"array":["u8",928]}}]}},{"name":"LendingMarket","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of lending market"],"type":"u64"},{"name":"bumpSeed","docs":["Bump seed for derived authority address"],"type":"u64"},{"name":"lendingMarketOwner","docs":["Owner authority which can add new reserves"],"type":"publicKey"},{"name":"lendingMarketOwnerCached","docs":["Temporary cache of the lending market owner, used in update_lending_market_owner"],"type":"publicKey"},{"name":"quoteCurrency","docs":["Currency market prices are quoted in","e.g. \"USD\" null padded (`*b\"USD\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\\0\"`) or a SPL token mint pubkey"],"type":{"array":["u8",32]}},{"name":"referralFeeBps","docs":["Referral fee for the lending market, as bps out of the total protocol fee"],"type":"u16"},{"name":"emergencyMode","type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether the obligations on this market should be subject to auto-deleveraging after deposit","or borrow limit is crossed.","Besides this flag, the particular reserve's flag also needs to be enabled (logical `AND`).","**NOTE:** this also affects the individual \"target LTV\" deleveraging."],"type":"u8"},{"name":"borrowDisabled","type":"u8"},{"name":"priceRefreshTriggerToMaxAgePct","docs":["Refresh price from oracle only if it's older than this percentage of the price max age.","e.g. if the max age is set to 100s and this is set to 80%, the price will be refreshed if it's older than 80s.","Price is always refreshed if this set to 0."],"type":"u8"},{"name":"liquidationMaxDebtCloseFactorPct","docs":["Percentage of the total borrowed value in an obligation available for liquidation"],"type":"u8"},{"name":"insolvencyRiskUnhealthyLtvPct","docs":["Minimum acceptable unhealthy LTV before max_debt_close_factor_pct becomes 100%"],"type":"u8"},{"name":"minFullLiquidationValueThreshold","docs":["Minimum liquidation value threshold triggering full liquidation for an obligation, in full","units of the quote currency (e.g. `2` means \"$2\", not \"2 lamports of USDC\")."],"type":"u64"},{"name":"maxLiquidatableDebtMarketValueAtOnce","docs":["Max allowed liquidation value in one ix call"],"type":"u64"},{"name":"reserved0","docs":["[DEPRECATED] Global maximum unhealthy borrow value allowed for any obligation"],"type":{"array":["u8",8]}},{"name":"globalAllowedBorrowValue","docs":["Global maximum allowed borrow value allowed for any obligation"],"type":"u64"},{"name":"emergencyCouncil","docs":["The address of the emergency council, in charge of taking emergency actions on the market (e.g., enabling emergency mode)"],"type":"publicKey"},{"name":"reserved1","docs":["[DEPRECATED] Reward points multiplier per obligation type"],"type":{"array":["u8",8]}},{"name":"elevationGroups","docs":["Elevation groups are used to group together reserves that have the same risk parameters and can bump the ltv and liquidation threshold"],"type":{"array":[{"defined":"ElevationGroup"},32]}},{"name":"elevationGroupPadding","type":{"array":["u64",90]}},{"name":"minNetValueInObligationSf","docs":["Min net value accepted to be found in a position after any lending action in an obligation (scaled by quote currency decimals)"],"type":"u128"},{"name":"minValueSkipLiquidationLtvChecks","docs":["Minimum value to enforce smallest ltv priority checks on the collateral reserves on liquidation"],"type":"u64"},{"name":"name","docs":["Market name, zero-padded."],"type":{"array":["u8",32]}},{"name":"minValueSkipLiquidationBfChecks","docs":["Minimum value to enforce highest borrow factor priority checks on the debt reserves on liquidation"],"type":"u64"},{"name":"individualAutodeleverageMarginCallPeriodSecs","docs":["Time (in seconds) that must pass before liquidation is allowed on an obligation that has","been individually marked for auto-deleveraging."],"type":"u64"},{"name":"minInitialDepositAmount","docs":["Minimum amount of deposit at creation of a reserve to prevent artificial inflation","Note: this amount cannot be recovered, the ctoken associated are never minted"],"type":"u64"},{"name":"obligationOrderExecutionEnabled","docs":["Whether the obligation orders should be evaluated during liquidations."],"type":"u8"},{"name":"immutable","docs":["Whether the lending market is set as immutable."],"type":"u8"},{"name":"obligationOrderCreationEnabled","docs":["Whether new obligation orders can be created.","Note: updating or cancelling existing orders is *not* affected by this flag."],"type":"u8"},{"name":"priceTriggeredLiquidationDisabled","docs":["Whether the liquidation operations that are triggered by price changes should be disabled.","This includes regular liquidation (i.e. LTV exceeding the unhealthy threshold) and some","obligation orders' execution.","","*Caution:* this flag is *disabling* the liquidations when `1` - contrary to all the other","liquidation-driving flags (see e.g. [Self::autodeleverage_enabled])."],"type":"u8"},{"name":"matureReserveDebtLiquidationEnabled","docs":["Whether the debts that reached their reserve's [ReserveConfig::debt_maturity_timestamp] can","be liquidated."],"type":"u8"},{"name":"obligationBorrowDebtTermLiquidationEnabled","docs":["Whether the [Obligation::borrows] that reached their [ReserveConfig::debt_term_seconds] can","be liquidated."],"type":"u8"},{"name":"borrowOrderCreationEnabled","docs":["Whether new borrow orders can be created.","Note: updating or cancelling existing orders is *not* affected by this flag."],"type":"u8"},{"name":"borrowOrderExecutionEnabled","docs":["Whether the existing borrow orders can be filled."],"type":"u8"},{"name":"proposerAuthority","docs":["Authority that can propose creating of new reserves but cannot enable them."],"type":"publicKey"},{"name":"minBorrowOrderFillValue","docs":["Minimum value that can be filled in a single `fill_borrow_order()` call, in full units of","the quote currency (e.g. `2` means \"$2\", not \"2 lamports of USDC\")."],"type":"u64"},{"name":"withdrawTicketIssuanceEnabled","docs":["Whether any new withdraw tickets can be issued (i.e. whether new requests can enter the","withdraw queue)."],"type":"u8"},{"name":"withdrawTicketRedemptionEnabled","docs":["Whether the existing withdraw tickets can be redeemed (i.e. whether the tickets can be used","to transfer accumulated pending liquidity to destination accounts)."],"type":"u8"},{"name":"obligationBorrowRolloverConfigurationEnabled","docs":["Whether the owners can enable the borrow rollover/migration on their obligations.","","*Note 1:* the actual execution of (different kinds of) rollovers are enabled/disabled by:","- [Self::fixed_term_rollover_window_duration_seconds],","- [Self::open_term_rollover_window_duration_seconds],","- [Self::obligation_borrow_migration_to_fixed_execution_enabled].","","*Note 2:* when this configuration is disabled, the obligation owners can still disable their","rollover (i.e. set the obligation's flags to zeroes)."],"type":"u8"},{"name":"obligationBorrowMigrationToFixedExecutionEnabled","docs":["Whether the actual execution of a \"migration to fixed\" rollover flavor is allowed.","","See [FixedTermBorrowRolloverConfig::migration_to_fixed_enabled]."],"type":"u8"},{"name":"withdrawTicketCancellationEnabled","docs":["Whether the ticket owners can cancel their withdraw tickets (i.e. recover ctokens from the","queued collateral vault back to their wallet)."],"type":"u8"},{"name":"padding2","type":{"array":["u8",1]}},{"name":"reserveRewardsMaxAprBps","docs":["Maximum APR (in basis points; `FULL_BPS = 10_000` = 100%) at which reserves on this market","may distribute their `rewards_amount_per_slot`. `0` disables rewards on this market","entirely (`topup_reserve_rewards` is rejected). Bounded by `FULL_BPS` (100% APR) when set.","See [ReserveConfig::rewards_amount_per_slot] for the depositor-cap interaction."],"type":"u16"},{"name":"minWithdrawQueuedLiquidityValue","docs":["Minimum value that can be withdrawn in a single `withdraw_queued_liquidity()` call, in full","units of the quote currency (e.g. `2` means \"$2\", not \"2 lamports of USDC\")."],"type":"u64"},{"name":"fixedTermRolloverWindowDurationSeconds","docs":["A configurable time window (right before the end of a fixed debt term) during which an","auto-rollover into another *fixed* rate/term can happen.","","When zeroed, this rollover mode is effectively disabled.","Can only be enabled when [Self::min_partial_rollover_value] is configured.","","See [FixedTermBorrowRolloverConfig]."],"type":"u64"},{"name":"openTermRolloverWindowDurationSeconds","docs":["A configurable time window (right before the end of a fixed debt term) during which an","auto-rollover into a *variable* (indefinite) rate/term can happen.","","When zeroed, this rollover mode is effectively disabled.","Can only be enabled when [Self::min_partial_rollover_value] is configured.","","This will typically be shorter than [Self::fixed_term_rollover_window_duration_seconds],","acting as a fallback if a fixed reserve liquidity remains unavailable for considerable time."],"type":"u64"},{"name":"minPartialRolloverValue","docs":["Minimum dollar value for a partial rollover into a different reserve.","When the achievable rollover amount is below this threshold (and it's not a full rollover),","the rollover is rejected.","","In full units of the quote currency (e.g. `2` means \"$2\")."],"type":"u64"},{"name":"termBasedFullLiquidationDurationSecs","docs":["The time that must pass before an entire expired debt becomes liquidatable.","","For example:","Let's assume this duration is configured as 100 seconds; then:","- right after fixed-term debt expiration, effectively no debt can be liquidated.","- 30 seconds after expiration, we allow to 30% of the expired debt to be liquidated","- to be specific: at this point in time, we \"protect\" from liquidation 70% of the","[ObligationLiquidity::borrowed_amount_at_expiration] (regardless of how much interest","was accrued or how much debt was repaid while expired).","- 100 seconds after expiration we allow the entire debt to be liquidated.","","Only effective when [Self::obligation_borrow_debt_term_liquidation_enabled].","","Motivation note: this throttling feature gives an opportunity to execute a configured","auto-rollover (after a partial liquidation brings the debt size down so that there is enough","available liquidity in some compatible reserve).","","When zeroed, an entire expired debt can be liquidated right after expiration (i.e. no","throttling)."],"type":"u64"},{"name":"permissioningAuthority","docs":["If not NULL, operations encoded in permissioned_ops require a signature from this authority"],"type":"publicKey"},{"name":"permissionedOps","docs":["Bitmap of operations that require permissioning authority signature"],"type":"u64"},{"name":"padding1","type":{"array":["u64",153]}}]}},{"name":"Obligation","docs":["Lending market obligation state"],"type":{"kind":"struct","fields":[{"name":"tag","docs":["Version of the struct"],"type":"u64"},{"name":"lastUpdate","docs":["Last update to collateral, liquidity, or their market values"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"owner","docs":["Owner authority which can borrow liquidity"],"type":"publicKey"},{"name":"deposits","docs":["Deposited collateral for the obligation, unique by deposit reserve address"],"type":{"array":[{"defined":"ObligationCollateral"},8]}},{"name":"lowestReserveDepositLiquidationLtv","docs":["Worst LTV for the collaterals backing the loan, represented as a percentage"],"type":"u64"},{"name":"depositedValueSf","docs":["Market value of deposits (scaled fraction)"],"type":"u128"},{"name":"borrows","docs":["Borrowed liquidity for the obligation, unique by borrow reserve address"],"type":{"array":[{"defined":"ObligationLiquidity"},5]}},{"name":"borrowFactorAdjustedDebtValueSf","docs":["Risk adjusted market value of borrows/debt (sum of price * borrowed_amount * borrow_factor) (scaled fraction)"],"type":"u128"},{"name":"borrowedAssetsMarketValueSf","docs":["Market value of borrows - used for max_liquidatable_borrowed_amount (scaled fraction)"],"type":"u128"},{"name":"allowedBorrowValueSf","docs":["The maximum borrow value at the weighted average loan to value ratio (scaled fraction)"],"type":"u128"},{"name":"unhealthyBorrowValueSf","docs":["The dangerous borrow value at the weighted average liquidation threshold (scaled fraction)"],"type":"u128"},{"name":"paddingDeprecatedAssetTiers","docs":["The asset tier of the deposits"],"type":{"array":["u8",13]}},{"name":"elevationGroup","docs":["The elevation group id the obligation opted into."],"type":"u8"},{"name":"numOfObsoleteDepositReserves","docs":["The number of obsolete reserves the obligation has a deposit in"],"type":"u8"},{"name":"hasDebt","docs":["Marked = 1 if borrows array is not empty, 0 = borrows empty"],"type":"u8"},{"name":"referrer","docs":["Wallet address of the referrer"],"type":"publicKey"},{"name":"borrowingDisabled","docs":["Marked = 1 if borrowing disabled, 0 = borrowing enabled"],"type":"u8"},{"name":"autodeleverageTargetLtvPct","docs":["A target LTV set by the market owner when marking this obligation for deleveraging.","Only effective when `deleveraging_margin_call_started_slot != 0`."],"type":"u8"},{"name":"lowestReserveDepositMaxLtvPct","docs":["The lowest max LTV found amongst the collateral deposits"],"type":"u8"},{"name":"numOfObsoleteBorrowReserves","docs":["The number of obsolete reserves the obligation has a borrow in"],"type":"u8"},{"name":"ownershipTransferState","docs":["State of ownership transfer, see [OwnershipTransferState]"],"type":"u8"},{"name":"reserved","type":{"array":["u8",3]}},{"name":"highestBorrowFactorPct","type":"u64"},{"name":"autodeleverageMarginCallStartedTimestamp","docs":["A timestamp at which the market owner most-recently marked this obligation for deleveraging.","Zero if not currently subject to deleveraging."],"type":"u64"},{"name":"obligationOrders","docs":["Owner-defined, permissionlessly-executed repay orders.","Typical use-cases would be a stop-loss and a take-profit (possibly co-existing)."],"type":{"array":[{"defined":"ObligationOrder"},2]}},{"name":"borrowOrder","docs":["Owner-defined, permissionlessly-executed borrow order applicable to this obligation.","Non-zeroed only on a newly-initialized fixed-rate, fixed-term obligation."],"type":{"defined":"BorrowOrder"}},{"name":"pendingOwner","docs":["Pending owner during ownership transfer process.","Pubkey::default() means no pending owner (similar to Option::None)"],"type":"publicKey"},{"name":"padding3","type":{"array":["u64",69]}}]}},{"name":"ReferrerState","type":{"kind":"struct","fields":[{"name":"shortUrl","type":"publicKey"},{"name":"owner","type":"publicKey"}]}},{"name":"ReferrerTokenState","docs":["Referrer account -> each owner can have multiple accounts for specific reserves"],"type":{"kind":"struct","fields":[{"name":"referrer","docs":["Pubkey of the referrer/owner"],"type":"publicKey"},{"name":"mint","docs":["Token mint for the account"],"type":"publicKey"},{"name":"amountUnclaimedSf","docs":["Amount that has been accumulated and not claimed yet -> available to claim (scaled fraction)"],"type":"u128"},{"name":"amountCumulativeSf","docs":["Amount that has been accumulated in total -> both already claimed and unclaimed (scaled fraction)"],"type":"u128"},{"name":"bump","docs":["Referrer token state bump, used for address validation"],"type":"u64"},{"name":"padding","type":{"array":["u64",31]}}]}},{"name":"ShortUrl","type":{"kind":"struct","fields":[{"name":"referrer","type":"publicKey"},{"name":"shortUrl","type":"string"}]}},{"name":"UserMetadata","docs":["Referrer account -> each owner can have multiple accounts for specific reserves"],"type":{"kind":"struct","fields":[{"name":"referrer","docs":["Pubkey of the referrer/owner - pubkey::default if no referrer"],"type":"publicKey"},{"name":"bump","docs":["Bump used for validation of account address"],"type":"u64"},{"name":"userLookupTable","docs":["User lookup table - used to store all user accounts - atas for each reserve mint, each obligation PDA, UserMetadata itself and all referrer_token_states if there is a referrer"],"type":"publicKey"},{"name":"owner","docs":["User metadata account owner"],"type":"publicKey"},{"name":"padding1","type":{"array":["u64",51]}},{"name":"padding2","type":{"array":["u64",64]}}]}},{"name":"Reserve","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of the reserve"],"type":"u64"},{"name":"lastUpdate","docs":["Last slot when supply and rates updated"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"farmCollateral","type":"publicKey"},{"name":"farmDebt","type":"publicKey"},{"name":"liquidity","docs":["Reserve liquidity"],"type":{"defined":"ReserveLiquidity"}},{"name":"reserveLiquidityPadding","type":{"array":["u64",150]}},{"name":"collateral","docs":["Reserve collateral"],"type":{"defined":"ReserveCollateral"}},{"name":"reserveCollateralPadding","type":{"array":["u64",150]}},{"name":"config","docs":["Reserve configuration values"],"type":{"defined":"ReserveConfig"}},{"name":"configPadding","type":{"array":["u64",112]}},{"name":"borrowedAmountOutsideElevationGroup","type":"u64"},{"name":"borrowedAmountsAgainstThisReserveInElevationGroups","docs":["Amount of token borrowed in lamport of debt asset in the given","elevation group when this reserve is part of the collaterals."],"type":{"array":["u64",32]}},{"name":"withdrawQueue","docs":["The tracker of ticket-based withdrawals."],"type":{"defined":"WithdrawQueue"}},{"name":"padding","type":{"array":["u64",204]}}]}},{"name":"WithdrawTicket","docs":["A finite-lifecycle account representing a specific depositor's place in the withdraw queue of","a specific reserve.","","The lifecycle:","1. The depositor holding ctokens wants to withdraw funds from the reserve, and finds out that","the required amount is not available (due to high utilization).","2. The depositor calls the `enqueue_to_withdraw` handler.","3. The handler transfers the depositor's ctokens to the reserve's internal \"pending\" vault.","4. The handler initializes a new [WithdrawTicket] account, with the next available sequence","number.","5. The depositor waits until his ticket is the next expected one for actual withdraw, and until","the reserve has enough liquidity.","6. Anyone (the depositor or a bot) calls the permissionless `withdraw_queued_liquidity`","handler. If the ticket became invalid (e.g. destination account no longer exists), then the","depositor can call the `recover_invalid_ticket_collateral` handler instead.","7. The handler transfers the liquidity amount according to the current exchange rate.","8. The handler closes the ticket account."],"type":{"kind":"struct","fields":[{"name":"sequenceNumber","docs":["This ticket's place in the queue; the same as used for PDA derivation."],"type":"u64"},{"name":"owner","docs":["The funds' owner (the user who called the `enqueue_to_withdraw` handler)."],"type":"publicKey"},{"name":"reserve","docs":["The reserve to withdraw from."],"type":"publicKey"},{"name":"userDestinationLiquidityTa","docs":["The token account to which the finally-available liquidity should be transferred (by the","`withdraw_queued_liquidity` handler)."],"type":"publicKey"},{"name":"queuedCollateralAmount","docs":["The amount of collateral still waiting to be withdrawn using this ticket."],"type":"u64"},{"name":"createdAtTimestamp","docs":["The timestamp at which the queue was entered.","","This is currently only a piece of metadata, not used by the logic."],"type":"u64"},{"name":"invalid","docs":["Whether the ticket has been found to be invalid (e.g. the [Self::user_destination_liquidity]","has been repurposed) by the `withdraw_queued_liquidity` handler.","To be specific: valid = `0`, invalid = `1`.","","An invalid ticket cannot be made valid again, and can only be passed to the","`recover_invalid_ticket_collateral` handler."],"type":"u8"},{"name":"progressCallbackType","docs":["One of the valid [ProgressCallbackType] representations."],"type":"u8"},{"name":"alignmentPadding","docs":["Inner padding, for alignment."],"type":{"array":["u8",6]}},{"name":"progressCallbackCustomAccounts","docs":["The (optional) accounts to be used by [Self::progress_callback_type]s."],"type":{"array":["publicKey",2]}},{"name":"endPadding","docs":["Trailing padding, for future developments."],"type":{"array":["u64",40]}}]}}],"types":[{"name":"ReserveConfigCustomizationArgs","docs":["A definition of optional customizations that should be applied after cloning the config."],"type":{"kind":"struct","fields":[{"name":"overrideFixedRateBps","docs":["A gate for [Self::fixed_borrow_rate_bps]."],"type":"u8"},{"name":"fixedBorrowRateBps","docs":["If [Self::override_fixed_rate_bps] is non-zero, this borrow rate will be used to override","the [ReserveConfig::borrow_rate_curve] with a fixed one."],"type":"u32"},{"name":"overrideDebtTermSeconds","docs":["A gate for [Self::debt_term_seconds]."],"type":"u8"},{"name":"debtTermSeconds","docs":["If [Self::override_debt_term_seconds] is non-zero, this value will be used to override the","[ReserveConfig::debt_term_seconds]."],"type":"u64"},{"name":"clearElevationGroups","docs":["Whether the target reserve should have zeroed [ReserveConfig::elevation_groups] (i.e. not","cloned from source).","","This customization is mandatory when cloning a reserve (with some elevation groups) into a","different market (where those elevation group indices would have different meaning)."],"type":"u8"}]}},{"name":"BorrowOrderConfigArgs","docs":["A subset of [BorrowOrderConfig] excluding the accounts passed via [SetBorrowOrder]."],"type":{"kind":"struct","fields":[{"name":"remainingDebtAmount","type":"u64"},{"name":"maxBorrowRateBps","type":"u32"},{"name":"minDebtTermSeconds","type":"u64"},{"name":"fillableUntilTimestamp","type":"u64"},{"name":"enableAutoRolloverOnFilledBorrows","type":"bool"}]}},{"name":"UpdateConfigMode","type":{"kind":"enum","variants":[{"name":"UpdateLoanToValuePct"},{"name":"UpdateMaxLiquidationBonusBps"},{"name":"UpdateLiquidationThresholdPct"},{"name":"UpdateProtocolLiquidationFee"},{"name":"UpdateProtocolTakeRate"},{"name":"UpdateFeesOriginationFee"},{"name":"UpdateFeesFlashLoanFee"},{"name":"DeprecatedUpdateFeesReferralFeeBps"},{"name":"UpdateDepositLimit"},{"name":"UpdateBorrowLimit"},{"name":"UpdateTokenInfoLowerHeuristic"},{"name":"UpdateTokenInfoUpperHeuristic"},{"name":"UpdateTokenInfoExpHeuristic"},{"name":"UpdateTokenInfoTwapDivergence"},{"name":"UpdateTokenInfoScopeTwap"},{"name":"UpdateTokenInfoScopeChain"},{"name":"UpdateTokenInfoName"},{"name":"UpdateTokenInfoPriceMaxAge"},{"name":"UpdateTokenInfoTwapMaxAge"},{"name":"UpdateScopePriceFeed"},{"name":"UpdatePythPrice"},{"name":"UpdateSwitchboardFeed"},{"name":"UpdateSwitchboardTwapFeed"},{"name":"UpdateBorrowRateCurve"},{"name":"DeprecatedUpdateEntireReserveConfig"},{"name":"UpdateDebtWithdrawalCap"},{"name":"UpdateDepositWithdrawalCap"},{"name":"DeprecatedUpdateDebtWithdrawalCapCurrentTotal"},{"name":"DeprecatedUpdateDepositWithdrawalCapCurrentTotal"},{"name":"UpdateBadDebtLiquidationBonusBps"},{"name":"UpdateMinLiquidationBonusBps"},{"name":"UpdateDeleveragingMarginCallPeriod"},{"name":"UpdateBorrowFactor"},{"name":"DeprecatedUpdateAssetTier"},{"name":"UpdateElevationGroup"},{"name":"UpdateDeleveragingThresholdDecreaseBpsPerDay"},{"name":"DeprecatedUpdateMultiplierSideBoost"},{"name":"DeprecatedUpdateMultiplierTagBoost"},{"name":"UpdateReserveStatus"},{"name":"UpdateFarmCollateral"},{"name":"UpdateFarmDebt"},{"name":"UpdateDisableUsageAsCollateralOutsideEmode"},{"name":"UpdateBlockBorrowingAboveUtilizationPct"},{"name":"UpdateBlockPriceUsage"},{"name":"UpdateBorrowLimitOutsideElevationGroup"},{"name":"UpdateBorrowLimitsInElevationGroupAgainstThisReserve"},{"name":"UpdateHostFixedInterestRateBps"},{"name":"UpdateAutodeleverageEnabled"},{"name":"UpdateDeleveragingBonusIncreaseBpsPerDay"},{"name":"UpdateProtocolOrderExecutionFee"},{"name":"UpdateProposerAuthorityLock"},{"name":"UpdateMinDeleveragingBonusBps"},{"name":"UpdateBlockCTokenUsage"},{"name":"UpdateDebtMaturityTimestamp"},{"name":"UpdateDebtTermSeconds"},{"name":"UpdateEarlyRepayRemainingInterestPct"},{"name":"UpdateReserveEmergencyMode"},{"name":"UpdateRewardsAmountPerSlot"},{"name":"UpdateReservePermissionedOps"}]}},{"name":"UpdateLendingMarketConfigValue","type":{"kind":"enum","variants":[{"name":"Bool","fields":["bool"]},{"name":"U8","fields":["u8"]},{"name":"U8Array","fields":[{"array":["u8",8]}]},{"name":"U16","fields":["u16"]},{"name":"U64","fields":["u64"]},{"name":"U128","fields":["u128"]},{"name":"Pubkey","fields":["publicKey"]},{"name":"ElevationGroup","fields":[{"defined":"ElevationGroup"}]},{"name":"Name","fields":[{"array":["u8",32]}]}]}},{"name":"UpdateLendingMarketMode","type":{"kind":"enum","variants":[{"name":"UpdateOwner"},{"name":"UpdateEmergencyMode"},{"name":"UpdateLiquidationCloseFactor"},{"name":"UpdateLiquidationMaxValue"},{"name":"DeprecatedUpdateGlobalUnhealthyBorrow"},{"name":"UpdateGlobalAllowedBorrow"},{"name":"UpdateEmergencyCouncil"},{"name":"UpdateMinFullLiquidationThreshold"},{"name":"UpdateInsolvencyRiskLtv"},{"name":"UpdateElevationGroup"},{"name":"UpdateReferralFeeBps"},{"name":"DeprecatedUpdateMultiplierPoints"},{"name":"UpdatePriceRefreshTriggerToMaxAgePct"},{"name":"UpdateAutodeleverageEnabled"},{"name":"UpdateBorrowingDisabled"},{"name":"UpdateMinNetValueObligationPostAction"},{"name":"UpdateMinValueLtvSkipPriorityLiqCheck"},{"name":"UpdateMinValueBfSkipPriorityLiqCheck"},{"name":"UpdatePaddingFields"},{"name":"UpdateName"},{"name":"UpdateIndividualAutodeleverageMarginCallPeriodSecs"},{"name":"UpdateInitialDepositAmount"},{"name":"UpdateObligationOrderExecutionEnabled"},{"name":"UpdateImmutableFlag"},{"name":"UpdateObligationOrderCreationEnabled"},{"name":"UpdateProposerAuthority"},{"name":"UpdatePriceTriggeredLiquidationDisabled"},{"name":"UpdateMatureReserveDebtLiquidationEnabled"},{"name":"UpdateObligationBorrowDebtTermLiquidationEnabled"},{"name":"UpdateBorrowOrderCreationEnabled"},{"name":"UpdateBorrowOrderExecutionEnabled"},{"name":"UpdateMinBorrowOrderFillValue"},{"name":"UpdateWithdrawTicketIssuanceEnabled"},{"name":"UpdateWithdrawTicketRedemptionEnabled"},{"name":"UpdateMinWithdrawQueuedLiquidityValue"},{"name":"UpdateFixedTermRolloverWindowDurationSeconds"},{"name":"UpdateOpenTermRolloverWindowDurationSeconds"},{"name":"UpdateObligationBorrowRolloverConfigurationEnabled"},{"name":"UpdateTermBasedFullLiquidationDurationSecs"},{"name":"UpdateObligationBorrowMigrationToFixedExecutionEnabled"},{"name":"UpdateMinPartialRolloverValue"},{"name":"UpdateWithdrawTicketCancellationEnabled"},{"name":"UpdatePermissioningAuthority"},{"name":"UpdatePermissionedOps"},{"name":"DeprecatedUpdateReserveRewardsMaxAprPct"},{"name":"UpdateReserveRewardsMaxAprBps"}]}},{"name":"UpdateGlobalConfigMode","type":{"kind":"enum","variants":[{"name":"PendingAdmin"},{"name":"FeeCollector"}]}},{"name":"LastUpdate","docs":["Last update state"],"type":{"kind":"struct","fields":[{"name":"slot","docs":["Last slot when updated"],"type":"u64"},{"name":"stale","docs":["True when marked stale, false when slot updated"],"type":"u8"},{"name":"priceStatus","docs":["Status of the prices used to calculate the last update"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}}]}},{"name":"ElevationGroup","type":{"kind":"struct","fields":[{"name":"maxLiquidationBonusBps","type":"u16"},{"name":"id","type":"u8"},{"name":"ltvPct","type":"u8"},{"name":"liquidationThresholdPct","type":"u8"},{"name":"allowNewLoans","type":"u8"},{"name":"maxReservesAsCollateral","type":"u8"},{"name":"padding0","type":"u8"},{"name":"debtReserve","docs":["Mandatory debt reserve for this elevation group"],"type":"publicKey"},{"name":"padding1","type":{"array":["u64",4]}}]}},{"name":"BorrowOrder","docs":["A borrow order.","","When the [Obligation::borrow_order] is populated (i.e. non-zeroed) on an Obligation, then the","permissionless \"fill\" operations may borrow liquidity to the owner according to this","specification."],"type":{"kind":"struct","fields":[{"name":"debtLiquidityMint","docs":["The asset to be borrowed.","The reserves used for [Obligation::borrows] *must* all provide exactly this asset."],"type":"publicKey"},{"name":"remainingDebtAmount","docs":["The amount of debt that still needs to be filled, in lamports."],"type":"u64"},{"name":"filledDebtDestination","docs":["The token account owned by the [Obligation::owner] and holding [Self::debt_liquidity_mint],","where the filled funds should be transferred to."],"type":"publicKey"},{"name":"minDebtTermSeconds","docs":["The minimum allowed debt term that the obligation owner agrees to.","The reserves used to fill this order *cannot* define their debt term *lower* than this.","","If zeroed, then only open-term reserves may be used."],"type":"u64"},{"name":"fillableUntilTimestamp","docs":["The time until which the borrow order can still be filled."],"type":"u64"},{"name":"placedAtTimestamp","docs":["The time at which this order was placed.","Currently, this is only a piece of metadata."],"type":"u64"},{"name":"lastUpdatedAtTimestamp","docs":["The time at which this order was most-recently updated (including: created).","Currently, this is only a piece of metadata."],"type":"u64"},{"name":"requestedDebtAmount","docs":["The amount of debt that was originally requested when this order was most-recently updated.","In other words: this field holds a value of [Self::remaining_debt_amount] captured at","[Self::last_updated_at_timestamp].","Currently, this is only a piece of metadata."],"type":"u64"},{"name":"maxBorrowRateBps","docs":["The maximum borrow rate that the obligation owner agrees to.","The reserves used for [Obligation::borrows] *cannot* define their maximum borrow rate","*higher* than this."],"type":"u32"},{"name":"active","docs":["Whether the [Self::remaining_debt_amount] is non-zero.","","This field is *not* used by smart contract logic (which prefers to treat the above","[Self::remaining_debt_amount]-based definition as the single source of truth). However, it","is useful for off-chain bots (order-searchers) to efficiently list (i.e. `memcmp` filter)","just the obligations that have active borrow orders."],"type":"u8"},{"name":"enableAutoRolloverOnFilledBorrows","docs":["When `1`, all [Obligation::borrows] that get filled by this order will have their","[FixedTermBorrowRolloverConfig::auto_rollover_enabled] flag set.","","Additionally, their rollover customizations:","- will exactly match this order's constraints regarding [Self::min_debt_term_seconds] and","[Self::max_borrow_rate_bps];","- will use the [FixedTermBorrowRolloverConfig::open_term_allowed] fallback.","","See [BorrowOrder::get_rollover_config_for_filled_borrow()].","","Clarification note: when `0`, this setting has no effect on any borrow (i.e. if an existing","borrow was independently marked for auto-rollover, it will *not* be unmarked when filled by","this order).","","Feature flag note: when [LendingMarket::obligation_borrow_rollover_configuration_enabled] is","disabled, this setting has no effect on any borrow (i.e. the fill will be successful, but","the borrow will not be marked for auto-rollover."],"type":"u8"},{"name":"padding1","docs":["Alignment padding."],"type":{"array":["u8",2]}},{"name":"endPadding","docs":["End padding."],"type":{"array":["u64",5]}}]}},{"name":"FixedTermBorrowRolloverConfig","docs":["Settings driving the auto-rollover (or migration) of an [ObligationLiquidity]'s borrow.","","This covers three flavors:","- *fixed-to-fixed*: a fixed-term borrow rolling into another fixed-term reserve,","- *fixed-to-open*: a fixed-term borrow rolling into an open-term reserve,","- *open-to-fixed*: an open-term borrow migrating into a fixed-term reserve.","","By its nature (not a special case), the zeroed struct means \"no auto-rollover/migration\"."],"type":{"kind":"struct","fields":[{"name":"autoRolloverEnabled","docs":["Whether this *fixed-term* borrow can be permissionlessly prolonged. The funds used to roll","over can come:","- either from a *fixed-term* reserve (same or a different one):","- This can only happen within [LendingMarket::fixed_term_rollover_window_duration_seconds].","- The target reserve must meet all the criteria defined in this config (see","[Self::max_borrow_rate_bps] and [Self::min_debt_term_seconds]).","- Note: not possible when [Self::min_debt_term_seconds] is `0` (open-term only).","- or from an *open-term* reserve:","- This can only happen within [LendingMarket::open_term_rollover_window_duration_seconds].","- The user must explicitly set [Self::open_term_allowed] here.","","This setting is not effective when the borrow is currently using an *open-term* reserve."],"type":"u8"},{"name":"openTermAllowed","docs":["When `1`, then [Self::auto_rollover_enabled] is allowed to roll this borrow over into any","open-term reserve.","","Please note that if such rollover actually happens, then [Self::max_borrow_rate_bps]","condition does not apply - technically, it could be evaluated, but open-term reserves","typically use float-rate (utilization-driven borrow rate curve) which has very high maximum","(when at 100% utilization) that would not meet any practical criteria here."],"type":"u8"},{"name":"migrationToFixedEnabled","docs":["Whether this *open-term* borrow can be permissionlessly migrated into a fixed-term reserve:","- This can happen at any moment (as soon as liquidity becomes available).","- The target fixed-term reserve must meet all the criteria defined in this config (see","[Self::max_borrow_rate_bps] and [Self::min_debt_term_seconds]).","","This setting is not effective when the borrow is currently using a *fixed-term* reserve.","","Cannot be enabled when [Self::min_debt_term_seconds] is `0` (open-term only), because","migrating into a fixed-term reserve contradicts the open-term-only intent."],"type":"u8"},{"name":"alignmentPadding","docs":["Internal alignment padding (free to reuse)."],"type":{"array":["u8",1]}},{"name":"maxBorrowRateBps","docs":["A maximum allowed borrow rate of a reserve that can be used for a rollover/migration.","","Note: this must be set (i.e. non-zero) when enabling any rollover/migration flavor, but is","of course not effective when rollover/migration is not enabled."],"type":"u32"},{"name":"minDebtTermSeconds","docs":["A minimum debt term (in seconds) of a fixed-term reserve that can be used for a","rollover/migration.","","When `0`, the owner only accepts open-term reserves as rollover targets — i.e. rolling over","(or migrating) into a fixed-term reserve is not allowed. This is consistent with the","semantics of [BorrowOrder::min_debt_term_seconds].","","This means that `0` is incompatible with [Self::migration_to_fixed_enabled] (which requires","a fixed-term target) — this combination is rejected at configuration time."],"type":"u64"}]}},{"name":"InitObligationArgs","type":{"kind":"struct","fields":[{"name":"tag","type":"u8"},{"name":"id","type":"u8"}]}},{"name":"ObligationCollateral","docs":["Obligation collateral state"],"type":{"kind":"struct","fields":[{"name":"depositReserve","docs":["Reserve collateral is deposited to"],"type":"publicKey"},{"name":"depositedAmount","docs":["Amount of collateral deposited"],"type":"u64"},{"name":"marketValueSf","docs":["Collateral market value in quote currency (scaled fraction)"],"type":"u128"},{"name":"borrowedAmountAgainstThisCollateralInElevationGroup","docs":["Debt amount (lamport) taken against this collateral.","(only meaningful if this obligation is part of an elevation group, otherwise 0)","This is only indicative of the debt computed on the last refresh obligation.","If the obligation have multiple collateral this value is the same for all of them."],"type":"u64"},{"name":"padding","type":{"array":["u64",9]}}]}},{"name":"ObligationLiquidity","docs":["Obligation liquidity state"],"type":{"kind":"struct","fields":[{"name":"borrowReserve","docs":["Reserve liquidity is borrowed from"],"type":"publicKey"},{"name":"cumulativeBorrowRateBsf","docs":["Borrow rate used for calculating interest (big scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"lastBorrowedAtTimestamp","docs":["The timestamp at which this debt was taken.","","Conceptually, every borrow can be interpreted as \"closing the previous loan and starting a","new one\" (which would make a plain ` borrowed_at ` an even better name). But in terms of","implementation, this fields records when the *last* borrow operation from this reserve","happened (i.e. adding debt of the same reserve *does* move this timestamp).","","Note: this field is *not* only metadata: it is used in the logic, e.g. for enforcing the","fixed-term borrows (i.e. those induced by [ReserveConfig::debt_term_seconds])."],"type":"u64"},{"name":"borrowedAmountSf","docs":["Amount of liquidity borrowed plus interest (scaled fraction)"],"type":"u128"},{"name":"marketValueSf","docs":["Liquidity market value in quote currency (scaled fraction)"],"type":"u128"},{"name":"borrowFactorAdjustedMarketValueSf","docs":["Risk adjusted liquidity market value in quote currency - DEBUG ONLY - use market_value instead"],"type":"u128"},{"name":"borrowedAmountOutsideElevationGroups","docs":["Amount of liquidity borrowed outside of an elevation group"],"type":"u64"},{"name":"fixedTermBorrowRolloverConfig","docs":["The user's auto-rollover/migration opt-ins. Some settings are effective only for fixed-term","borrows, while others only for open-term borrows - see individual field docs."],"type":{"defined":"FixedTermBorrowRolloverConfig"}},{"name":"borrowedAmountAtExpiration","docs":["An amount of liquidity that was borrowed when this fixed-term borrow expired (i.e. zeroed if","this borrow is not fixed-term, or if it did not yet expire).","","Needed to honor the [LendingMarket::term_based_full_liquidation_duration_secs].","","This value is captured by [Self::capture_borrowed_amount_at_expiration] during obligation's","refresh - please see the method's docs for gotchas.","","Note on precision: we use a `u64` field, since the remaining space within this struct is","rather scarce, and we do not need sub-lamport precision for the liquidation throttling rate."],"type":"u64"},{"name":"padding2","type":{"array":["u64",4]}}]}},{"name":"ObligationOrder","docs":["A single obligation order.","See [Obligation::obligation_orders]."],"type":{"kind":"struct","fields":[{"name":"conditionThresholdSf","docs":["A threshold value used by the condition (scaled [Fraction]).","The exact meaning depends on the specific [Self::condition_type].","","Examples:","- when `condition_type == 2 (UserLtvBelow)`:","then a value of `0.455` here means that the order is active only when the obligation's","user LTV is less than `0.455` (i.e. < 45.5%).","- when `condition_type == 3 (DebtCollPriceRatioAbove)`:","assuming the obligation uses BTC collateral for SOL debt, then a value of `491.3` here","means that the order is active only when the BTC-SOL price is greater than `491.3` (i.e.","> 491.3 SOL per BTC)."],"type":"u128"},{"name":"opportunityParameterSf","docs":["A configuration parameter used by the opportunity (scaled [Fraction]).","The exact meaning depends on the specific [Self::opportunity_type].","","Examples:","- when `opportunity_type == 0 (DeleverageSingleDebtAmount)`:","Assuming the obligation uses BTC collateral for SOL debt, then a value of `1_234_000_000`","here means that a liquidator may repay up to 1234000000 lamports (i.e. 1.234 SOL) on this","obligation.","Note: the special value of [Fraction::MAX] is *not* allowed in this case.","- when `opportunity_type == 1 (DeleverageAllDebtAmount)`:","The only allowed value in this case is [Fraction::MAX] (to emphasize that *all* debt","should be repaid)."],"type":"u128"},{"name":"minExecutionBonusBps","docs":["A *minimum* additional fraction of collateral transferred to the liquidator, in bps.","","The minimum bonus is applied exactly when the [Self::condition_threshold_sf] is met, and","grows linearly towards the [Self::max_execution_bonus_bps].","","Example: a value of `50` here means 50bps == 0.5% bonus for an \"LTV > 65%\" order, when","executed precisely at the moment LTV exceeds 65%."],"type":"u16"},{"name":"maxExecutionBonusBps","docs":["A *maximum* additional fraction of collateral transferred to the liquidator, in bps.","","The maximum bonus is applied at the relevant \"extreme\" state of the obligation, i.e.:","- for a stop-loss condition, it is a point at which the obligation becomes liquidatable;","- for a take-profit condition, it is a point at which obligation has 0% LTV.","","In non-extreme states, the actual bonus value is interpolated linearly, starting from","[Self::min_execution_bonus_bps] (at the point specified by the order's condition).","","Example: a value of `300` here means 300bps == 3.0% bonus for a \"debt/coll price > 140\"","order, when executed at a higher price = 200, at which the obligation's LTV happens to","be equal to its liquidation LTV."],"type":"u16"},{"name":"conditionType","docs":["Serialized [ConditionType].","The entire order is void when this is zeroed (i.e. representing [ConditionType::Never]).","","Example: a value of `2` here denotes `UserLtvBelow` condition type. Of course, to","interpret this condition, we also need to take the [Self::condition_threshold_sf] into","account."],"type":"u8"},{"name":"opportunityType","docs":["Serialized [OpportunityType].","","Example: a value of `0` here denotes `DeleverageSingleDebtAmount` opportunity. Of course, to","interpret this opportunity, we also need to take the [Self::opportunity_parameter_sf] into","account."],"type":"u8"},{"name":"padding1","docs":["Alignment padding.","The fields above take up 2+2+1+1 bytes = 48 bits, which means we need 80 bits = 10 bytes to","align with `u128`s."],"type":{"array":["u8",10]}},{"name":"padding2","docs":["End padding.","The total size of a single instance is 8*u128 = 128 bytes."],"type":{"array":["u128",5]}}]}},{"name":"UpdateObligationConfigMode","docs":["A discriminator of a user-configurable piece of [Obligation].","","Implementation note: due to TS-side codegen quirks (and a \"convention\" currently seen e.g.","within reserve and market update operations), this is not a true Rust enum. The new value of","a config item is provided in a separate handler argument (borsh-serialized), and its expected","type is defined by each discriminator here. Additionally, each update mode acts on a specific","[ObligationConfigUpdateSubject] (e.g. the auto-rollover of fixed-term borrows is configured on","a per-borrow basis), which is also specified by separate handler arguments."],"type":{"kind":"enum","variants":[{"name":"FixedTermRolloverEnabled"},{"name":"FixedTermRolloverMaxBorrowRateBps"},{"name":"FixedTermRolloverMinDebtTermSeconds"},{"name":"FixedTermRolloverOpenTermAllowed"},{"name":"MigrationToFixedEnabled"}]}},{"name":"BigFractionBytes","type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u64",4]}},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"FeeCalculation","docs":["Calculate fees exlusive or inclusive of an amount"],"type":{"kind":"enum","variants":[{"name":"Exclusive"},{"name":"Inclusive"}]}},{"name":"ReserveCollateral","docs":["Reserve collateral"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve collateral mint address"],"type":"publicKey"},{"name":"mintTotalSupply","docs":["Reserve collateral mint supply, used for exchange rate"],"type":"u64"},{"name":"supplyVault","docs":["Reserve collateral supply address"],"type":"publicKey"},{"name":"padding1","type":{"array":["u128",32]}},{"name":"padding2","type":{"array":["u128",32]}}]}},{"name":"ReserveConfig","docs":["Reserve configuration values"],"type":{"kind":"struct","fields":[{"name":"status","docs":["Status of the reserve Active/Obsolete/Hidden"],"type":"u8"},{"name":"paddingDeprecatedAssetTier","docs":["Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt"],"type":"u8"},{"name":"hostFixedInterestRateBps","docs":["Flat rate that goes to the host"],"type":"u16"},{"name":"minDeleveragingBonusBps","docs":["Starting bonus for deleveraging-related liquidations, in bps."],"type":"u16"},{"name":"blockCtokenUsage","docs":["Boolean flag to block minting/redeeming of ctokens","Blocks usage of ctokens (minting or withdrawing from obligation)","Effectively blocks deposit_reserve_liquidity and withdraw_obligation_collateral"],"type":"u8"},{"name":"earlyRepayRemainingInterestPct","docs":["The percentage of remaining interest over the debt term that is charged as early repay penalty.","Only meaningful when `debt_term_seconds > 0`."],"type":"u8"},{"name":"emergencyMode","docs":["Whether the reserve is in emergency mode.","Blocks most user operations involving this reserve, similar to [LendingMarket::emergency_mode]","but scoped to a single reserve. Also cascades to obligations using this reserve as","collateral or debt, blocking borrows and withdrawals on other reserves but still","allowing repays and deposits."],"type":"u8"},{"name":"reserved1","docs":["Past reserved space - feel free to reuse."],"type":{"array":["u8",4]}},{"name":"protocolOrderExecutionFeePct","docs":["Cut of the order execution bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"protocolTakeRatePct","docs":["Protocol take rate is the amount borrowed interest protocol receives, as a percentage"],"type":"u8"},{"name":"protocolLiquidationFeePct","docs":["Cut of the liquidation bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"loanToValuePct","docs":["Target ratio of the value of borrows to deposits, as a percentage","0 if use as collateral is disabled"],"type":"u8"},{"name":"liquidationThresholdPct","docs":["Loan to value ratio at which an obligation can be liquidated, as percentage"],"type":"u8"},{"name":"minLiquidationBonusBps","docs":["Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"maxLiquidationBonusBps","docs":["Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"badDebtLiquidationBonusBps","docs":["Bad debt liquidation bonus for an undercollateralized obligation, as bps"],"type":"u16"},{"name":"deleveragingMarginCallPeriodSecs","docs":["Time in seconds that must pass before redemptions are enabled after the deposit limit is","crossed.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"deleveragingThresholdDecreaseBpsPerDay","docs":["The rate at which the deleveraging threshold decreases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"fees","docs":["Program owner fees assessed, separate from gains due to interest accrual"],"type":{"defined":"ReserveFees"}},{"name":"borrowRateCurve","docs":["Borrow rate curve based on utilization"],"type":{"defined":"BorrowRateCurve"}},{"name":"borrowFactorPct","docs":["Borrow factor in percentage - used for risk adjustment"],"type":"u64"},{"name":"depositLimit","docs":["Maximum deposit limit of liquidity in native units, u64::MAX for inf"],"type":"u64"},{"name":"borrowLimit","docs":["Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits)"],"type":"u64"},{"name":"tokenInfo","docs":["Token id from TokenInfos struct"],"type":{"defined":"TokenInfo"}},{"name":"depositWithdrawalCap","docs":["Deposit withdrawal caps - deposit & redeem"],"type":{"defined":"WithdrawalCaps"}},{"name":"debtWithdrawalCap","docs":["Debt withdrawal caps - borrow & repay"],"type":{"defined":"WithdrawalCaps"}},{"name":"elevationGroups","type":{"array":["u8",20]}},{"name":"disableUsageAsCollOutsideEmode","type":"u8"},{"name":"utilizationLimitBlockBorrowingAbovePct","docs":["Utilization (in percentage) above which borrowing is blocked. 0 to disable."],"type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether this reserve should be subject to auto-deleveraging after deposit or borrow limit is","crossed.","Besides this flag, the lending market's flag also needs to be enabled (logical `AND`).","**NOTE:** the manual \"target LTV\" deleveraging is NOT affected by this flag."],"type":"u8"},{"name":"proposerAuthorityLocked","docs":["Boolean flag indicating whether the reserve is locked for the proposer authority.","","Once the proposer have finished preparing the reserve, it must be locked to prevent","further changes to the reserve configuration allowing review and voting on the proposal","without alteration during the voting period."],"type":"u8"},{"name":"borrowLimitOutsideElevationGroup","docs":["Maximum amount liquidity of this reserve borrowed outside all elevation groups","- u64::MAX for inf","- 0 to disable borrows outside elevation groups"],"type":"u64"},{"name":"borrowLimitAgainstThisCollateralInElevationGroup","docs":["Defines the maximum amount (in lamports of elevation group debt asset)","that can be borrowed when this reserve is used as collateral.","- u64::MAX for inf","- 0 to disable borrows in this elevation group (expected value for the debt asset)"],"type":{"array":["u64",32]}},{"name":"deleveragingBonusIncreaseBpsPerDay","docs":["The rate at which the deleveraging-related liquidation bonus increases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"debtMaturityTimestamp","docs":["The timestamp at which all [Obligation::borrows] using this reserve become liquidatable","(on the same terms as reserve-wide deleveraging).","Inactive when zeroed (i.e. debt never matures).","","Note: this feature is independent of [Self::debt_term_seconds] - the liquidation mechanism","is based directly on the timestamp defined here, on Reserve's level."],"type":"u64"},{"name":"debtTermSeconds","docs":["The duration after which any debt coming from this Reserve must be repaid.","Inactive when zeroed (i.e. funds can be borrowed indefinitely).","","Note: this feature is independent of [Self::debt_maturity_timestamp] - the liquidation","mechanism is based on the [ObligationLiquidity::last_borrowed_at_timestamp]."],"type":"u64"},{"name":"rewardsAmountPerSlot","docs":["Rewards distributed per slot to depositors. Drained from","[ReserveLiquidity::rewards_amount_available] into","[ReserveLiquidity::total_available_amount] at each refresh, capped by the","market-level [LendingMarket::reserve_rewards_max_apr_bps]. `0` disables.","","**Note:** because rewards inflate `total_available_amount`, a non-zero RPS on a","reserve with [Self::autodeleverage_enabled] and a finite [Self::deposit_limit]","will eventually cross the cap and arm the autodeleverage countdown. Size","`deposit_limit` and RPS together."],"type":"u64"},{"name":"permissionedOps","docs":["Bitmask of [PermissionedOp]s gated by the parent market's `permissioning_authority`","when this reserve is the operation's target. `0` = no operation is restricted at the","reserve level. Use [Reserve::get_permissioned_ops] for a typed view."],"type":"u64"}]}},{"name":"ReserveFarmKind","type":{"kind":"enum","variants":[{"name":"Collateral"},{"name":"Debt"}]}},{"name":"ReserveFees","docs":["Additional fee information on a reserve","","These exist separately from interest accrual fees, and are specifically for the program owner","and referral fee. The fees are paid out as a percentage of liquidity token amounts during","repayments and liquidations."],"type":{"kind":"struct","fields":[{"name":"originationFeeSf","docs":["Fee assessed on `BorrowObligationLiquidity`, as scaled fraction (60 bits fractional part)","Must be between `0` and `2^60`, such that `2^60 = 1`. A few examples for","clarity:","1% = (1 << 60) / 100 = 11529215046068470","0.01% (1 basis point) = 115292150460685","0.00001% (Aave origination fee) = 115292150461"],"type":"u64"},{"name":"flashLoanFeeSf","docs":["Fee for flash loan, expressed as scaled fraction.","0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541"],"type":"u64"},{"name":"padding","docs":["Used for allignment"],"type":{"array":["u8",8]}}]}},{"name":"ReserveLiquidity","docs":["Reserve liquidity"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve liquidity mint address"],"type":"publicKey"},{"name":"supplyVault","docs":["Reserve liquidity supply address"],"type":"publicKey"},{"name":"feeVault","docs":["Reserve liquidity fee collection address"],"type":"publicKey"},{"name":"totalAvailableAmount","docs":["Total reserve liquidity available.","","Note: not all of this liquidity can be freely used for any purpose. Production code should","use the specialized getters - see e.g. [Reserve::total_available_liquidity_amount()],","[Reserve::freely_available_liquidity_amount()]."],"type":"u64"},{"name":"borrowedAmountSf","docs":["Reserve liquidity borrowed (scaled fraction)"],"type":"u128"},{"name":"marketPriceSf","docs":["Reserve liquidity market price in quote currency (scaled fraction)"],"type":"u128"},{"name":"marketPriceLastUpdatedTs","docs":["Unix timestamp of the market price (from the oracle)"],"type":"u64"},{"name":"mintDecimals","docs":["Reserve liquidity mint decimals"],"type":"u64"},{"name":"depositLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"borrowLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"cumulativeBorrowRateBsf","docs":["Reserve liquidity cumulative borrow rate (scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"accumulatedProtocolFeesSf","docs":["Reserve cumulative protocol fees (scaled fraction)"],"type":"u128"},{"name":"accumulatedReferrerFeesSf","docs":["Reserve cumulative referrer fees (scaled fraction)"],"type":"u128"},{"name":"pendingReferrerFeesSf","docs":["Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction)"],"type":"u128"},{"name":"absoluteReferralRateSf","docs":["Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction)"],"type":"u128"},{"name":"tokenProgram","docs":["Token program of the liquidity mint"],"type":"publicKey"},{"name":"rewardsAmountAvailable","docs":["Reserve rewards budget remaining for distribution.","","Tokens are deposited via `topup_reserve_rewards` and increase this counter (without","touching [Self::total_available_amount]). On every `refresh_reserve`, up to","`rewards_amount_per_slot * slots_elapsed` tokens are moved from this counter into","[Self::total_available_amount], inflating the cToken exchange rate, capped by the","market-level `reserve_rewards_max_apr_bps` cap."],"type":"u64"},{"name":"padding2","type":{"array":["u64",50]}},{"name":"padding3","type":{"array":["u128",32]}}]}},{"name":"ReserveStatus","type":{"kind":"enum","variants":[{"name":"Active"},{"name":"Obsolete"},{"name":"Hidden"}]}},{"name":"WithdrawQueue","docs":["A tracker of ticket-based withdrawals."],"type":{"kind":"struct","fields":[{"name":"queuedCollateralAmount","docs":["The part of [ReserveLiquidity::total_available_amount] locked for ticketed withdrawals."],"type":"u64"},{"name":"nextIssuedTicketSequenceNumber","docs":["The sequence number of the next ticket to be issued when enqueueing to withdraw.","Note: it is also a number of tickets issued so far."],"type":"u64"},{"name":"nextWithdrawableTicketSequenceNumber","docs":["The sequence number of the next ticket to be used for actually transferring the withdrawn","liquidity (assuming it is available in the reserve).","Note: it is also a number of fully-consumed tickets so far."],"type":"u64"}]}},{"name":"WithdrawalCaps","docs":["Reserve Withdrawal Caps State"],"type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"PriceHeuristic","type":{"kind":"struct","fields":[{"name":"lower","docs":["Lower value of acceptable price"],"type":"u64"},{"name":"upper","docs":["Upper value of acceptable price"],"type":"u64"},{"name":"exp","docs":["Number of decimals of the previously defined values"],"type":"u64"}]}},{"name":"PythConfiguration","type":{"kind":"struct","fields":[{"name":"price","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"}]}},{"name":"ScopeConfiguration","type":{"kind":"struct","fields":[{"name":"priceFeed","docs":["Pubkey of the scope price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"priceChain","docs":["This is the scope_id price chain that results in a price for the token"],"type":{"array":["u16",4]}},{"name":"twapChain","docs":["This is the scope_id price chain for the twap"],"type":{"array":["u16",4]}}]}},{"name":"SwitchboardConfiguration","type":{"kind":"struct","fields":[{"name":"priceAggregator","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"twapAggregator","type":"publicKey"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"name","docs":["UTF-8 encoded name of the token (null-terminated)"],"type":{"array":["u8",32]}},{"name":"heuristic","docs":["Heuristics limits of acceptable price"],"type":{"defined":"PriceHeuristic"}},{"name":"maxTwapDivergenceBps","docs":["Max divergence between twap and price in bps"],"type":"u64"},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"scopeConfiguration","docs":["Scope price configuration"],"type":{"defined":"ScopeConfiguration"}},{"name":"switchboardConfiguration","docs":["Switchboard configuration"],"type":{"defined":"SwitchboardConfiguration"}},{"name":"pythConfiguration","docs":["Pyth configuration"],"type":{"defined":"PythConfiguration"}},{"name":"blockPriceUsage","type":"u8"},{"name":"reserved","type":{"array":["u8",7]}},{"name":"padding","type":{"array":["u64",19]}}]}},{"name":"ProgressCallbackType","docs":["A callback to be notified when the ticket is being processed.","","## Why an enum?","","Only reliable programs may be used for callbacks (since any error or panic returned from a CPI","aborts an entire transaction, which would stall the queue progress). Hence, we need a whitelist,","and the simplest initial implementation is a hardcoded enum. If we want to be able to add new","whitelist items without SC updates, we can implement such support using a special enum value","(e.g. `SPECIFIED_BY_PDA = 255`)."],"type":{"kind":"enum","variants":[{"name":"None"},{"name":"KlendQueueAccountingHandlerOnKvault"}]}},{"name":"BorrowRateCurve","type":{"kind":"struct","fields":[{"name":"points","type":{"array":[{"defined":"CurvePoint"},11]}}]}},{"name":"CurvePoint","type":{"kind":"struct","fields":[{"name":"utilizationRateBps","type":"u32"},{"name":"borrowRateBps","type":"u32"}]}}],"events":[{"name":"BorrowOrderCancelEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderFullFillEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderPartialFillEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false},{"name":"after","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderPlaceEvent","fields":[{"name":"after","type":{"defined":"BorrowOrder"},"index":false}]},{"name":"BorrowOrderUpdateEvent","fields":[{"name":"before","type":{"defined":"BorrowOrder"},"index":false},{"name":"after","type":{"defined":"BorrowOrder"},"index":false}]}],"errors":[{"code":6000,"name":"InvalidMarketAuthority","msg":"Market authority is invalid"},{"code":6001,"name":"InvalidMarketOwner","msg":"Market owner is invalid"},{"code":6002,"name":"InvalidAccountOwner","msg":"Input account owner is not the program address"},{"code":6003,"name":"InvalidAmount","msg":"Input amount is invalid"},{"code":6004,"name":"InvalidConfig","msg":"Input config value is invalid"},{"code":6005,"name":"InvalidSigner","msg":"Signer is not allowed to perform this action"},{"code":6006,"name":"InvalidAccountInput","msg":"Invalid account input"},{"code":6007,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6008,"name":"InsufficientLiquidity","msg":"Insufficient liquidity available"},{"code":6009,"name":"ReserveStale","msg":"Reserve state needs to be refreshed"},{"code":6010,"name":"WithdrawTooSmall","msg":"Withdraw amount too small"},{"code":6011,"name":"WithdrawTooLarge","msg":"Withdraw amount too large"},{"code":6012,"name":"BorrowTooSmall","msg":"Borrow amount too small to receive liquidity after fees"},{"code":6013,"name":"BorrowTooLarge","msg":"Borrow amount too large for deposited collateral"},{"code":6014,"name":"RepayTooSmall","msg":"Repay amount too small to transfer liquidity"},{"code":6015,"name":"LiquidationTooSmall","msg":"Liquidation amount too small to receive collateral"},{"code":6016,"name":"ObligationHealthy","msg":"Cannot liquidate healthy obligations"},{"code":6017,"name":"ObligationStale","msg":"Obligation state needs to be refreshed"},{"code":6018,"name":"ObligationReserveLimit","msg":"Obligation reserve limit exceeded"},{"code":6019,"name":"InvalidObligationOwner","msg":"Obligation owner is invalid"},{"code":6020,"name":"ObligationDepositsEmpty","msg":"Obligation deposits are empty"},{"code":6021,"name":"ObligationBorrowsEmpty","msg":"Obligation borrows are empty"},{"code":6022,"name":"ObligationDepositsZero","msg":"Obligation deposits have zero value"},{"code":6023,"name":"ObligationBorrowsZero","msg":"Obligation borrows have zero value"},{"code":6024,"name":"InvalidObligationCollateral","msg":"Invalid obligation collateral"},{"code":6025,"name":"InvalidObligationLiquidity","msg":"Invalid obligation liquidity"},{"code":6026,"name":"ObligationCollateralEmpty","msg":"Obligation collateral is empty"},{"code":6027,"name":"ObligationLiquidityEmpty","msg":"Obligation liquidity is empty"},{"code":6028,"name":"NegativeInterestRate","msg":"Interest rate is negative"},{"code":6029,"name":"InvalidOracleConfig","msg":"Input oracle config is invalid"},{"code":6030,"name":"InsufficientProtocolFeesToRedeem","msg":"Insufficient protocol fees to claim or no liquidity available"},{"code":6031,"name":"FlashBorrowCpi","msg":"No cpi flash borrows allowed"},{"code":6032,"name":"NoFlashRepayFound","msg":"No corresponding repay found for flash borrow"},{"code":6033,"name":"InvalidFlashRepay","msg":"Invalid repay found"},{"code":6034,"name":"FlashRepayCpi","msg":"No cpi flash repays allowed"},{"code":6035,"name":"MultipleFlashBorrows","msg":"Multiple flash borrows not allowed in the same transaction"},{"code":6036,"name":"FlashLoansDisabled","msg":"Flash loans are disabled for this reserve"},{"code":6037,"name":"SwitchboardV2Error","msg":"Switchboard error"},{"code":6038,"name":"CouldNotDeserializeScope","msg":"Cannot deserialize the scope price account"},{"code":6039,"name":"PriceTooOld","msg":"Price too old"},{"code":6040,"name":"PriceTooDivergentFromTwap","msg":"Price too divergent from twap"},{"code":6041,"name":"InvalidTwapPrice","msg":"Invalid twap price"},{"code":6042,"name":"GlobalEmergencyMode","msg":"Emergency mode is enabled"},{"code":6043,"name":"InvalidFlag","msg":"Invalid lending market config"},{"code":6044,"name":"PriceNotValid","msg":"Price is not valid"},{"code":6045,"name":"PriceIsBiggerThanHeuristic","msg":"Price is bigger than allowed by heuristic"},{"code":6046,"name":"PriceIsLowerThanHeuristic","msg":"Price lower than allowed by heuristic"},{"code":6047,"name":"PriceIsZero","msg":"Price is zero"},{"code":6048,"name":"PriceConfidenceTooWide","msg":"Price confidence too wide"},{"code":6049,"name":"IntegerOverflow","msg":"Conversion between integers failed"},{"code":6050,"name":"NoFarmForReserve","msg":"This reserve does not have a farm"},{"code":6051,"name":"IncorrectInstructionInPosition","msg":"Wrong instruction at expected position"},{"code":6052,"name":"NoPriceFound","msg":"No price found"},{"code":6053,"name":"InvalidTwapConfig","msg":"Invalid Twap configuration: Twap is enabled but one of the enabled price doesn't have a twap"},{"code":6054,"name":"InvalidPythPriceAccount","msg":"Pyth price account does not match configuration"},{"code":6055,"name":"InvalidSwitchboardAccount","msg":"Switchboard account(s) do not match configuration"},{"code":6056,"name":"InvalidScopePriceAccount","msg":"Scope price account does not match configuration"},{"code":6057,"name":"ObligationCollateralLtvZero","msg":"The obligation has one collateral with an LTV set to 0. Withdraw it before withdrawing other collaterals"},{"code":6058,"name":"InvalidObligationSeedsValue","msg":"Seeds must be default pubkeys for tag 0, and mint addresses for tag 1 or 2"},{"code":6059,"name":"DeprecatedInvalidObligationId","msg":"[DEPRECATED] Obligation id must be 0"},{"code":6060,"name":"InvalidBorrowRateCurvePoint","msg":"Invalid borrow rate curve point"},{"code":6061,"name":"InvalidUtilizationRate","msg":"Invalid utilization rate"},{"code":6062,"name":"CannotSocializeObligationWithCollateral","msg":"Obligation hasn't been fully liquidated and debt cannot be socialized."},{"code":6063,"name":"ObligationEmpty","msg":"Obligation has no borrows or deposits."},{"code":6064,"name":"WithdrawalCapReached","msg":"Withdrawal cap is reached"},{"code":6065,"name":"LastTimestampGreaterThanCurrent","msg":"The last interval start timestamp is greater than the current timestamp"},{"code":6066,"name":"LiquidationRewardTooSmall","msg":"The reward amount is less than the minimum acceptable received liquidity"},{"code":6067,"name":"IsolatedAssetTierViolation","msg":"Isolated Asset Tier Violation"},{"code":6068,"name":"InconsistentElevationGroup","msg":"The obligation's elevation group and the reserve's are not the same"},{"code":6069,"name":"InvalidElevationGroup","msg":"The elevation group chosen for the reserve does not exist in the lending market"},{"code":6070,"name":"InvalidElevationGroupConfig","msg":"The elevation group updated has wrong parameters set"},{"code":6071,"name":"UnhealthyElevationGroupLtv","msg":"The current obligation must have most or all its debt repaid before changing the elevation group"},{"code":6072,"name":"ElevationGroupNewLoansDisabled","msg":"Elevation group does not accept any new loans or any new borrows/withdrawals"},{"code":6073,"name":"ReserveDeprecated","msg":"Reserve was deprecated, no longer usable"},{"code":6074,"name":"ReferrerAccountNotInitialized","msg":"Referrer account not initialized"},{"code":6075,"name":"ReferrerAccountMintMissmatch","msg":"Referrer account mint does not match the operation reserve mint"},{"code":6076,"name":"ReferrerAccountWrongAddress","msg":"Referrer account address is not a valid program address"},{"code":6077,"name":"ReferrerAccountReferrerMissmatch","msg":"Referrer account referrer does not match the owner referrer"},{"code":6078,"name":"ReferrerAccountMissing","msg":"Referrer account missing for obligation with referrer"},{"code":6079,"name":"InsufficientReferralFeesToRedeem","msg":"Insufficient referral fees to claim or no liquidity available"},{"code":6080,"name":"CpiDisabled","msg":"CPI disabled for this instruction"},{"code":6081,"name":"ShortUrlNotAsciiAlphanumeric","msg":"Referrer short_url is not ascii alphanumeric"},{"code":6082,"name":"ReserveObsolete","msg":"Reserve is marked as obsolete"},{"code":6083,"name":"ElevationGroupAlreadyActivated","msg":"Obligation already part of the same elevation group"},{"code":6084,"name":"ObligationInObsoleteReserve","msg":"Obligation has a deposit or borrow in an obsolete reserve"},{"code":6085,"name":"ReferrerStateOwnerMismatch","msg":"Referrer state owner does not match the given signer"},{"code":6086,"name":"UserMetadataOwnerAlreadySet","msg":"User metadata owner is already set"},{"code":6087,"name":"CollateralNonLiquidatable","msg":"This collateral cannot be liquidated (LTV set to 0)"},{"code":6088,"name":"BorrowingDisabled","msg":"Borrowing is disabled"},{"code":6089,"name":"BorrowLimitExceeded","msg":"Cannot borrow above borrow limit"},{"code":6090,"name":"DepositLimitExceeded","msg":"Cannot deposit above deposit limit"},{"code":6091,"name":"BorrowingDisabledOutsideElevationGroup","msg":"Reserve does not accept any new borrows outside elevation group"},{"code":6092,"name":"NetValueRemainingTooSmall","msg":"Net value remaining too small"},{"code":6093,"name":"WorseLtvBlocked","msg":"Cannot get the obligation in a worse position"},{"code":6094,"name":"LiabilitiesBiggerThanAssets","msg":"Cannot have more liabilities than assets in a position"},{"code":6095,"name":"ReserveTokenBalanceMismatch","msg":"Reserve state and token account cannot drift"},{"code":6096,"name":"ReserveVaultBalanceMismatch","msg":"Reserve token account has been unexpectedly modified"},{"code":6097,"name":"ReserveAccountingMismatch","msg":"Reserve internal state accounting has been unexpectedly modified"},{"code":6098,"name":"BorrowingAboveUtilizationRateDisabled","msg":"Borrowing above set utilization rate is disabled"},{"code":6099,"name":"LiquidationBorrowFactorPriority","msg":"Liquidation must prioritize the debt with the highest borrow factor"},{"code":6100,"name":"LiquidationLowestLiquidationLtvPriority","msg":"Liquidation must prioritize the collateral with the lowest liquidation LTV"},{"code":6101,"name":"ElevationGroupBorrowLimitExceeded","msg":"Elevation group borrow limit exceeded"},{"code":6102,"name":"ElevationGroupWithoutDebtReserve","msg":"The elevation group does not have a debt reserve defined"},{"code":6103,"name":"ElevationGroupMaxCollateralReserveZero","msg":"The elevation group does not allow any collateral reserves"},{"code":6104,"name":"ElevationGroupHasAnotherDebtReserve","msg":"In elevation group attempt to borrow from a reserve that is not the debt reserve"},{"code":6105,"name":"ElevationGroupDebtReserveAsCollateral","msg":"The elevation group's debt reserve cannot be used as a collateral reserve"},{"code":6106,"name":"ObligationCollateralExceedsElevationGroupLimit","msg":"Obligation have more collateral than the maximum allowed by the elevation group"},{"code":6107,"name":"ObligationElevationGroupMultipleDebtReserve","msg":"Obligation is an elevation group but have more than one debt reserve"},{"code":6108,"name":"UnsupportedTokenExtension","msg":"Mint has a token (2022) extension that is not supported"},{"code":6109,"name":"InvalidTokenAccount","msg":"Can't have an spl token mint with a t22 account"},{"code":6110,"name":"DepositDisabledOutsideElevationGroup","msg":"Can't deposit into this reserve outside elevation group"},{"code":6111,"name":"CannotCalculateReferralAmountDueToSlotsMismatch","msg":"Cannot calculate referral amount due to slots mismatch"},{"code":6112,"name":"ObligationOwnersMustMatch","msg":"Obligation owners must match"},{"code":6113,"name":"ObligationsMustMatch","msg":"Obligations must match"},{"code":6114,"name":"LendingMarketsMustMatch","msg":"Lending markets must match"},{"code":6115,"name":"ObligationCurrentlyMarkedForDeleveraging","msg":"Obligation is already marked for deleveraging"},{"code":6116,"name":"MaximumWithdrawValueZero","msg":"Maximum withdrawable value of this collateral is zero, LTV needs improved"},{"code":6117,"name":"ZeroMaxLtvAssetsInDeposits","msg":"No max LTV 0 assets allowed in deposits for repay and withdraw"},{"code":6118,"name":"LowestLtvAssetsPriority","msg":"Withdrawing must prioritize the collateral with the lowest reserve max-LTV"},{"code":6119,"name":"WorseLtvThanUnhealthyLtv","msg":"Cannot get the obligation liquidatable"},{"code":6120,"name":"FarmAccountsMissing","msg":"Farm accounts to refresh are missing"},{"code":6121,"name":"RepayTooSmallForFullLiquidation","msg":"Repay amount is too small to satisfy the mandatory full liquidation"},{"code":6122,"name":"InsufficientRepayAmount","msg":"Liquidator provided repay amount lower than required by liquidation rules"},{"code":6123,"name":"OrderIndexOutOfBounds","msg":"Obligation order of the given index cannot exist"},{"code":6124,"name":"InvalidOrderConfiguration","msg":"Given order configuration has wrong parameters"},{"code":6125,"name":"OrderConfigurationNotSupportedByObligation","msg":"Given order configuration cannot be used with the current state of the obligation"},{"code":6126,"name":"OperationNotPermittedWithCurrentObligationOrders","msg":"Single debt, single collateral obligation orders have to be cancelled before changing the deposit/borrow count"},{"code":6127,"name":"OperationNotPermittedMarketImmutable","msg":"Cannot update lending market because it is set as immutable"},{"code":6128,"name":"OrderCreationDisabled","msg":"Creation of new orders is disabled"},{"code":6129,"name":"NoUpgradeAuthority","msg":"Cannot initialize global config because there is no upgrade authority to the program"},{"code":6130,"name":"InitialAdminDepositExecuted","msg":"Initial admin deposit in reserve already executed"},{"code":6131,"name":"ReserveHasNotReceivedInitialDeposit","msg":"Reserve has not received the initial deposit, cannot update config"},{"code":6132,"name":"CTokenUsageBlocked","msg":"CToken minting/redeeming is blocked for this reserve"},{"code":6133,"name":"CannotUseSameReserve","msg":"Cannot call ix with same reserve"},{"code":6134,"name":"TransactionIncludesRestrictedPrograms","msg":"Transaction includes restricted programs"},{"code":6135,"name":"BorrowOrderDebtLiquidityMintMismatch","msg":"There is no borrow order requesting debt in the given asset"},{"code":6136,"name":"BorrowOrderMaxBorrowRateExceeded","msg":"Reserve used for fill exceeds the maximum borrow rate specified by the order"},{"code":6137,"name":"BorrowOrderMinDebtTermInsufficient","msg":"Reserve used for fill defines a debt term shorter than specified by the order"},{"code":6138,"name":"BorrowOrderFillTimeLimitExceeded","msg":"Borrow order can no longer be filled"},{"code":6139,"name":"ReserveDebtMaturityReached","msg":"Cannot borrow from a reserve that reached its debt maturity timestamp"},{"code":6140,"name":"NonUpdatableOrderConfiguration","msg":"Some piece of the order's configuration cannot be updated (the order should be cancelled and placed again)"},{"code":6141,"name":"BorrowOrderExecutionDisabled","msg":"Execution of borrow orders is disabled"},{"code":6142,"name":"DebtReachedReserveDebtTerm","msg":"Cannot increase the debt that has reached its end of term configured by the reserve"},{"code":6143,"name":"ExpectationNotMet","msg":"The on-chain state does not meet expectation specified by the caller, so the operation must be aborted (to avoid race conditions)"},{"code":6144,"name":"BorrowOrderFillValueTooSmall","msg":"Available liquidity could not satisfy the minimum required borrow order fill value"},{"code":6145,"name":"WithdrawTicketIssuanceDisabled","msg":"Issuing new withdraw tickets is disabled by the market"},{"code":6146,"name":"WithdrawTicketRedemptionDisabled","msg":"Redeeming withdraw tickets is disabled by the market"},{"code":6147,"name":"WithdrawTicketStillValid","msg":"Recovering collateral is only available after the withdraw ticket has been marked invalid"},{"code":6148,"name":"WithdrawTicketRequiresFullRedemption","msg":"The withdraw ticket's current state requires that it is fully redeemed (e.g. due to owner ATA creation), but there is not enough liquidity"},{"code":6149,"name":"UserTokenBalanceMismatch","msg":"The user's token account has changed its balance in an unexpected way"},{"code":6150,"name":"WithdrawQueuedLiquidityValueTooSmall","msg":"Available liquidity could not satisfy the minimum required ticketed withdrawal value"},{"code":6151,"name":"InvalidTokenAccountState","msg":"Token account is in a state preventing the handler's operation (e.g. frozen or delegate)"},{"code":6152,"name":"WithdrawTicketInvalid","msg":"Cannot use ticket that was already marked invalid"},{"code":6153,"name":"BorrowOrderValueTooSmall","msg":"Borrow order's value would be below the market-configured minimum"},{"code":6154,"name":"WithdrawTicketValueTooSmall","msg":"Withdraw ticket's value would be below the market-configured minimum"},{"code":6155,"name":"InvalidWithdrawTicketProgressCallbackConfig","msg":"Invalid configuration or required custom accounts for the requested withdraw ticket callback type"},{"code":6156,"name":"WithdrawTicketProgressCallbackAccountsMissing","msg":"One or more accounts required by the ticket's configured progress callback are missing"},{"code":6157,"name":"BorrowRolloverConfigurationDisabled","msg":"Configuring auto-rollover on loans is disabled by market owner"},{"code":6158,"name":"InvalidObligationConfigUpdateSubject","msg":"Invalid specification of the Obligation's part to be configured"},{"code":6159,"name":"BorrowRolloverLiquidityMintMismatch","msg":"Auto-rollover must use a target reserve of the same token"},{"code":6160,"name":"ObligationBorrowRolloverNotApplicable","msg":"The given borrow is not fixed-term and does not require rolling over"},{"code":6161,"name":"ObligationBorrowOutsideRolloverWindow","msg":"The given borrow is outside the corresponding market-configured rollover window"},{"code":6162,"name":"ObligationBorrowRolloverNotEnabledByOwner","msg":"Obligation's owner did not opt-in for auto-rollover of the given borrow"},{"code":6163,"name":"ObligationBorrowRolloverTargetReserveMismatch","msg":"Obligation's owner did not allow to roll over into terms offered by the given reserve"},{"code":6164,"name":"BorrowRolloverExecutionDisabled","msg":"Executing auto-rollover is disabled by market owner"},{"code":6165,"name":"ObligationAccountingMismatch","msg":"Obligation internal state accounting has been unexpectedly modified"},{"code":6166,"name":"PartialRolloverValueTooSmall","msg":"Partial rollover amount is below the market-configured minimum value"},{"code":6167,"name":"ObligationBorrowRolloverConfigMismatch","msg":"Pre-existing rollover configuration of the loan cannot be overwritten by the operation"},{"code":6168,"name":"ObligationBorrowRolloverMustProlongDebtTerm","msg":"Rollover into existing borrow must prolong the remaining debt term"},{"code":6169,"name":"RolloverNotSupportedInElevationGroup","msg":"Rollover is not supported for obligations in an elevation group"},{"code":6170,"name":"WithdrawTicketCancellationDisabled","msg":"Cancelling withdraw tickets is disabled by the market"},{"code":6171,"name":"WithdrawTicketFullyCancelled","msg":"Cannot use ticket that was already fully-cancelled"},{"code":6172,"name":"CloneSourceReserveDisabled","msg":"Cannot clone config from a reserve that is disabled"},{"code":6173,"name":"CloneTargetReserveAlreadyInUse","msg":"Cannot clone config into a reserve that has been in use"},{"code":6174,"name":"ClonedReserveLiquidityMintMismatch","msg":"Cannot clone config between reserves of different mints"},{"code":6175,"name":"ReserveEmergencyMode","msg":"Reserve emergency mode is enabled"},{"code":6176,"name":"ObligationOwnershipTransferInProgress","msg":"Obligation ownership transfer is in progress"},{"code":6177,"name":"ObligationOwnershipTransferNotInInitiatedState","msg":"Obligation ownership transfer is not in initiated state"},{"code":6178,"name":"ObligationPendingOwnerNotSet","msg":"Obligation pending owner not set"},{"code":6179,"name":"ObligationInvalidPendingOwner","msg":"Invalid pending owner address"},{"code":6180,"name":"ObligationOwnershipTransferNotApproved","msg":"Obligation ownership transfer not approved by admin"},{"code":6181,"name":"ObligationHasActiveBorrowOrders","msg":"Obligation has active borrow orders"},{"code":6182,"name":"OnlyComputeBudgetCompanionIxsAllowed","msg":"Only ComputeBudget instructions may accompany this instruction"},{"code":6183,"name":"MissingPermissioner","msg":"Required permissioning account is missing"},{"code":6184,"name":"ReserveRewardsDisabled","msg":"Reserve rewards are disabled on this market (reserve_rewards_max_apr_bps is 0)"}]} \ No newline at end of file diff --git a/idls/kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json b/idls/kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json new file mode 100644 index 0000000..231f87f --- /dev/null +++ b/idls/kamino_vault.kvauTFR8qm1dhniz6pYuBZkuene3Hfrs1VQhVRgCNrr.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"kamino_vault","instructions":[{"name":"initVault","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseTokenMint","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"adminTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateReserveAllocation","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"weight","type":"u64"},{"name":"cap","type":"u64"}]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}]},{"name":"withdrawFromReserveAccounts","accounts":[{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"invest","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"payerTokenAccount","isMut":true,"isSigner":false},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateVaultConfig","accounts":[{"name":"vaultAdminAuthority","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"entry","type":{"defined":"VaultConfigField"}},{"name":"data","type":"bytes"}]},{"name":"withdrawPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAdmin","accounts":[{"name":"pendingAdmin","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false}],"args":[]},{"name":"giveUpPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmountToGiveUp","type":"u64"}]},{"name":"initializeSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]}],"accounts":[{"name":"Reserve","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of the reserve"],"type":"u64"},{"name":"lastUpdate","docs":["Last slot when supply and rates updated"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"farmCollateral","type":"publicKey"},{"name":"farmDebt","type":"publicKey"},{"name":"liquidity","docs":["Reserve liquidity"],"type":{"defined":"ReserveLiquidity"}},{"name":"reserveLiquidityPadding","type":{"array":["u64",150]}},{"name":"collateral","docs":["Reserve collateral"],"type":{"defined":"ReserveCollateral"}},{"name":"reserveCollateralPadding","type":{"array":["u64",150]}},{"name":"config","docs":["Reserve configuration values"],"type":{"defined":"ReserveConfig"}},{"name":"configPadding","type":{"array":["u64",116]}},{"name":"borrowedAmountOutsideElevationGroup","type":"u64"},{"name":"borrowedAmountsAgainstThisReserveInElevationGroups","docs":["Amount of token borrowed in lamport of debt asset in the given","elevation group when this reserve is part of the collaterals."],"type":{"array":["u64",32]}},{"name":"padding","type":{"array":["u64",207]}}]}},{"name":"VaultState","type":{"kind":"struct","fields":[{"name":"vaultAdminAuthority","type":"publicKey"},{"name":"baseVaultAuthority","type":"publicKey"},{"name":"baseVaultAuthorityBump","type":"u64"},{"name":"tokenMint","type":"publicKey"},{"name":"tokenMintDecimals","type":"u64"},{"name":"tokenVault","type":"publicKey"},{"name":"tokenProgram","type":"publicKey"},{"name":"sharesMint","type":"publicKey"},{"name":"sharesMintDecimals","type":"u64"},{"name":"tokenAvailable","type":"u64"},{"name":"sharesIssued","type":"u64"},{"name":"availableCrankFunds","type":"u64"},{"name":"padding0","type":"u64"},{"name":"performanceFeeBps","type":"u64"},{"name":"managementFeeBps","type":"u64"},{"name":"lastFeeChargeTimestamp","type":"u64"},{"name":"prevAumSf","type":"u128"},{"name":"pendingFeesSf","type":"u128"},{"name":"vaultAllocationStrategy","type":{"array":[{"defined":"VaultAllocation"},10]}},{"name":"minDepositAmount","type":"u64"},{"name":"minWithdrawAmount","type":"u64"},{"name":"minInvestAmount","type":"u64"},{"name":"minInvestDelaySlots","type":"u64"},{"name":"crankFundFeePerReserve","type":"u64"},{"name":"pendingAdmin","type":"publicKey"},{"name":"cumulativeEarnedInterestSf","type":"u128"},{"name":"cumulativeMgmtFeesSf","type":"u128"},{"name":"cumulativePerfFeesSf","type":"u128"},{"name":"name","type":{"array":["u8",40]}},{"name":"vaultLookupTable","type":"publicKey"},{"name":"vaultFarm","type":"publicKey"},{"name":"creationTimestamp","type":"u64"},{"name":"padding1","type":"u64"},{"name":"allocationAdmin","type":"publicKey"},{"name":"padding2","type":{"array":["u128",242]}}]}}],"types":[{"name":"LastUpdate","docs":["Last update state"],"type":{"kind":"struct","fields":[{"name":"slot","docs":["Last slot when updated"],"type":"u64"},{"name":"stale","docs":["True when marked stale, false when slot updated"],"type":"u8"},{"name":"priceStatus","docs":["Status of the prices used to calculate the last update"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}}]}},{"name":"BigFractionBytes","type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u64",4]}},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"ReserveCollateral","docs":["Reserve collateral"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve collateral mint address"],"type":"publicKey"},{"name":"mintTotalSupply","docs":["Reserve collateral mint supply, used for exchange rate"],"type":"u64"},{"name":"supplyVault","docs":["Reserve collateral supply address"],"type":"publicKey"},{"name":"padding1","type":{"array":["u128",32]}},{"name":"padding2","type":{"array":["u128",32]}}]}},{"name":"ReserveConfig","docs":["Reserve configuration values"],"type":{"kind":"struct","fields":[{"name":"status","docs":["Status of the reserve Active/Obsolete/Hidden"],"type":"u8"},{"name":"assetTier","docs":["Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt"],"type":"u8"},{"name":"hostFixedInterestRateBps","docs":["Flat rate that goes to the host"],"type":"u16"},{"name":"reserved2","docs":["[DEPRECATED] Boost for side (debt or collateral)"],"type":{"array":["u8",2]}},{"name":"reserved3","docs":["[DEPRECATED] Reward points multiplier per obligation type"],"type":{"array":["u8",8]}},{"name":"protocolTakeRatePct","docs":["Protocol take rate is the amount borrowed interest protocol receives, as a percentage"],"type":"u8"},{"name":"protocolLiquidationFeePct","docs":["Cut of the liquidation bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"loanToValuePct","docs":["Target ratio of the value of borrows to deposits, as a percentage","0 if use as collateral is disabled"],"type":"u8"},{"name":"liquidationThresholdPct","docs":["Loan to value ratio at which an obligation can be liquidated, as percentage"],"type":"u8"},{"name":"minLiquidationBonusBps","docs":["Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"maxLiquidationBonusBps","docs":["Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"badDebtLiquidationBonusBps","docs":["Bad debt liquidation bonus for an undercollateralized obligation, as bps"],"type":"u16"},{"name":"deleveragingMarginCallPeriodSecs","docs":["Time in seconds that must pass before redemptions are enabled after the deposit limit is","crossed.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"deleveragingThresholdDecreaseBpsPerDay","docs":["The rate at which the deleveraging threshold decreases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"fees","docs":["Program owner fees assessed, separate from gains due to interest accrual"],"type":{"defined":"ReserveFees"}},{"name":"borrowRateCurve","docs":["Borrow rate curve based on utilization"],"type":{"defined":"BorrowRateCurve"}},{"name":"borrowFactorPct","docs":["Borrow factor in percentage - used for risk adjustment"],"type":"u64"},{"name":"depositLimit","docs":["Maximum deposit limit of liquidity in native units, u64::MAX for inf"],"type":"u64"},{"name":"borrowLimit","docs":["Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits)"],"type":"u64"},{"name":"tokenInfo","docs":["Token id from TokenInfos struct"],"type":{"defined":"TokenInfo"}},{"name":"depositWithdrawalCap","docs":["Deposit withdrawal caps - deposit & redeem"],"type":{"defined":"WithdrawalCaps"}},{"name":"debtWithdrawalCap","docs":["Debt withdrawal caps - borrow & repay"],"type":{"defined":"WithdrawalCaps"}},{"name":"elevationGroups","type":{"array":["u8",20]}},{"name":"disableUsageAsCollOutsideEmode","type":"u8"},{"name":"utilizationLimitBlockBorrowingAbovePct","docs":["Utilization (in percentage) above which borrowing is blocked. 0 to disable."],"type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether this reserve should be subject to auto-deleveraging after deposit or borrow limit is","crossed.","Besides this flag, the lending market's flag also needs to be enabled (logical `AND`).","**NOTE:** the manual \"target LTV\" deleveraging (enabled by the risk council for individual","obligations) is NOT affected by this flag."],"type":"u8"},{"name":"reserved1","type":{"array":["u8",1]}},{"name":"borrowLimitOutsideElevationGroup","docs":["Maximum amount liquidity of this reserve borrowed outside all elevation groups","- u64::MAX for inf","- 0 to disable borrows outside elevation groups"],"type":"u64"},{"name":"borrowLimitAgainstThisCollateralInElevationGroup","docs":["Defines the maximum amount (in lamports of elevation group debt asset)","that can be borrowed when this reserve is used as collateral.","- u64::MAX for inf","- 0 to disable borrows in this elevation group (expected value for the debt asset)"],"type":{"array":["u64",32]}},{"name":"deleveragingBonusIncreaseBpsPerDay","docs":["The rate at which the deleveraging-related liquidation bonus increases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"}]}},{"name":"ReserveFees","docs":["Additional fee information on a reserve","","These exist separately from interest accrual fees, and are specifically for the program owner","and referral fee. The fees are paid out as a percentage of liquidity token amounts during","repayments and liquidations."],"type":{"kind":"struct","fields":[{"name":"borrowFeeSf","docs":["Fee assessed on `BorrowObligationLiquidity`, as scaled fraction (60 bits fractional part)","Must be between `0` and `2^60`, such that `2^60 = 1`. A few examples for","clarity:","1% = (1 << 60) / 100 = 11529215046068470","0.01% (1 basis point) = 115292150460685","0.00001% (Aave borrow fee) = 115292150461"],"type":"u64"},{"name":"flashLoanFeeSf","docs":["Fee for flash loan, expressed as scaled fraction.","0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541"],"type":"u64"},{"name":"padding","docs":["Used for allignment"],"type":{"array":["u8",8]}}]}},{"name":"ReserveLiquidity","docs":["Reserve liquidity"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve liquidity mint address"],"type":"publicKey"},{"name":"supplyVault","docs":["Reserve liquidity supply address"],"type":"publicKey"},{"name":"feeVault","docs":["Reserve liquidity fee collection address"],"type":"publicKey"},{"name":"availableAmount","docs":["Reserve liquidity available"],"type":"u64"},{"name":"borrowedAmountSf","docs":["Reserve liquidity borrowed (scaled fraction)"],"type":"u128"},{"name":"marketPriceSf","docs":["Reserve liquidity market price in quote currency (scaled fraction)"],"type":"u128"},{"name":"marketPriceLastUpdatedTs","docs":["Unix timestamp of the market price (from the oracle)"],"type":"u64"},{"name":"mintDecimals","docs":["Reserve liquidity mint decimals"],"type":"u64"},{"name":"depositLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"borrowLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"cumulativeBorrowRateBsf","docs":["Reserve liquidity cumulative borrow rate (scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"accumulatedProtocolFeesSf","docs":["Reserve cumulative protocol fees (scaled fraction)"],"type":"u128"},{"name":"accumulatedReferrerFeesSf","docs":["Reserve cumulative referrer fees (scaled fraction)"],"type":"u128"},{"name":"pendingReferrerFeesSf","docs":["Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction)"],"type":"u128"},{"name":"absoluteReferralRateSf","docs":["Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction)"],"type":"u128"},{"name":"tokenProgram","docs":["Token program of the liquidity mint"],"type":"publicKey"},{"name":"padding2","type":{"array":["u64",51]}},{"name":"padding3","type":{"array":["u128",32]}}]}},{"name":"WithdrawalCaps","docs":["Reserve Withdrawal Caps State"],"type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"PriceHeuristic","type":{"kind":"struct","fields":[{"name":"lower","docs":["Lower value of acceptable price"],"type":"u64"},{"name":"upper","docs":["Upper value of acceptable price"],"type":"u64"},{"name":"exp","docs":["Number of decimals of the previously defined values"],"type":"u64"}]}},{"name":"PythConfiguration","type":{"kind":"struct","fields":[{"name":"price","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"}]}},{"name":"ScopeConfiguration","type":{"kind":"struct","fields":[{"name":"priceFeed","docs":["Pubkey of the scope price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"priceChain","docs":["This is the scope_id price chain that results in a price for the token"],"type":{"array":["u16",4]}},{"name":"twapChain","docs":["This is the scope_id price chain for the twap"],"type":{"array":["u16",4]}}]}},{"name":"SwitchboardConfiguration","type":{"kind":"struct","fields":[{"name":"priceAggregator","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"twapAggregator","type":"publicKey"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"name","docs":["UTF-8 encoded name of the token (null-terminated)"],"type":{"array":["u8",32]}},{"name":"heuristic","docs":["Heuristics limits of acceptable price"],"type":{"defined":"PriceHeuristic"}},{"name":"maxTwapDivergenceBps","docs":["Max divergence between twap and price in bps"],"type":"u64"},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"scopeConfiguration","docs":["Scope price configuration"],"type":{"defined":"ScopeConfiguration"}},{"name":"switchboardConfiguration","docs":["Switchboard configuration"],"type":{"defined":"SwitchboardConfiguration"}},{"name":"pythConfiguration","docs":["Pyth configuration"],"type":{"defined":"PythConfiguration"}},{"name":"blockPriceUsage","type":"u8"},{"name":"reserved","type":{"array":["u8",7]}},{"name":"padding","type":{"array":["u64",19]}}]}},{"name":"BorrowRateCurve","type":{"kind":"struct","fields":[{"name":"points","type":{"array":[{"defined":"CurvePoint"},11]}}]}},{"name":"CurvePoint","type":{"kind":"struct","fields":[{"name":"utilizationRateBps","type":"u32"},{"name":"borrowRateBps","type":"u32"}]}},{"name":"VaultConfigField","type":{"kind":"enum","variants":[{"name":"PerformanceFeeBps"},{"name":"ManagementFeeBps"},{"name":"MinDepositAmount"},{"name":"MinWithdrawAmount"},{"name":"MinInvestAmount"},{"name":"MinInvestDelaySlots"},{"name":"CrankFundFeePerReserve"},{"name":"PendingVaultAdmin"},{"name":"Name"},{"name":"LookupTable"},{"name":"Farm"},{"name":"AllocationAdmin"}]}},{"name":"VaultAllocation","type":{"kind":"struct","fields":[{"name":"reserve","type":"publicKey"},{"name":"ctokenVault","type":"publicKey"},{"name":"targetAllocationWeight","type":"u64"},{"name":"tokenAllocationCap","docs":["Maximum token invested in this reserve"],"type":"u64"},{"name":"ctokenVaultBump","type":"u64"},{"name":"configPadding","type":{"array":["u64",127]}},{"name":"ctokenAllocation","type":"u64"},{"name":"lastInvestSlot","type":"u64"},{"name":"tokenTargetAllocationSf","type":"u128"},{"name":"statePadding","type":{"array":["u64",128]}}]}}],"errors":[{"code":7000,"name":"DepositAmountsZero","msg":"DepositAmountsZero"},{"code":7001,"name":"SharesIssuedAmountDoesNotMatch","msg":"SharesIssuedAmountDoesNotMatch"},{"code":7002,"name":"MathOverflow","msg":"MathOverflow"},{"code":7003,"name":"IntegerOverflow","msg":"IntegerOverflow"},{"code":7004,"name":"WithdrawAmountBelowMinimum","msg":"Withdrawn amount is below minimum"},{"code":7005,"name":"TooMuchLiquidityToWithdraw","msg":"TooMuchLiquidityToWithdraw"},{"code":7006,"name":"ReserveAlreadyExists","msg":"ReserveAlreadyExists"},{"code":7007,"name":"ReserveNotPartOfAllocations","msg":"ReserveNotPartOfAllocations"},{"code":7008,"name":"CouldNotDeserializeAccountAsReserve","msg":"CouldNotDeserializeAccountAsReserve"},{"code":7009,"name":"ReserveNotProvidedInTheAccounts","msg":"ReserveNotProvidedInTheAccounts"},{"code":7010,"name":"ReserveAccountAndKeyMismatch","msg":"ReserveAccountAndKeyMismatch"},{"code":7011,"name":"OutOfRangeOfReserveIndex","msg":"OutOfRangeOfReserveIndex"},{"code":7012,"name":"CannotFindReserveInAllocations","msg":"OutOfRangeOfReserveIndex"},{"code":7013,"name":"InvestAmountBelowMinimum","msg":"Invested amount is below minimum"},{"code":7014,"name":"AdminAuthorityIncorrect","msg":"AdminAuthorityIncorrect"},{"code":7015,"name":"BaseVaultAuthorityIncorrect","msg":"BaseVaultAuthorityIncorrect"},{"code":7016,"name":"BaseVaultAuthorityBumpIncorrect","msg":"BaseVaultAuthorityBumpIncorrect"},{"code":7017,"name":"TokenMintIncorrect","msg":"TokenMintIncorrect"},{"code":7018,"name":"TokenMintDecimalsIncorrect","msg":"TokenMintDecimalsIncorrect"},{"code":7019,"name":"TokenVaultIncorrect","msg":"TokenVaultIncorrect"},{"code":7020,"name":"SharesMintDecimalsIncorrect","msg":"SharesMintDecimalsIncorrect"},{"code":7021,"name":"SharesMintIncorrect","msg":"SharesMintIncorrect"},{"code":7022,"name":"InitialAccountingIncorrect","msg":"InitialAccountingIncorrect"},{"code":7023,"name":"ReserveIsStale","msg":"Reserve is stale and must be refreshed before any operation"},{"code":7024,"name":"NotEnoughLiquidityDisinvestedToSendToUser","msg":"Not enough liquidity disinvested to send to user"},{"code":7025,"name":"BPSValueTooBig","msg":"BPS value is greater than 10000"},{"code":7026,"name":"DepositAmountBelowMinimum","msg":"Deposited amount is below minimum"},{"code":7027,"name":"ReserveSpaceExhausted","msg":"Vault have no space for new reserves"},{"code":7028,"name":"CannotWithdrawFromEmptyVault","msg":"Cannot withdraw from empty vault"},{"code":7029,"name":"TokensDepositedAmountDoesNotMatch","msg":"TokensDepositedAmountDoesNotMatch"},{"code":7030,"name":"AmountToWithdrawDoesNotMatch","msg":"Amount to withdraw does not match"},{"code":7031,"name":"LiquidityToWithdrawDoesNotMatch","msg":"Liquidity to withdraw does not match"},{"code":7032,"name":"UserReceivedAmountDoesNotMatch","msg":"User received amount does not match"},{"code":7033,"name":"SharesBurnedAmountDoesNotMatch","msg":"Shares burned amount does not match"},{"code":7034,"name":"DisinvestedLiquidityAmountDoesNotMatch","msg":"Disinvested liquidity amount does not match"},{"code":7035,"name":"SharesMintedAmountDoesNotMatch","msg":"SharesMintedAmountDoesNotMatch"},{"code":7036,"name":"AUMDecreasedAfterInvest","msg":"AUM decreased after invest"},{"code":7037,"name":"AUMBelowPendingFees","msg":"AUM is below pending fees"},{"code":7038,"name":"DepositAmountsZeroShares","msg":"Deposit amount results in 0 shares"},{"code":7039,"name":"WithdrawResultsInZeroShares","msg":"Withdraw amount results in 0 shares"},{"code":7040,"name":"CannotWithdrawZeroShares","msg":"Cannot withdraw zero shares"},{"code":7041,"name":"ManagementFeeGreaterThanMaxAllowed","msg":"Management fee is greater than maximum allowed"},{"code":7042,"name":"VaultAUMZero","msg":"Vault assets under management are empty"},{"code":7043,"name":"MissingReserveForBatchRefresh","msg":"Missing reserve for batch refresh"},{"code":7044,"name":"MinWithdrawAmountTooBig","msg":"Min withdraw amount is too big"},{"code":7045,"name":"InvestTooSoon","msg":"Invest is called too soon after last invest"},{"code":7046,"name":"WrongAdminOrAllocationAdmin","msg":"Wrong admin or allocation admin"}]} \ No newline at end of file diff --git a/idls/kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json b/idls/kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json new file mode 100644 index 0000000..b4bf03e --- /dev/null +++ b/idls/kamino_vault_v2.KvauGMspG5k6rtzrqqn7WNn3oZdyKqLKwK2XWQ8FLjd.json @@ -0,0 +1 @@ +{"version":"2.1.1","name":"kamino_vault","instructions":[{"name":"initVault","accounts":[{"name":"adminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseTokenMint","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"adminTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"updateReserveAllocation","accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserveWhitelistEntry","isMut":false,"isSigner":false,"isOptional":true},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"weight","type":"u64"},{"name":"cap","type":"u64"}]},{"name":"deposit","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"buy","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}]},{"name":"withdrawFromReserveAccounts","accounts":[{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"sell","accounts":[{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}]},{"name":"withdrawFromReserveAccounts","accounts":[{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"invest","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"payerTokenAccount","isMut":true,"isSigner":false},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarket","isMut":false,"isSigner":false},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"reserveWhitelistEntry","isMut":false,"isSigner":false,"isOptional":true},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateVaultConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"entry","type":{"defined":"VaultConfigField"}},{"name":"data","type":"bytes"}]},{"name":"withdrawPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":true,"isSigner":false},{"name":"tokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"lendingMarket","isMut":false,"isSigner":false,"docs":["CPI accounts"]},{"name":"lendingMarketAuthority","isMut":false,"isSigner":false},{"name":"reserveLiquiditySupply","isMut":true,"isSigner":false},{"name":"reserveCollateralMint","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"instructionSysvarAccount","isMut":false,"isSigner":false}],"args":[]},{"name":"updateAdmin","accounts":[{"name":"pendingAdmin","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false}],"args":[]},{"name":"giveUpPendingFees","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxAmountToGiveUp","type":"u64"}]},{"name":"initializeSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"sharesMint","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"updateSharesMetadata","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"sharesMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"withdrawFromAvailable","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"userTokenAta","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":true,"isSigner":false},{"name":"userSharesAta","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]},{"name":"removeAllocation","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false}],"args":[]},{"name":"initGlobalConfig","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false},{"name":"programData","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"updateGlobalConfig","accounts":[{"name":"globalAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[{"name":"update","type":{"defined":"UpdateGlobalConfigMode"}}]},{"name":"updateGlobalConfigAdmin","accounts":[{"name":"pendingAdmin","isMut":false,"isSigner":true},{"name":"globalConfig","isMut":true,"isSigner":false}],"args":[]},{"name":"addUpdateWhitelistedReserve","accounts":[{"name":"globalAdmin","isMut":true,"isSigner":true},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"reserve","isMut":false,"isSigner":false},{"name":"reserveWhitelistEntry","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"update","type":{"defined":"UpdateReserveWhitelistMode"}}]},{"name":"topupRewards","accounts":[{"name":"payer","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"payerTokenTa","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawRewards","accounts":[{"name":"vaultAdminAuthority","isMut":true,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"withdrawTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"redeemInKind","accounts":[{"name":"user","isMut":false,"isSigner":true},{"name":"vaultState","isMut":true,"isSigner":false},{"name":"globalConfig","isMut":false,"isSigner":false},{"name":"baseVaultAuthority","isMut":false,"isSigner":false},{"name":"reserve","isMut":true,"isSigner":false},{"name":"ctokenVault","isMut":true,"isSigner":false},{"name":"userCtokenTa","isMut":true,"isSigner":false},{"name":"ctokenMint","isMut":true,"isSigner":false},{"name":"userSharesTa","isMut":true,"isSigner":false},{"name":"sharesMint","isMut":true,"isSigner":false},{"name":"reserveCollateralTokenProgram","isMut":false,"isSigner":false},{"name":"sharesTokenProgram","isMut":false,"isSigner":false},{"name":"klendProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"sharesAmount","type":"u64"}]}],"accounts":[{"name":"Reserve","type":{"kind":"struct","fields":[{"name":"version","docs":["Version of the reserve"],"type":"u64"},{"name":"lastUpdate","docs":["Last slot when supply and rates updated"],"type":{"defined":"LastUpdate"}},{"name":"lendingMarket","docs":["Lending market address"],"type":"publicKey"},{"name":"farmCollateral","type":"publicKey"},{"name":"farmDebt","type":"publicKey"},{"name":"liquidity","docs":["Reserve liquidity"],"type":{"defined":"ReserveLiquidity"}},{"name":"reserveLiquidityPadding","type":{"array":["u64",150]}},{"name":"collateral","docs":["Reserve collateral"],"type":{"defined":"ReserveCollateral"}},{"name":"reserveCollateralPadding","type":{"array":["u64",150]}},{"name":"config","docs":["Reserve configuration values"],"type":{"defined":"ReserveConfig"}},{"name":"configPadding","type":{"array":["u64",116]}},{"name":"borrowedAmountOutsideElevationGroup","type":"u64"},{"name":"borrowedAmountsAgainstThisReserveInElevationGroups","docs":["Amount of token borrowed in lamport of debt asset in the given","elevation group when this reserve is part of the collaterals."],"type":{"array":["u64",32]}},{"name":"padding","type":{"array":["u64",207]}}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"globalAdmin","type":"publicKey"},{"name":"pendingAdmin","type":"publicKey"},{"name":"withdrawalPenaltyLamports","type":"u64"},{"name":"withdrawalPenaltyBps","type":"u64"},{"name":"padding","type":{"array":["u8",944]}}]}},{"name":"ReserveWhitelistEntry","type":{"kind":"struct","fields":[{"name":"tokenMint","docs":["The token mint is stored to solve the problem of finding all the whitelisted reserves for a particular token mint:","when storing the token mint inside the PDA, finding all the whitelisted reserves becomes a `getProgramAccounts` with","a filter on discriminator + the mint field","The reserve pubkey, as seed of the reserve whitelist PDA account, it stored so you can link back the PDA to its seeds","(for instance, in the operation above we easily find the reserve corresponding to the PDA)"],"type":"publicKey"},{"name":"reserve","type":"publicKey"},{"name":"whitelistAddAllocation","type":"u8"},{"name":"whitelistInvest","type":"u8"},{"name":"padding","type":{"array":["u8",62]}}]}},{"name":"VaultState","type":{"kind":"struct","fields":[{"name":"vaultAdminAuthority","type":"publicKey"},{"name":"baseVaultAuthority","type":"publicKey"},{"name":"baseVaultAuthorityBump","type":"u64"},{"name":"tokenMint","type":"publicKey"},{"name":"tokenMintDecimals","type":"u64"},{"name":"tokenVault","type":"publicKey"},{"name":"tokenProgram","type":"publicKey"},{"name":"sharesMint","type":"publicKey"},{"name":"sharesMintDecimals","type":"u64"},{"name":"tokenAvailable","type":"u64"},{"name":"sharesIssued","type":"u64"},{"name":"availableCrankFunds","type":"u64"},{"name":"unallocatedWeight","type":"u64"},{"name":"performanceFeeBps","type":"u64"},{"name":"managementFeeBps","type":"u64"},{"name":"lastFeeChargeTimestamp","type":"u64"},{"name":"prevAumSf","type":"u128"},{"name":"pendingFeesSf","type":"u128"},{"name":"vaultAllocationStrategy","type":{"array":[{"defined":"VaultAllocation"},25]}},{"name":"padding1","type":{"array":["u128",256]}},{"name":"minDepositAmount","type":"u64"},{"name":"minWithdrawAmount","type":"u64"},{"name":"minInvestAmount","type":"u64"},{"name":"minInvestDelaySlots","type":"u64"},{"name":"crankFundFeePerReserve","type":"u64"},{"name":"pendingAdmin","type":"publicKey"},{"name":"cumulativeEarnedInterestSf","type":"u128"},{"name":"cumulativeMgmtFeesSf","type":"u128"},{"name":"cumulativePerfFeesSf","type":"u128"},{"name":"name","type":{"array":["u8",40]}},{"name":"vaultLookupTable","type":"publicKey"},{"name":"vaultFarm","type":"publicKey"},{"name":"creationTimestamp","type":"u64"},{"name":"unallocatedTokensCap","type":"u64"},{"name":"allocationAdmin","type":"publicKey"},{"name":"withdrawalPenaltyLamports","type":"u64"},{"name":"withdrawalPenaltyBps","type":"u64"},{"name":"firstLossCapitalFarm","type":"publicKey"},{"name":"allowAllocationsInWhitelistedReservesOnly","type":"u8"},{"name":"allowInvestInWhitelistedReservesOnly","type":"u8"},{"name":"padding2","type":{"array":["u8",14]}},{"name":"rewardInfo","type":{"defined":"VaultRewardInfo"}},{"name":"padding3","type":{"array":["u128",232]}}]}}],"types":[{"name":"LastUpdate","docs":["Last update state"],"type":{"kind":"struct","fields":[{"name":"slot","docs":["Last slot when updated"],"type":"u64"},{"name":"stale","docs":["True when marked stale, false when slot updated"],"type":"u8"},{"name":"priceStatus","docs":["Status of the prices used to calculate the last update"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}}]}},{"name":"BigFractionBytes","type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u64",4]}},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"ReserveCollateral","docs":["Reserve collateral"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve collateral mint address"],"type":"publicKey"},{"name":"mintTotalSupply","docs":["Reserve collateral mint supply, used for exchange rate"],"type":"u64"},{"name":"supplyVault","docs":["Reserve collateral supply address"],"type":"publicKey"},{"name":"padding1","type":{"array":["u128",32]}},{"name":"padding2","type":{"array":["u128",32]}}]}},{"name":"ReserveConfig","docs":["Reserve configuration values"],"type":{"kind":"struct","fields":[{"name":"status","docs":["Status of the reserve Active/Obsolete/Hidden"],"type":"u8"},{"name":"assetTier","docs":["Asset tier -> 0 - regular (collateral & debt), 1 - isolated collateral, 2 - isolated debt"],"type":"u8"},{"name":"hostFixedInterestRateBps","docs":["Flat rate that goes to the host"],"type":"u16"},{"name":"minDeleveragingBonusBps","docs":["Starting bonus for deleveraging-related liquidations, in bps."],"type":"u16"},{"name":"blockCtokenUsage","docs":["Boolean flag to block minting/redeeming of ctokens","Blocks usage of ctokens (minting or withdrawing from obligation)","Effectively blocks deposit_reserve_liquidity and withdraw_obligation_collateral"],"type":"u8"},{"name":"reserved1","docs":["Past reserved space - feel free to reuse."],"type":{"array":["u8",6]}},{"name":"protocolOrderExecutionFeePct","docs":["Cut of the order execution bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"protocolTakeRatePct","docs":["Protocol take rate is the amount borrowed interest protocol receives, as a percentage"],"type":"u8"},{"name":"protocolLiquidationFeePct","docs":["Cut of the liquidation bonus that the protocol receives, as a percentage"],"type":"u8"},{"name":"loanToValuePct","docs":["Target ratio of the value of borrows to deposits, as a percentage","0 if use as collateral is disabled"],"type":"u8"},{"name":"liquidationThresholdPct","docs":["Loan to value ratio at which an obligation can be liquidated, as percentage"],"type":"u8"},{"name":"minLiquidationBonusBps","docs":["Minimum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"maxLiquidationBonusBps","docs":["Maximum bonus a liquidator receives when repaying part of an unhealthy obligation, as bps"],"type":"u16"},{"name":"badDebtLiquidationBonusBps","docs":["Bad debt liquidation bonus for an undercollateralized obligation, as bps"],"type":"u16"},{"name":"deleveragingMarginCallPeriodSecs","docs":["Time in seconds that must pass before redemptions are enabled after the deposit limit is","crossed.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"deleveragingThresholdDecreaseBpsPerDay","docs":["The rate at which the deleveraging threshold decreases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"},{"name":"fees","docs":["Program owner fees assessed, separate from gains due to interest accrual"],"type":{"defined":"ReserveFees"}},{"name":"borrowRateCurve","docs":["Borrow rate curve based on utilization"],"type":{"defined":"BorrowRateCurve"}},{"name":"borrowFactorPct","docs":["Borrow factor in percentage - used for risk adjustment"],"type":"u64"},{"name":"depositLimit","docs":["Maximum deposit limit of liquidity in native units, u64::MAX for inf"],"type":"u64"},{"name":"borrowLimit","docs":["Maximum amount borrowed, u64::MAX for inf, 0 to disable borrows (protected deposits)"],"type":"u64"},{"name":"tokenInfo","docs":["Token id from TokenInfos struct"],"type":{"defined":"TokenInfo"}},{"name":"depositWithdrawalCap","docs":["Deposit withdrawal caps - deposit & redeem"],"type":{"defined":"WithdrawalCaps"}},{"name":"debtWithdrawalCap","docs":["Debt withdrawal caps - borrow & repay"],"type":{"defined":"WithdrawalCaps"}},{"name":"elevationGroups","type":{"array":["u8",20]}},{"name":"disableUsageAsCollOutsideEmode","type":"u8"},{"name":"utilizationLimitBlockBorrowingAbovePct","docs":["Utilization (in percentage) above which borrowing is blocked. 0 to disable."],"type":"u8"},{"name":"autodeleverageEnabled","docs":["Whether this reserve should be subject to auto-deleveraging after deposit or borrow limit is","crossed.","Besides this flag, the lending market's flag also needs to be enabled (logical `AND`).","**NOTE:** the manual \"target LTV\" deleveraging (enabled by the risk council for individual","obligations) is NOT affected by this flag."],"type":"u8"},{"name":"proposerAuthorityLocked","docs":["Boolean flag indicating whether the reserve is locked for the proposer authority.","","Once the proposer have finished preparing the reserve, it must be locked to prevent","further changes to the reserve configuration allowing review and voting on the proposal","without alteration during the voting period."],"type":"u8"},{"name":"borrowLimitOutsideElevationGroup","docs":["Maximum amount liquidity of this reserve borrowed outside all elevation groups","- u64::MAX for inf","- 0 to disable borrows outside elevation groups"],"type":"u64"},{"name":"borrowLimitAgainstThisCollateralInElevationGroup","docs":["Defines the maximum amount (in lamports of elevation group debt asset)","that can be borrowed when this reserve is used as collateral.","- u64::MAX for inf","- 0 to disable borrows in this elevation group (expected value for the debt asset)"],"type":{"array":["u64",32]}},{"name":"deleveragingBonusIncreaseBpsPerDay","docs":["The rate at which the deleveraging-related liquidation bonus increases, in bps per day.","Only relevant when `autodeleverage_enabled == 1`, and must not be 0 in such case."],"type":"u64"}]}},{"name":"ReserveFees","docs":["Additional fee information on a reserve","","These exist separately from interest accrual fees, and are specifically for the program owner","and referral fee. The fees are paid out as a percentage of liquidity token amounts during","repayments and liquidations."],"type":{"kind":"struct","fields":[{"name":"originationFeeSf","docs":["Fee assessed on `BorrowObligationLiquidity`, as scaled fraction (60 bits fractional part)","Must be between `0` and `2^60`, such that `2^60 = 1`. A few examples for","clarity:","1% = (1 << 60) / 100 = 11529215046068470","0.01% (1 basis point) = 115292150460685","0.00001% (Aave origination fee) = 115292150461"],"type":"u64"},{"name":"flashLoanFeeSf","docs":["Fee for flash loan, expressed as scaled fraction.","0.3% (Aave flash loan fee) = 0.003 * 2^60 = 3458764513820541"],"type":"u64"},{"name":"padding","docs":["Used for allignment"],"type":{"array":["u8",8]}}]}},{"name":"ReserveLiquidity","docs":["Reserve liquidity"],"type":{"kind":"struct","fields":[{"name":"mintPubkey","docs":["Reserve liquidity mint address"],"type":"publicKey"},{"name":"supplyVault","docs":["Reserve liquidity supply address"],"type":"publicKey"},{"name":"feeVault","docs":["Reserve liquidity fee collection address"],"type":"publicKey"},{"name":"availableAmount","docs":["Reserve liquidity available"],"type":"u64"},{"name":"borrowedAmountSf","docs":["Reserve liquidity borrowed (scaled fraction)"],"type":"u128"},{"name":"marketPriceSf","docs":["Reserve liquidity market price in quote currency (scaled fraction)"],"type":"u128"},{"name":"marketPriceLastUpdatedTs","docs":["Unix timestamp of the market price (from the oracle)"],"type":"u64"},{"name":"mintDecimals","docs":["Reserve liquidity mint decimals"],"type":"u64"},{"name":"depositLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the liquidity amount is above the deposit cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"borrowLimitCrossedTimestamp","docs":["Timestamp when the last refresh reserve detected that the borrowed amount is above the borrow cap. When this threshold is crossed, then redemptions (auto-deleverage) are enabled.","If the threshold is not crossed, then the timestamp is set to 0"],"type":"u64"},{"name":"cumulativeBorrowRateBsf","docs":["Reserve liquidity cumulative borrow rate (scaled fraction)"],"type":{"defined":"BigFractionBytes"}},{"name":"accumulatedProtocolFeesSf","docs":["Reserve cumulative protocol fees (scaled fraction)"],"type":"u128"},{"name":"accumulatedReferrerFeesSf","docs":["Reserve cumulative referrer fees (scaled fraction)"],"type":"u128"},{"name":"pendingReferrerFeesSf","docs":["Reserve pending referrer fees, to be claimed in refresh_obligation by referrer or protocol (scaled fraction)"],"type":"u128"},{"name":"absoluteReferralRateSf","docs":["Reserve referrer fee absolute rate calculated at each refresh_reserve operation (scaled fraction)"],"type":"u128"},{"name":"tokenProgram","docs":["Token program of the liquidity mint"],"type":"publicKey"},{"name":"padding2","type":{"array":["u64",51]}},{"name":"padding3","type":{"array":["u128",32]}}]}},{"name":"WithdrawalCaps","docs":["Reserve Withdrawal Caps State"],"type":{"kind":"struct","fields":[{"name":"configCapacity","type":"i64"},{"name":"currentTotal","type":"i64"},{"name":"lastIntervalStartTimestamp","type":"u64"},{"name":"configIntervalLengthSeconds","type":"u64"}]}},{"name":"PriceHeuristic","type":{"kind":"struct","fields":[{"name":"lower","docs":["Lower value of acceptable price"],"type":"u64"},{"name":"upper","docs":["Upper value of acceptable price"],"type":"u64"},{"name":"exp","docs":["Number of decimals of the previously defined values"],"type":"u64"}]}},{"name":"PythConfiguration","type":{"kind":"struct","fields":[{"name":"price","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"}]}},{"name":"ScopeConfiguration","type":{"kind":"struct","fields":[{"name":"priceFeed","docs":["Pubkey of the scope price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"priceChain","docs":["This is the scope_id price chain that results in a price for the token"],"type":{"array":["u16",4]}},{"name":"twapChain","docs":["This is the scope_id price chain for the twap"],"type":{"array":["u16",4]}}]}},{"name":"SwitchboardConfiguration","type":{"kind":"struct","fields":[{"name":"priceAggregator","docs":["Pubkey of the base price feed (disabled if `null` or `default`)"],"type":"publicKey"},{"name":"twapAggregator","type":"publicKey"}]}},{"name":"TokenInfo","type":{"kind":"struct","fields":[{"name":"name","docs":["UTF-8 encoded name of the token (null-terminated)"],"type":{"array":["u8",32]}},{"name":"heuristic","docs":["Heuristics limits of acceptable price"],"type":{"defined":"PriceHeuristic"}},{"name":"maxTwapDivergenceBps","docs":["Max divergence between twap and price in bps"],"type":"u64"},{"name":"maxAgePriceSeconds","type":"u64"},{"name":"maxAgeTwapSeconds","type":"u64"},{"name":"scopeConfiguration","docs":["Scope price configuration"],"type":{"defined":"ScopeConfiguration"}},{"name":"switchboardConfiguration","docs":["Switchboard configuration"],"type":{"defined":"SwitchboardConfiguration"}},{"name":"pythConfiguration","docs":["Pyth configuration"],"type":{"defined":"PythConfiguration"}},{"name":"blockPriceUsage","type":"u8"},{"name":"reserved","type":{"array":["u8",7]}},{"name":"padding","type":{"array":["u64",19]}}]}},{"name":"BorrowRateCurve","type":{"kind":"struct","fields":[{"name":"points","type":{"array":[{"defined":"CurvePoint"},11]}}]}},{"name":"CurvePoint","type":{"kind":"struct","fields":[{"name":"utilizationRateBps","type":"u32"},{"name":"borrowRateBps","type":"u32"}]}},{"name":"UpdateReserveWhitelistMode","type":{"kind":"enum","variants":[{"name":"Invest","fields":["u8"]},{"name":"AddAllocation","fields":["u8"]}]}},{"name":"VaultConfigField","type":{"kind":"enum","variants":[{"name":"PerformanceFeeBps"},{"name":"ManagementFeeBps"},{"name":"MinDepositAmount"},{"name":"MinWithdrawAmount"},{"name":"MinInvestAmount"},{"name":"MinInvestDelaySlots"},{"name":"CrankFundFeePerReserve"},{"name":"PendingVaultAdmin"},{"name":"Name"},{"name":"LookupTable"},{"name":"Farm"},{"name":"AllocationAdmin"},{"name":"UnallocatedWeight"},{"name":"UnallocatedTokensCap"},{"name":"WithdrawalPenaltyLamports"},{"name":"WithdrawalPenaltyBps"},{"name":"FirstLossCapitalFarm"},{"name":"AllowAllocationsInWhitelistedReservesOnly"},{"name":"AllowInvestInWhitelistedReservesOnly"},{"name":"RewardPerSecond"}]}},{"name":"VaultAllocation","type":{"kind":"struct","fields":[{"name":"reserve","type":"publicKey"},{"name":"ctokenVault","type":"publicKey"},{"name":"targetAllocationWeight","type":"u64"},{"name":"tokenAllocationCap","docs":["Maximum token invested in this reserve"],"type":"u64"},{"name":"ctokenVaultBump","type":"u64"},{"name":"configPadding","type":{"array":["u64",127]}},{"name":"ctokenAllocation","type":"u64"},{"name":"lastInvestSlot","type":"u64"},{"name":"tokenTargetAllocationSf","type":"u128"},{"name":"statePadding","type":{"array":["u64",128]}}]}},{"name":"VaultRewardInfo","type":{"kind":"struct","fields":[{"name":"rewardPerSecond","type":"u64"},{"name":"lastIssuanceTs","type":"u64"},{"name":"rewardsAvailable","docs":["Rewards available to distribute (topped up but not yet moved to vault.token_available)"],"type":"u64"},{"name":"cumulativeRewardsDistributedAnalytics","type":"u64"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"UpdateGlobalConfigMode","type":{"kind":"enum","variants":[{"name":"PendingAdmin","fields":["publicKey"]},{"name":"MinWithdrawalPenaltyLamports","fields":["u64"]},{"name":"MinWithdrawalPenaltyBPS","fields":["u64"]}]}}],"events":[{"name":"DepositResultEvent","fields":[{"name":"sharesToMint","type":"u64","index":false},{"name":"tokenToDeposit","type":"u64","index":false},{"name":"crankFundsToDeposit","type":"u64","index":false}]},{"name":"DepositUserAtaBalanceEvent","fields":[{"name":"userAtaBalance","type":"u64","index":false}]},{"name":"RedeemInKindResultEvent","fields":[{"name":"sharesToBurn","type":"u64","index":false},{"name":"ctokensToSendToUser","type":"u64","index":false}]},{"name":"SharesToWithdrawEvent","fields":[{"name":"sharesAmount","type":"u64","index":false},{"name":"userSharesBefore","type":"u64","index":false}]},{"name":"WithdrawResultEvent","fields":[{"name":"sharesToBurn","type":"u64","index":false},{"name":"availableToSendToUser","type":"u64","index":false},{"name":"investedToDisinvestCtokens","type":"u64","index":false},{"name":"investedLiquidityToSendToUser","type":"u64","index":false}]}],"errors":[{"code":7000,"name":"DepositAmountsZero","msg":"Cannot deposit zero tokens"},{"code":7001,"name":"SharesIssuedAmountDoesNotMatch","msg":"Post check failed on share issued"},{"code":7002,"name":"MathOverflow","msg":"Math operation overflowed"},{"code":7003,"name":"IntegerOverflow","msg":"Integer conversion overflowed"},{"code":7004,"name":"WithdrawAmountBelowMinimum","msg":"Withdrawn amount is below minimum"},{"code":7005,"name":"TooMuchLiquidityToWithdraw","msg":"TooMuchLiquidityToWithdraw"},{"code":7006,"name":"ReserveAlreadyExists","msg":"ReserveAlreadyExists"},{"code":7007,"name":"ReserveNotPartOfAllocations","msg":"ReserveNotPartOfAllocations"},{"code":7008,"name":"CouldNotDeserializeAccountAsReserve","msg":"CouldNotDeserializeAccountAsReserve"},{"code":7009,"name":"ReserveNotProvidedInTheAccounts","msg":"ReserveNotProvidedInTheAccounts"},{"code":7010,"name":"ReserveAccountAndKeyMismatch","msg":"ReserveAccountAndKeyMismatch"},{"code":7011,"name":"OutOfRangeOfReserveIndex","msg":"OutOfRangeOfReserveIndex"},{"code":7012,"name":"CannotFindReserveInAllocations","msg":"OutOfRangeOfReserveIndex"},{"code":7013,"name":"InvestAmountBelowMinimum","msg":"Invested amount is below minimum"},{"code":7014,"name":"AdminAuthorityIncorrect","msg":"AdminAuthorityIncorrect"},{"code":7015,"name":"BaseVaultAuthorityIncorrect","msg":"BaseVaultAuthorityIncorrect"},{"code":7016,"name":"BaseVaultAuthorityBumpIncorrect","msg":"BaseVaultAuthorityBumpIncorrect"},{"code":7017,"name":"TokenMintIncorrect","msg":"TokenMintIncorrect"},{"code":7018,"name":"TokenMintDecimalsIncorrect","msg":"TokenMintDecimalsIncorrect"},{"code":7019,"name":"TokenVaultIncorrect","msg":"TokenVaultIncorrect"},{"code":7020,"name":"SharesMintDecimalsIncorrect","msg":"SharesMintDecimalsIncorrect"},{"code":7021,"name":"SharesMintIncorrect","msg":"SharesMintIncorrect"},{"code":7022,"name":"InitialAccountingIncorrect","msg":"InitialAccountingIncorrect"},{"code":7023,"name":"ReserveIsStale","msg":"Reserve is stale and must be refreshed before any operation"},{"code":7024,"name":"NotEnoughLiquidityDisinvestedToSendToUser","msg":"Not enough liquidity disinvested to send to user"},{"code":7025,"name":"BPSValueTooBig","msg":"BPS value is greater than 10000"},{"code":7026,"name":"DepositAmountBelowMinimum","msg":"Deposited amount is below minimum"},{"code":7027,"name":"ReserveSpaceExhausted","msg":"Vault have no space for new reserves"},{"code":7028,"name":"CannotWithdrawFromEmptyVault","msg":"Cannot withdraw from empty vault"},{"code":7029,"name":"TokensDepositedAmountDoesNotMatch","msg":"TokensDepositedAmountDoesNotMatch"},{"code":7030,"name":"AmountToWithdrawDoesNotMatch","msg":"Amount to withdraw does not match"},{"code":7031,"name":"LiquidityToWithdrawDoesNotMatch","msg":"Liquidity to withdraw does not match"},{"code":7032,"name":"UserReceivedAmountDoesNotMatch","msg":"User received amount does not match"},{"code":7033,"name":"SharesBurnedAmountDoesNotMatch","msg":"Shares burned amount does not match"},{"code":7034,"name":"DisinvestedLiquidityAmountDoesNotMatch","msg":"Disinvested liquidity amount does not match"},{"code":7035,"name":"SharesMintedAmountDoesNotMatch","msg":"SharesMintedAmountDoesNotMatch"},{"code":7036,"name":"AUMDecreasedAfterInvest","msg":"AUM decreased after invest"},{"code":7037,"name":"AUMBelowPendingFees","msg":"AUM is below pending fees"},{"code":7038,"name":"DepositAmountsZeroShares","msg":"Deposit amount results in 0 shares"},{"code":7039,"name":"WithdrawResultsInZeroShares","msg":"Withdraw amount results in 0 shares"},{"code":7040,"name":"CannotWithdrawZeroShares","msg":"Cannot withdraw zero shares"},{"code":7041,"name":"ManagementFeeGreaterThanMaxAllowed","msg":"Management fee is greater than maximum allowed"},{"code":7042,"name":"VaultAUMZero","msg":"Vault assets under management are empty"},{"code":7043,"name":"MissingReserveForBatchRefresh","msg":"Missing reserve for batch refresh"},{"code":7044,"name":"MinWithdrawAmountTooBig","msg":"Min withdraw amount is too big"},{"code":7045,"name":"InvestTooSoon","msg":"Invest is called too soon after last invest"},{"code":7046,"name":"WrongAdminOrAllocationAdmin","msg":"Wrong admin or allocation admin"},{"code":7047,"name":"ReserveHasNonZeroAllocationOrCTokens","msg":"Reserve has non-zero allocation or ctokens so cannot be removed"},{"code":7048,"name":"DepositAmountGreaterThanRequestedAmount","msg":"Deposit amount is greater than requested amount"},{"code":7049,"name":"WithdrawAmountLessThanWithdrawalPenalty","msg":"Withdraw amount is less than withdrawal penalty"},{"code":7050,"name":"CannotWithdrawZeroLamports","msg":"Cannot withdraw 0 lamports"},{"code":7051,"name":"NoUpgradeAuthority","msg":"Cannot initialize global config because there is no upgrade authority to the program"},{"code":7052,"name":"WithdrawalFeeBPSGreaterThanMaxAllowed","msg":"Withdrawal fee BPS is greater than maximum allowed"},{"code":7053,"name":"WithdrawalFeeLamportsGreaterThanMaxAllowed","msg":"Withdrawal fee lamports is greater than maximum allowed"},{"code":7054,"name":"ReserveNotWhitelisted","msg":"Reserve is not whitelisted"},{"code":7055,"name":"InvalidBoolLikeValue","msg":"Invalid bool-like value passed in (should be 0 or 1)"},{"code":7056,"name":"AUMDecreasedMoreThanExpected","msg":"AUM decreased more than expected during redeem in kind"},{"code":7057,"name":"RewardTopupAmountZero","msg":"Reward topup amount is zero"},{"code":7058,"name":"RewardTopupAmountNotExpected","msg":"Reward topup is not as expected after transfer"},{"code":7059,"name":"RewardWithdrawAmountZero","msg":"Reward withdraw amount is zero"},{"code":7060,"name":"RewardWithdrawAmountNotExpected","msg":"Reward withdraw is not as expected after transfer"},{"code":7061,"name":"RewardsStaleForFeeUpdate","msg":"Rewards are stale - must be refreshed before updating fees"}]} \ No newline at end of file diff --git a/idls/layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json b/idls/layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json new file mode 100644 index 0000000..acbb23a --- /dev/null +++ b/idls/layerzero_endpoint.76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"endpoint","instructions":[{"name":"initEndpoint","docs":["--------------------------- Admin Instructions ---------------------------"],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitEndpointParams"}}]},{"name":"transferAdmin","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"TransferAdminParams"}}]},{"name":"setLzToken","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetLzTokenParams"}}]},{"name":"registerLibrary","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"messageLibInfo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RegisterLibraryParams"}}]},{"name":"initDefaultSendLibrary","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitDefaultSendLibraryParams"}}]},{"name":"setDefaultSendLibrary","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDefaultSendLibraryParams"}}]},{"name":"initDefaultReceiveLibrary","accounts":[{"name":"admin","isMut":true,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitDefaultReceiveLibraryParams"}}]},{"name":"setDefaultReceiveLibrary","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDefaultReceiveLibraryParams"}}]},{"name":"setDefaultReceiveLibraryTimeout","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDefaultReceiveLibraryTimeoutParams"}}]},{"name":"withdrawRent","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"receiver","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawRentParams"}}]},{"name":"registerOapp","docs":["--------------------------- OApp Instructions ---------------------------"],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"oapp","isMut":false,"isSigner":true,"docs":["The PDA of the OApp"]},{"name":"oappRegistry","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"RegisterOAppParams"}}]},{"name":"initNonce","accounts":[{"name":"delegate","isMut":true,"isSigner":true,"docs":["only the delegate can initialize the nonce accounts"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitNonceParams"}}]},{"name":"initSendLibrary","accounts":[{"name":"delegate","isMut":true,"isSigner":true,"docs":["only the delegate can initialize the send_library_config"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitSendLibraryParams"}}]},{"name":"setSendLibrary","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"isOptional":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetSendLibraryParams"}}]},{"name":"initReceiveLibrary","accounts":[{"name":"delegate","isMut":true,"isSigner":true,"docs":["only the delegate can initialize the send_library_config"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"receiveLibraryConfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitReceiveLibraryParams"}}]},{"name":"setReceiveLibrary","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"receiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"isOptional":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetReceiveLibraryParams"}}]},{"name":"setReceiveLibraryTimeout","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"receiveLibraryConfig","isMut":true,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetReceiveLibraryTimeoutParams"}}]},{"name":"initConfig","accounts":[{"name":"delegate","isMut":false,"isSigner":true,"docs":["only the delegate can initialize the config accounts"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the message lib when the endpoint calls the message lib program."]},{"name":"messageLib","isMut":false,"isSigner":false,"docs":["the pda of the message_lib_program"]},{"name":"messageLibProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitConfigParams"}}]},{"name":"setConfig","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"messageLibInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the message lib when the endpoint calls the message lib program"]},{"name":"messageLib","isMut":false,"isSigner":false,"docs":["the pda of the message_lib_program"]},{"name":"messageLibProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetConfigParams"}}]},{"name":"quote","accounts":[{"name":"sendLibraryProgram","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":false,"isSigner":false},{"name":"sendLibraryInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the send library when the endpoint calls the send library."]},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"nonce","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"QuoteParams"}}],"returns":{"defined":"MessagingFee"}},{"name":"send","accounts":[{"name":"sender","isMut":false,"isSigner":true},{"name":"sendLibraryProgram","isMut":false,"isSigner":false},{"name":"sendLibraryConfig","isMut":false,"isSigner":false},{"name":"defaultSendLibraryConfig","isMut":false,"isSigner":false},{"name":"sendLibraryInfo","isMut":false,"isSigner":false,"docs":["The PDA signer to the send library when the endpoint calls the send library."]},{"name":"endpoint","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SendParams"}}],"returns":{"defined":"MessagingReceipt"}},{"name":"initVerify","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitVerifyParams"}}]},{"name":"verify","accounts":[{"name":"receiveLibrary","isMut":false,"isSigner":true,"docs":["The PDA of the receive library."]},{"name":"receiveLibraryConfig","isMut":false,"isSigner":false},{"name":"defaultReceiveLibraryConfig","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"VerifyParams"}}]},{"name":"skip","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false,"docs":["the payload hash needs to be initialized before it can be skipped and closed, in order to prevent someone","from skipping a payload hash that has been initialized and can be re-verified and executed after skipping"]},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SkipParams"}}]},{"name":"burn","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false,"docs":["close the account and return the lamports to endpoint settings account"]},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"BurnParams"}}]},{"name":"nilify","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":true,"isSigner":false},{"name":"pendingInboundNonce","isMut":true,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"NilifyParams"}}]},{"name":"clear","accounts":[{"name":"signer","isMut":false,"isSigner":true,"docs":["The PDA of the OApp or delegate"]},{"name":"oappRegistry","isMut":false,"isSigner":false},{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":true,"isSigner":false,"docs":["close the account and return the lamports to endpoint settings account"]},{"name":"endpoint","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ClearParams"}}],"returns":{"array":["u8",32]}},{"name":"sendCompose","accounts":[{"name":"from","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"composeMessage","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SendComposeParams"}}]},{"name":"clearCompose","accounts":[{"name":"to","isMut":false,"isSigner":true},{"name":"composeMessage","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ClearComposeParams"}}]},{"name":"setDelegate","accounts":[{"name":"oapp","isMut":false,"isSigner":true,"docs":["The PDA of the OApp"]},{"name":"oappRegistry","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SetDelegateParams"}}]},{"name":"lzReceiveAlert","accounts":[{"name":"executor","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LzReceiveAlertParams"}}]},{"name":"lzComposeAlert","accounts":[{"name":"executor","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"LzComposeAlertParams"}}]}],"accounts":[{"name":"ComposeMessageState","type":{"kind":"struct","fields":[{"name":"received","type":"bool"},{"name":"bump","type":"u8"}]}},{"name":"EndpointSettings","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"bump","type":"u8"},{"name":"admin","type":"publicKey"},{"name":"lzTokenMint","type":{"option":"publicKey"}}]}},{"name":"OAppRegistry","type":{"kind":"struct","fields":[{"name":"delegate","type":"publicKey"},{"name":"bump","type":"u8"}]}},{"name":"MessageLibInfo","type":{"kind":"struct","fields":[{"name":"messageLibType","type":{"defined":"MessageLibType"}},{"name":"bump","type":"u8"},{"name":"messageLibBump","type":"u8"}]}},{"name":"ReceiveLibraryConfig","type":{"kind":"struct","fields":[{"name":"messageLib","type":"publicKey"},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}}},{"name":"bump","type":"u8"}]}},{"name":"SendLibraryConfig","docs":["the reason for not using Option::None to indicate default is to respect the spec on evm"],"type":{"kind":"struct","fields":[{"name":"messageLib","type":"publicKey"},{"name":"bump","type":"u8"}]}},{"name":"Nonce","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"outboundNonce","type":"u64"},{"name":"inboundNonce","type":"u64"}]}},{"name":"PayloadHash","type":{"kind":"struct","fields":[{"name":"hash","type":{"array":["u8",32]}},{"name":"bump","type":"u8"}]}},{"name":"PendingInboundNonce","type":{"kind":"struct","fields":[{"name":"nonces","type":{"vec":"u64"}},{"name":"bump","type":"u8"}]}}],"types":[{"name":"InitDefaultReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"InitDefaultSendLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"InitEndpointParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"admin","type":"publicKey"}]}},{"name":"RegisterLibraryParams","type":{"kind":"struct","fields":[{"name":"libProgram","type":"publicKey"},{"name":"libType","type":{"defined":"MessageLibType"}}]}},{"name":"SetDefaultReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"},{"name":"gracePeriod","type":"u64"}]}},{"name":"SetDefaultReceiveLibraryTimeoutParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"lib","type":"publicKey"},{"name":"expiry","type":"u64"}]}},{"name":"SetDefaultSendLibraryParams","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"SetLzTokenParams","type":{"kind":"struct","fields":[{"name":"lzToken","type":{"option":"publicKey"}}]}},{"name":"TransferAdminParams","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"}]}},{"name":"WithdrawRentParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"InitVerifyParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"}]}},{"name":"LzComposeAlertParams","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"LzReceiveAlertParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"BurnParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"ClearParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"message","type":"bytes"}]}},{"name":"ClearComposeParams","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"}]}},{"name":"InitNonceParams","type":{"kind":"struct","fields":[{"name":"localOapp","type":"publicKey"},{"name":"remoteEid","type":"u32"},{"name":"remoteOapp","type":{"array":["u8",32]}}]}},{"name":"InitReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"}]}},{"name":"InitSendLibraryParams","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"eid","type":"u32"}]}},{"name":"NilifyParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"QuoteParams","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"dstEid","type":"u32"},{"name":"receiver","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"options","type":"bytes"},{"name":"payInLzToken","type":"bool"}]}},{"name":"RegisterOAppParams","type":{"kind":"struct","fields":[{"name":"delegate","type":"publicKey"}]}},{"name":"SendParams","type":{"kind":"struct","fields":[{"name":"dstEid","type":"u32"},{"name":"receiver","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"options","type":"bytes"},{"name":"nativeFee","type":"u64"},{"name":"lzTokenFee","type":"u64"}]}},{"name":"SendComposeParams","type":{"kind":"struct","fields":[{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"}]}},{"name":"SetDelegateParams","type":{"kind":"struct","fields":[{"name":"delegate","type":"publicKey"}]}},{"name":"SetReceiveLibraryParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"},{"name":"gracePeriod","type":"u64"}]}},{"name":"SetReceiveLibraryTimeoutParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"lib","type":"publicKey"},{"name":"expiry","type":"u64"}]}},{"name":"SetSendLibraryParams","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"SkipParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"}]}},{"name":"VerifyParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"ReceiveLibraryTimeout","type":{"kind":"struct","fields":[{"name":"messageLib","type":"publicKey"},{"name":"expiry","type":"u64"}]}},{"name":"InitConfigParams","type":{"kind":"struct","fields":[{"name":"oapp","type":"publicKey"},{"name":"eid","type":"u32"}]}},{"name":"MessageLibType","type":{"kind":"enum","variants":[{"name":"Send"},{"name":"Receive"},{"name":"SendAndReceive"}]}},{"name":"MessagingFee","type":{"kind":"struct","fields":[{"name":"nativeFee","type":"u64"},{"name":"lzTokenFee","type":"u64"}]}},{"name":"MessagingReceipt","type":{"kind":"struct","fields":[{"name":"guid","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"fee","type":{"defined":"MessagingFee"}}]}},{"name":"SetConfigParams","type":{"kind":"struct","fields":[{"name":"oapp","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"configType","type":"u32"},{"name":"config","type":"bytes"}]}},{"name":"AdminTransferredEvent","type":{"kind":"struct","fields":[{"name":"newAdmin","type":"publicKey"}]}},{"name":"ComposeDeliveredEvent","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"}]}},{"name":"ComposeSentEvent","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"}]}},{"name":"DefaultReceiveLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"DefaultReceiveLibraryTimeoutSetEvent","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}}}]}},{"name":"DefaultSendLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"DelegateSetEvent","type":{"kind":"struct","fields":[{"name":"newDelegate","type":"publicKey"}]}},{"name":"InboundNonceSkippedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"}]}},{"name":"LibraryRegisteredEvent","type":{"kind":"struct","fields":[{"name":"newLib","type":"publicKey"},{"name":"newLibProgram","type":"publicKey"}]}},{"name":"LzComposeAlertEvent","type":{"kind":"struct","fields":[{"name":"executor","type":"publicKey"},{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"LzReceiveAlertEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"executor","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"},{"name":"reason","type":"bytes"}]}},{"name":"LzTokenSetEvent","type":{"kind":"struct","fields":[{"name":"token","type":{"option":"publicKey"}}]}},{"name":"OAppRegisteredEvent","type":{"kind":"struct","fields":[{"name":"oapp","type":"publicKey"},{"name":"delegate","type":"publicKey"}]}},{"name":"PacketBurntEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"PacketDeliveredEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"}]}},{"name":"PacketNilifiedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"PacketSentEvent","type":{"kind":"struct","fields":[{"name":"encodedPacket","type":"bytes"},{"name":"options","type":"bytes"},{"name":"sendLibrary","type":"publicKey"}]}},{"name":"PacketVerifiedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"receiver","type":"publicKey"},{"name":"nonce","type":"u64"},{"name":"payloadHash","type":{"array":["u8",32]}}]}},{"name":"ReceiveLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}},{"name":"ReceiveLibraryTimeoutSetEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}}}]}},{"name":"RentWithdrawnEvent","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"amount","type":"u64"}]}},{"name":"SendLibrarySetEvent","type":{"kind":"struct","fields":[{"name":"sender","type":"publicKey"},{"name":"eid","type":"u32"},{"name":"newLib","type":"publicKey"}]}}],"events":[{"name":"AdminTransferredEvent","fields":[{"name":"newAdmin","type":"publicKey","index":false}]},{"name":"ComposeDeliveredEvent","fields":[{"name":"from","type":"publicKey","index":false},{"name":"to","type":"publicKey","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"index","type":"u16","index":false}]},{"name":"ComposeSentEvent","fields":[{"name":"from","type":"publicKey","index":false},{"name":"to","type":"publicKey","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"index","type":"u16","index":false},{"name":"message","type":"bytes","index":false}]},{"name":"DefaultReceiveLibrarySetEvent","fields":[{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]},{"name":"DefaultReceiveLibraryTimeoutSetEvent","fields":[{"name":"eid","type":"u32","index":false},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}},"index":false}]},{"name":"DefaultSendLibrarySetEvent","fields":[{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]},{"name":"DelegateSetEvent","fields":[{"name":"newDelegate","type":"publicKey","index":false}]},{"name":"InboundNonceSkippedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false}]},{"name":"LibraryRegisteredEvent","fields":[{"name":"newLib","type":"publicKey","index":false},{"name":"newLibProgram","type":"publicKey","index":false}]},{"name":"LzComposeAlertEvent","fields":[{"name":"executor","type":"publicKey","index":false},{"name":"from","type":"publicKey","index":false},{"name":"to","type":"publicKey","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"index","type":"u16","index":false},{"name":"computeUnits","type":"u64","index":false},{"name":"value","type":"u64","index":false},{"name":"message","type":"bytes","index":false},{"name":"extraData","type":"bytes","index":false},{"name":"reason","type":"bytes","index":false}]},{"name":"LzReceiveAlertEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"executor","type":"publicKey","index":false},{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"nonce","type":"u64","index":false},{"name":"guid","type":{"array":["u8",32]},"index":false},{"name":"computeUnits","type":"u64","index":false},{"name":"value","type":"u64","index":false},{"name":"message","type":"bytes","index":false},{"name":"extraData","type":"bytes","index":false},{"name":"reason","type":"bytes","index":false}]},{"name":"LzTokenSetEvent","fields":[{"name":"token","type":{"option":"publicKey"},"index":false}]},{"name":"OAppRegisteredEvent","fields":[{"name":"oapp","type":"publicKey","index":false},{"name":"delegate","type":"publicKey","index":false}]},{"name":"PacketBurntEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"payloadHash","type":{"array":["u8",32]},"index":false}]},{"name":"PacketDeliveredEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false}]},{"name":"PacketNilifiedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"payloadHash","type":{"array":["u8",32]},"index":false}]},{"name":"PacketSentEvent","fields":[{"name":"encodedPacket","type":"bytes","index":false},{"name":"options","type":"bytes","index":false},{"name":"sendLibrary","type":"publicKey","index":false}]},{"name":"PacketVerifiedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"receiver","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"payloadHash","type":{"array":["u8",32]},"index":false}]},{"name":"ReceiveLibrarySetEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]},{"name":"ReceiveLibraryTimeoutSetEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"eid","type":"u32","index":false},{"name":"timeout","type":{"option":{"defined":"ReceiveLibraryTimeout"}},"index":false}]},{"name":"RentWithdrawnEvent","fields":[{"name":"receiver","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"SendLibrarySetEvent","fields":[{"name":"sender","type":"publicKey","index":false},{"name":"eid","type":"u32","index":false},{"name":"newLib","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"InvalidSendLibrary"},{"code":6001,"name":"InvalidReceiveLibrary"},{"code":6002,"name":"SameValue"},{"code":6003,"name":"AccountNotFound"},{"code":6004,"name":"OnlySendLib"},{"code":6005,"name":"OnlyReceiveLib"},{"code":6006,"name":"InvalidExpiry"},{"code":6007,"name":"OnlyNonDefaultLib"},{"code":6008,"name":"InvalidAmount"},{"code":6009,"name":"InvalidNonce"},{"code":6010,"name":"Unauthorized"},{"code":6011,"name":"PayloadHashNotFound"},{"code":6012,"name":"ComposeNotFound"},{"code":6013,"name":"InvalidPayloadHash"},{"code":6014,"name":"LzTokenUnavailable"},{"code":6015,"name":"ReadOnlyAccount"},{"code":6016,"name":"InvalidMessageLib"},{"code":6017,"name":"WritableAccountNotAllowed"}]} \ No newline at end of file diff --git a/idls/layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json b/idls/layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json new file mode 100644 index 0000000..02f889a --- /dev/null +++ b/idls/layerzero_executor.6doghB248px58JSSwG4qejQ46kFMW4AMj7vzJnWZHNZn.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"executor","instructions":[{"name":"initExecutor","docs":["--------------------------- Owner Instructions ---------------------------"],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"config","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitExecutorParams"}}]},{"name":"ownerSetConfig","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"config","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"OwnerSetConfigParams"}}]},{"name":"adminSetConfig","docs":["--------------------------- Admin Instructions ---------------------------"],"accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"config","isMut":true,"isSigner":false}],"args":[{"name":"params","type":{"defined":"AdminSetConfigParams"}}]},{"name":"nativeDrop","accounts":[{"name":"executor","isMut":true,"isSigner":true},{"name":"config","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["For native drop transfer"]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"NativeDropParams"}}]},{"name":"execute","accounts":[{"name":"executor","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"endpointProgram","isMut":false,"isSigner":false},{"name":"endpointEventAuthority","isMut":false,"isSigner":false,"docs":["The authority for the endpoint program to emit events"]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ExecuteParams"}}]},{"name":"compose","accounts":[{"name":"executor","isMut":true,"isSigner":true},{"name":"config","isMut":false,"isSigner":false},{"name":"endpointProgram","isMut":false,"isSigner":false},{"name":"endpointEventAuthority","isMut":false,"isSigner":false,"docs":["The authority for the endpoint program to emit events"]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ComposeParams"}}]},{"name":"quoteExecutor","docs":["--------------------------- MsgLib Instructions ---------------------------"],"accounts":[{"name":"executorConfig","isMut":false,"isSigner":false},{"name":"priceFeedProgram","isMut":false,"isSigner":false},{"name":"priceFeedConfig","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"QuoteExecutorParams"}}],"returns":"u64"},{"name":"executable","accounts":[{"name":"nonce","isMut":false,"isSigner":false},{"name":"payloadHash","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ExecutableParams"}}],"returns":{"defined":"ExecutionState"}}],"accounts":[{"name":"Nonce","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"outboundNonce","type":"u64"},{"name":"inboundNonce","type":"u64"}]}},{"name":"ExecutorConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"owner","type":"publicKey"},{"name":"acl","type":{"defined":"Acl"}},{"name":"admins","type":{"vec":"publicKey"}},{"name":"executors","type":{"vec":"publicKey"}},{"name":"msglibs","type":{"vec":"publicKey"}},{"name":"paused","type":"bool"},{"name":"defaultMultiplierBps","type":"u16"},{"name":"priceFeed","type":"publicKey"},{"name":"dstConfigs","type":{"vec":{"defined":"DstConfig"}}}]}}],"types":[{"name":"AdminSetConfigParams","type":{"kind":"enum","variants":[{"name":"PriceFeed","fields":["publicKey"]},{"name":"DefaultMultiplierBps","fields":["u16"]},{"name":"DstConfigs","fields":[{"vec":{"defined":"DstConfig"}}]}]}},{"name":"ComposeParams","type":{"kind":"struct","fields":[{"name":"lzCompose","type":{"defined":"LzComposeParams"}},{"name":"computeUnits","type":"u64"},{"name":"value","type":"u64"}]}},{"name":"ExecutableParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"}]}},{"name":"ExecutionState","type":{"kind":"enum","variants":[{"name":"NotExecutable"},{"name":"VerifiedButNotExecutable"},{"name":"Executable"},{"name":"Executed"}]}},{"name":"ExecuteParams","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"lzReceive","type":{"defined":"LzReceiveParams"}},{"name":"value","type":"u64"},{"name":"computeUnits","type":"u64"}]}},{"name":"InitExecutorParams","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"admins","type":{"vec":"publicKey"}},{"name":"executors","type":{"vec":"publicKey"}},{"name":"msglibs","type":{"vec":"publicKey"}},{"name":"priceFeed","type":"publicKey"}]}},{"name":"NativeDropParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"dstEid","type":"u32"},{"name":"oapp","type":"publicKey"},{"name":"nativeDropRequests","type":{"vec":{"defined":"NativeDropRequest"}}}]}},{"name":"NativeDropRequest","type":{"kind":"struct","fields":[{"name":"receiver","type":"publicKey"},{"name":"amount","type":"u64"}]}},{"name":"OwnerSetConfigParams","type":{"kind":"enum","variants":[{"name":"Admins","fields":[{"vec":"publicKey"}]},{"name":"Executors","fields":[{"vec":"publicKey"}]},{"name":"Msglibs","fields":[{"vec":"publicKey"}]},{"name":"Owner","fields":["publicKey"]},{"name":"Paused","fields":["bool"]},{"name":"Allowlist","fields":[{"vec":"publicKey"}]},{"name":"Denylist","fields":[{"vec":"publicKey"}]}]}},{"name":"DstConfig","type":{"kind":"struct","fields":[{"name":"eid","type":"u32"},{"name":"lzReceiveBaseGas","type":"u32"},{"name":"lzComposeBaseGas","type":"u32"},{"name":"multiplierBps","type":{"option":"u16"}},{"name":"floorMarginUsd","type":{"option":"u128"}},{"name":"nativeDropCap","type":"u128"}]}},{"name":"LzComposeParams","type":{"kind":"struct","fields":[{"name":"from","type":"publicKey"},{"name":"to","type":"publicKey"},{"name":"guid","type":{"array":["u8",32]}},{"name":"index","type":"u16"},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"}]}},{"name":"LzReceiveParams","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"extraData","type":"bytes"}]}},{"name":"LzOption","type":{"kind":"struct","fields":[{"name":"optionType","type":"u8"},{"name":"params","type":"bytes"}]}},{"name":"QuoteExecutorParams","type":{"kind":"struct","fields":[{"name":"msglib","type":"publicKey"},{"name":"dstEid","type":"u32"},{"name":"sender","type":"publicKey"},{"name":"calldataSize","type":"u64"},{"name":"options","type":{"vec":{"defined":"LzOption"}}}]}},{"name":"Acl","type":{"kind":"struct","fields":[{"name":"allowList","type":{"vec":"publicKey"}},{"name":"denyList","type":{"vec":"publicKey"}}]}},{"name":"NativeDropAppliedEvent","type":{"kind":"struct","fields":[{"name":"srcEid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"dstEid","type":"u32"},{"name":"oapp","type":"publicKey"},{"name":"nativeDropRequests","type":{"vec":{"defined":"NativeDropRequest"}}},{"name":"successes","type":{"vec":"bool"}}]}}],"events":[{"name":"NativeDropAppliedEvent","fields":[{"name":"srcEid","type":"u32","index":false},{"name":"sender","type":{"array":["u8",32]},"index":false},{"name":"nonce","type":"u64","index":false},{"name":"dstEid","type":"u32","index":false},{"name":"oapp","type":"publicKey","index":false},{"name":"nativeDropRequests","type":{"vec":{"defined":"NativeDropRequest"}},"index":false},{"name":"successes","type":{"vec":"bool"},"index":false}]}],"errors":[{"code":6000,"name":"InvalidSize"},{"code":6001,"name":"Paused"},{"code":6002,"name":"UnsupportedOptionType"},{"code":6003,"name":"ZeroLzComposeGasProvided"},{"code":6004,"name":"ZeroLzReceiveGasProvided"},{"code":6005,"name":"NativeAmountExceedsCap"},{"code":6006,"name":"NotAdmin"},{"code":6007,"name":"NotExecutor"},{"code":6008,"name":"MsgLibNotAllowed"},{"code":6009,"name":"TooManyAdmins"},{"code":6010,"name":"TooManyExecutors"},{"code":6011,"name":"TooManyOptionTypes"},{"code":6012,"name":"InvalidNativeDropRequestsLength"},{"code":6013,"name":"InvalidNativeDropReceiver"},{"code":6014,"name":"InsufficientBalance"},{"code":6015,"name":"EidNotSupported"},{"code":6016,"name":"ExecutorIsAdmin"},{"code":6017,"name":"InvalidOwner"}]} \ No newline at end of file diff --git a/idls/lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json b/idls/lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json new file mode 100644 index 0000000..9d181e7 --- /dev/null +++ b/idls/lifinity_amm_v2.2wT8Yq49kHgDzXuPxZSaeLaH1qbmGXtEyPy64bL7aD3c.json @@ -0,0 +1 @@ +{"version":"0.1.1","name":"lifinity_amm_v2","instructions":[{"name":"swap","accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"amm","isMut":true,"isSigner":false},{"name":"userTransferAuthority","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"destinationInfo","isMut":true,"isSigner":false},{"name":"swapSource","isMut":true,"isSigner":false},{"name":"swapDestination","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"feeAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"oracleMainAccount","isMut":false,"isSigner":false},{"name":"oracleSubAccount","isMut":false,"isSigner":false},{"name":"oraclePcAccount","isMut":false,"isSigner":false}],"args":[{"name":"amountIn","type":"u64"},{"name":"minimumAmountOut","type":"u64"}]},{"name":"depositAllTokenTypes","accounts":[{"name":"amm","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthorityInfo","isMut":false,"isSigner":true},{"name":"sourceAInfo","isMut":true,"isSigner":false},{"name":"sourceBInfo","isMut":true,"isSigner":false},{"name":"tokenA","isMut":true,"isSigner":false},{"name":"tokenB","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"destination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"maximumTokenAAmount","type":"u64"},{"name":"maximumTokenBAmount","type":"u64"}]},{"name":"withdrawAllTokenTypes","accounts":[{"name":"amm","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"userTransferAuthorityInfo","isMut":false,"isSigner":true},{"name":"sourceInfo","isMut":true,"isSigner":false},{"name":"tokenA","isMut":true,"isSigner":false},{"name":"tokenB","isMut":true,"isSigner":false},{"name":"poolMint","isMut":true,"isSigner":false},{"name":"destTokenAInfo","isMut":true,"isSigner":false},{"name":"destTokenBInfo","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"minimumTokenAAmount","type":"u64"},{"name":"minimumTokenBAmount","type":"u64"}]}],"accounts":[{"name":"Amm","type":{"kind":"struct","fields":[{"name":"initializerKey","type":"publicKey"},{"name":"initializerDepositTokenAccount","type":"publicKey"},{"name":"initializerReceiveTokenAccount","type":"publicKey"},{"name":"initializerAmount","type":"u64"},{"name":"takerAmount","type":"u64"},{"name":"isInitialized","docs":["Is the swap initialized, with data written to it"],"type":"bool"},{"name":"bumpSeed","docs":["Bump seed used to generate the program address / authority"],"type":"u8"},{"name":"freezeTrade","docs":["Freeze swap"],"type":"u8"},{"name":"freezeDeposit","docs":["Freeze deposit"],"type":"u8"},{"name":"freezeWithdraw","docs":["Freeze withdraw"],"type":"u8"},{"name":"baseDecimals","docs":["Base decimals account"],"type":"u8"},{"name":"tokenProgramId","docs":["Token program ID associated with the swap"],"type":"publicKey"},{"name":"tokenAAccount","docs":["Address of token A liquidity account"],"type":"publicKey"},{"name":"tokenBAccount","docs":["Address of token B liquidity account"],"type":"publicKey"},{"name":"poolMint","docs":["Address of pool token mint"],"type":"publicKey"},{"name":"tokenAMint","docs":["Address of token A mint"],"type":"publicKey"},{"name":"tokenBMint","docs":["Address of token B mint"],"type":"publicKey"},{"name":"feeAccount","docs":["Address of pool fee account"],"type":"publicKey"},{"name":"oracleMainAccount","docs":["Oracle Main account"],"type":"publicKey"},{"name":"oracleSubAccount","docs":["Oracle Sub account"],"type":"publicKey"},{"name":"oraclePcAccount","docs":["oracle Pc account"],"type":"publicKey"},{"name":"fees","docs":["Fees associated with swap"],"type":{"defined":"AmmFees"}},{"name":"curve","docs":["Curve associated with swap"],"type":{"defined":"AmmCurve"}},{"name":"config","docs":["Curve associated with swap"],"type":{"defined":"AmmConfig"}},{"name":"ammPTemp1","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp2","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp3","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp4","docs":["Temp area"],"type":"publicKey"},{"name":"ammPTemp5","docs":["Temp area"],"type":"publicKey"}]}}],"types":[{"name":"AmmFees","docs":["Encapsulates all fee information and calculations for swap operations"],"type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","type":"u64"},{"name":"tradeFeeDenominator","type":"u64"},{"name":"ownerTradeFeeNumerator","type":"u64"},{"name":"ownerTradeFeeDenominator","type":"u64"},{"name":"ownerWithdrawFeeNumerator","type":"u64"},{"name":"ownerWithdrawFeeDenominator","type":"u64"},{"name":"hostFeeNumerator","type":"u64"},{"name":"hostFeeDenominator","type":"u64"}]}},{"name":"AmmCurve","type":{"kind":"struct","fields":[{"name":"curveType","type":"u8"},{"name":"curveParameters","type":"u64"}]}},{"name":"AmmConfig","type":{"kind":"struct","fields":[{"name":"lastPrice","type":"u64"},{"name":"lastBalancedPrice","type":"u64"},{"name":"configDenominator","type":"u64"},{"name":"volumeX","type":"u64"},{"name":"volumeY","type":"u64"},{"name":"volumeXInY","type":"u64"},{"name":"depositCap","type":"u64"},{"name":"regressionTarget","type":"u64"},{"name":"oracleType","type":"u64"},{"name":"oracleStatus","type":"u64"},{"name":"oracleMainSlotLimit","type":"u64"},{"name":"oracleSubConfidenceLimit","type":"u64"},{"name":"oracleSubSlotLimit","type":"u64"},{"name":"oraclePcConfidenceLimit","type":"u64"},{"name":"oraclePcSlotLimit","type":"u64"},{"name":"stdSpread","type":"u64"},{"name":"stdSpreadBuffer","type":"u64"},{"name":"spreadCoefficient","type":"u64"},{"name":"priceBufferCoin","type":"i64"},{"name":"priceBufferPc","type":"i64"},{"name":"rebalanceRatio","type":"u64"},{"name":"feeTrade","type":"u64"},{"name":"feePlatform","type":"u64"},{"name":"oracleMainSlotBuffer","type":"u64"},{"name":"configTemp4","type":"u64"},{"name":"configTemp5","type":"u64"},{"name":"configTemp6","type":"u64"},{"name":"configTemp7","type":"u64"},{"name":"configTemp8","type":"u64"}]}},{"name":"CurveType","docs":["Curve types supported by the token-swap program."],"type":{"kind":"enum","variants":[{"name":"Standard"},{"name":"ConstantProduct"}]}}],"errors":[{"code":6000,"name":"AlreadyInUse","msg":"Swap account already in use"},{"code":6001,"name":"InvalidProgramAddress","msg":"Invalid program address generated from bump seed and key"},{"code":6002,"name":"InvalidOwner","msg":"Input account owner is not the program address"},{"code":6003,"name":"InvalidOutputOwner","msg":"Output pool account owner cannot be the program address"},{"code":6004,"name":"ExpectedMint","msg":"Deserialized account is not an SPL Token mint"},{"code":6005,"name":"ExpectedAccount","msg":"Deserialized account is not an SPL Token account"},{"code":6006,"name":"EmptySupply","msg":"Input token account empty"},{"code":6007,"name":"InvalidSupply","msg":"Pool token mint has a non-zero supply"},{"code":6008,"name":"InvalidDelegate","msg":"Token account has a delegate"},{"code":6009,"name":"InvalidInput","msg":"InvalidInput"},{"code":6010,"name":"IncorrectSwapAccount","msg":"Address of the provided swap token account is incorrect"},{"code":6011,"name":"IncorrectPoolMint","msg":"Address of the provided pool token mint is incorrect"},{"code":6012,"name":"InvalidOutput","msg":"InvalidOutput"},{"code":6013,"name":"CalculationFailure","msg":"General calculation failure due to overflow or underflow"},{"code":6014,"name":"InvalidInstruction","msg":"Invalid instruction"},{"code":6015,"name":"RepeatedMint","msg":"Swap input token accounts have the same mint"},{"code":6016,"name":"ExceededSlippage","msg":"Swap instruction exceeds desired slippage limit"},{"code":6017,"name":"InvalidCloseAuthority","msg":"Token account has a close authority"},{"code":6018,"name":"InvalidFreezeAuthority","msg":"Pool token mint has a freeze authority"},{"code":6019,"name":"IncorrectFeeAccount","msg":"Pool fee token account incorrect"},{"code":6020,"name":"ZeroTradingTokens","msg":"Given pool token amount results in zero trading tokens"},{"code":6021,"name":"FeeCalculationFailure","msg":"Fee calculation failed due to overflow, underflow, or unexpected 0"},{"code":6022,"name":"ConversionFailure","msg":"Conversion to u64 failed with an overflow or underflow"},{"code":6023,"name":"InvalidFee","msg":"The provided fee does not match the program owner's constraints"},{"code":6024,"name":"IncorrectTokenProgramId","msg":"The provided token program does not match the token program expected by the swap"},{"code":6025,"name":"IncorrectOracleAccount","msg":"Address of the provided oracle account is incorrect"},{"code":6026,"name":"IncorrectConfigAccount","msg":"Address of the provided config account is incorrect"},{"code":6027,"name":"UnsupportedCurveType","msg":"The provided curve type is not supported by the program owner"},{"code":6028,"name":"InvalidCurve","msg":"The provided curve parameters are invalid"},{"code":6029,"name":"UnsupportedCurveOperation","msg":"The operation cannot be performed on the given curve"},{"code":6030,"name":"InvalidPythStatus","msg":"Pyth oracle status is not 'trading'"},{"code":6031,"name":"InvalidPythPrice","msg":"Could not retrieve updated price feed from the Pyth oracle"},{"code":6032,"name":"IncorrectSigner","msg":"Address of the provided signer account is incorrect"},{"code":6033,"name":"ExceedPoolBalance","msg":"Swap amount exceeds pool balance"},{"code":6034,"name":"ProgramIsFrozen","msg":"Program is frozen"},{"code":6035,"name":"OracleConfidence","msg":"Oracle confidence is too high"},{"code":6036,"name":"OverCapAmount","msg":"Over Pool Cap Amount"},{"code":6037,"name":"InvalidUpdateAccount","msg":"Invalid update wallet address"},{"code":6038,"name":"InvalidUpdateParam","msg":"Invalid update param"},{"code":6039,"name":"InvalidInnerSwapAccount","msg":"Invalid inner swap account"},{"code":6040,"name":"ExceptionErr","msg":"Exception err"}]} \ No newline at end of file diff --git a/idls/marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json b/idls/marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json new file mode 100644 index 0000000..c829799 --- /dev/null +++ b/idls/marginfi_v2.MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA.json @@ -0,0 +1 @@ +{"address":"MFv2hWf31Z9kbCa1snEPYctwafyhdvnV7FZnsebVacA","metadata":{"name":"marginfi","version":"0.1.8","spec":"0.1.0","description":"Borrow Lending Prime Broker"},"instructions":[{"name":"config_group_fee","docs":["(global fee admin only) Enable or disable program fees for any group. Does not require the","group admin to sign: the global fee state admin can turn program fees on or off for any","group"],"discriminator":[231,205,66,242,220,87,145,38],"accounts":[{"name":"marginfi_group","writable":true},{"name":"global_fee_admin","docs":["`global_fee_admin` of the FeeState"],"signer":true,"relations":["fee_state"]},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[{"name":"enable_program_fee","type":"bool"}]},{"name":"configure_bank_rate_limits","docs":["(admin or delegate_limit_admin) Configure bank-level rate limits for withdraw/borrow.","Rate limits track net outflow in native tokens. Deposits offset withdraws.","Set to 0 to disable. Hourly and daily windows are independent."],"discriminator":[175,84,85,221,206,220,110,174],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true},{"name":"bank","writable":true}],"args":[{"name":"hourly_max_outflow","type":{"option":"u64"}},{"name":"daily_max_outflow","type":{"option":"u64"}}]},{"name":"configure_deleverage_withdrawal_limit","docs":["(admin or delegate_limit_admin) Set the daily withdrawal limit for deleverages per group."],"discriminator":[28,132,205,158,67,77,177,63],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true}],"args":[{"name":"limit","type":"u32"}]},{"name":"configure_group_rate_limits","docs":["(admin or delegate_limit_admin) Configure group-level rate limits for withdraw/borrow.","Rate limits track aggregate net outflow in USD.","Example: $10M = 10_000_000. Set to 0 to disable."],"discriminator":[111,47,213,142,158,51,226,102],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true}],"args":[{"name":"hourly_max_outflow_usd","type":{"option":"u64"}},{"name":"daily_max_outflow_usd","type":{"option":"u64"}}]},{"name":"drift_deposit","docs":["(user) Deposit into a Drift spot market through a marginfi account","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[252,63,250,201,98,55,130,12],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"drift_oracle","docs":["The oracle account for the asset (not needed if using oracle type QuoteAsset)"],"optional":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Drift user account"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit tokens into Drift"],"writable":true,"relations":["bank"]},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit"],"writable":true},{"name":"drift_state","docs":["The Drift state account"]},{"name":"integration_acc_2","docs":["The Drift user account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["The Drift user stats account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_1","docs":["The Drift spot market for this asset"],"writable":true,"relations":["bank"]},{"name":"drift_spot_market_vault","docs":["The Drift spot market vault that will receive tokens"],"writable":true},{"name":"mint","docs":["Bank's liquidity token mint"],"relations":["bank"]},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"drift_harvest_reward","docs":["(permissionless) Harvest rewards from admin deposits in Drift spot markets.","Rewards are always sent to the global fee wallet's canonical ATA.","The harvest spot market must be different from the bank's main drift spot market."],"discriminator":[167,161,240,194,138,54,87,189],"accounts":[{"name":"bank"},{"name":"fee_state","docs":["Global fee state that contains the global_fee_wallet"],"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"intermediary_token_account","docs":["To create this manually just send some of the reward token","to the liquidity vault authority address before claiming"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"liquidity_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"reward_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"destination_token_account","docs":["Destination token account must be owned by the global fee wallet"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"reward_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"drift_state","docs":["Drift accounts"]},{"name":"integration_acc_2","writable":true,"relations":["bank"]},{"name":"integration_acc_3","writable":true,"relations":["bank"]},{"name":"harvest_drift_spot_market","docs":["The harvest spot market - MUST be different from bank's Drift spot market (integration_acc_1)","This is the market that contains admin deposits to harvest"],"writable":true},{"name":"harvest_drift_spot_market_vault","docs":["The harvest spot market vault - derived from harvest_drift_spot_market"],"writable":true},{"name":"drift_signer","docs":["The Drift signer PDA"]},{"name":"reward_mint"},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"}],"args":[]},{"name":"drift_init_user","docs":["(permissionless) Initialize a Drift user and user stats for a marginfi bank","Creates user with sub_account_id = 0 and empty name","Requires a minimum deposit to ensure the account remains active","* amount - minimum deposit amount (at least 10 units) in native decimals"],"discriminator":[29,18,236,190,29,254,114,169],"accounts":[{"name":"fee_payer","docs":["Pays to init the drift user and user stats accounts and provides initial deposit"],"writable":true,"signer":true},{"name":"signer_token_account","docs":["The fee payer must provide a nominal amount of bank tokens so the account is not empty.","This amount is irrecoverable and will prevent the account from being closed."],"writable":true},{"name":"bank"},{"name":"liquidity_vault_authority","docs":["The liquidity vault authority (PDA that will own the Drift user)"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit a nominal amount of token into Drift."],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["The user stats account to be created"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,115,116,97,116,115]},{"kind":"account","path":"liquidity_vault_authority"}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}},"relations":["bank"]},{"name":"integration_acc_2","docs":["The user account to be created (sub_account_id = 0)"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114]},{"kind":"account","path":"liquidity_vault_authority"},{"kind":"const","value":[0,0]}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}},"relations":["bank"]},{"name":"drift_state","writable":true},{"name":"integration_acc_1","writable":true,"relations":["bank"]},{"name":"drift_spot_market_vault","docs":["The Drift spot market vault where tokens will be deposited"],"writable":true},{"name":"drift_oracle","docs":["Oracle for the asset (can be null for USDC/market 0)"],"optional":true},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"drift_withdraw","docs":["(user) Withdraw from a Drift spot market through a marginfi account","* amount - in the underlying token (e.g., USDC), in native decimals","* withdraw_all - if true, withdraws entire position"],"discriminator":[86,59,186,123,183,181,234,137],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"drift_oracle","docs":["The oracle account for the asset (not needed if using oracle type QuoteAsset)"],"optional":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Drift user account"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Receives tokens from Drift withdrawal"],"writable":true,"relations":["bank"]},{"name":"destination_token_account","docs":["Token account that will receive the withdrawn tokens"],"writable":true},{"name":"drift_state","docs":["The Drift state account"]},{"name":"integration_acc_2","docs":["The Drift user account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["The Drift user stats account owned by liquidity_vault_authority"],"writable":true,"relations":["bank"]},{"name":"integration_acc_1","docs":["The Drift spot market for this asset"],"writable":true,"relations":["bank"]},{"name":"drift_spot_market_vault","docs":["The Drift spot market vault that holds tokens"],"writable":true},{"name":"drift_reward_oracle","docs":["Optional: Oracle for first reward asset (only needed if rewards exist)"],"optional":true},{"name":"drift_reward_spot_market","docs":["Optional: Spot market for first reward asset (only needed if rewards exist)"],"optional":true},{"name":"drift_reward_mint","docs":["Optional: Mint for first reward asset (only needed if rewards exist)"],"optional":true},{"name":"drift_reward_oracle_2","docs":["Optional: Oracle for second reward asset (backup in case multiple rewards)"],"optional":true},{"name":"drift_reward_spot_market_2","docs":["Optional: Spot market for second reward asset (backup in case multiple rewards)"],"optional":true},{"name":"drift_reward_mint_2","docs":["Optional: Mint for second reward asset (backup in case multiple rewards)"],"optional":true},{"name":"drift_signer","docs":["The Drift signer PDA"]},{"name":"mint","docs":["Bank's liquidity token mint"],"relations":["bank"]},{"name":"drift_program","address":"dRiftyHA39MWEi3m9aunc5MzRF1JYuBsbn6VPcn33UH"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"edit_global_fee_state","docs":["(global fee admin only) Adjust fees, admin, or the destination wallet"],"discriminator":[52,62,35,129,93,69,165,202],"accounts":[{"name":"global_fee_admin","docs":["Admin of the global FeeState"],"signer":true,"relations":["fee_state"]},{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[{"name":"admin","type":"pubkey"},{"name":"fee_wallet","type":"pubkey"},{"name":"bank_init_flat_sol_fee","type":"u32"},{"name":"liquidation_flat_sol_fee","type":"u32"},{"name":"order_init_flat_sol_fee","type":"u32"},{"name":"program_fee_fixed","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_max_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"order_execution_max_fee","type":{"defined":{"name":"WrappedI80F48"}}}]},{"name":"edit_staked_settings","docs":["(admin only) Edit the staked collateral settings for the group."],"discriminator":[11,108,215,87,240,9,66,241],"accounts":[{"name":"marginfi_group","relations":["staked_settings"]},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"staked_settings","writable":true}],"args":[{"name":"settings","type":{"defined":{"name":"StakedSettingsEditConfig"}}}]},{"name":"end_deleverage","docs":["(risk_admin only) End forced deleverage. Validates health did not worsen."],"discriminator":[114,14,250,143,252,104,214,209],"accounts":[{"name":"marginfi_account","writable":true},{"name":"liquidation_record","writable":true,"relations":["marginfi_account"]},{"name":"group","relations":["marginfi_account"]},{"name":"risk_admin","signer":true,"relations":["group"]}],"args":[]},{"name":"end_liquidation","docs":["(liquidation_receiver, set in start_liquidation) End receivership liquidation. Validates","health improved and seized assets are within fee limits. Charges a flat SOL fee."],"discriminator":[110,11,244,54,229,181,22,184],"accounts":[{"name":"marginfi_account","docs":["Account under liquidation"],"writable":true},{"name":"liquidation_record","docs":["The associated liquidation record PDA for the given `marginfi_account`"],"writable":true,"relations":["marginfi_account"]},{"name":"liquidation_receiver","writable":true,"signer":true,"relations":["liquidation_record"]},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"init_bank_metadata","docs":["(permissionless) pay the rent to open a bank's metadata."],"discriminator":[94,239,50,136,137,204,254,213],"accounts":[{"name":"bank"},{"name":"fee_payer","docs":["Pays the init fee"],"writable":true,"signer":true},{"name":"metadata","docs":["Note: unique per-bank."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"bank"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"init_global_fee_state","docs":["(Runs once per program) Configures the fee state account, where the global admin sets fees","that are assessed to the protocol"],"discriminator":[82,48,247,59,220,109,231,44],"accounts":[{"name":"payer","docs":["Pays the init fee"],"writable":true,"signer":true},{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"admin","type":"pubkey"},{"name":"fee_wallet","type":"pubkey"},{"name":"bank_init_flat_sol_fee","type":"u32"},{"name":"liquidation_flat_sol_fee","type":"u32"},{"name":"order_init_flat_sol_fee","type":"u32"},{"name":"program_fee_fixed","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_max_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"order_execution_max_fee","type":{"defined":{"name":"WrappedI80F48"}}}]},{"name":"init_staked_settings","docs":["(group admin only) Init the Staked Settings account, which is used to create staked","collateral banks, and must run before any staked collateral bank can be created with","`add_pool_permissionless`. Running this ix effectively opts the group into the staked","collateral feature."],"discriminator":[52,35,149,44,69,86,69,80],"accounts":[{"name":"marginfi_group"},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","docs":["Pays the init fee"],"writable":true,"signer":true},{"name":"staked_settings","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,100,95,115,101,116,116,105,110,103,115]},{"kind":"account","path":"marginfi_group"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"settings","type":{"defined":{"name":"StakedSettingsConfig"}}}]},{"name":"juplend_deposit","docs":["(user) Deposit into a JupLend lending pool through a marginfi account.","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[114,11,218,81,183,165,143,255],"accounts":[{"name":"group","writable":true,"relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit."],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority PDA (acts as signer for JupLend CPIs).","NOTE: JupLend marks the signer as writable in their deposit instruction."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Bank liquidity vault (holds underlying mint and is used as depositor_token_account)."],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Underlying mint."],"relations":["bank"]},{"name":"integration_acc_1","docs":["JupLend lending state account."],"writable":true,"relations":["bank"]},{"name":"f_token_mint","docs":["JupLend fToken mint."],"writable":true,"relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["Bank's fToken vault (validated via has_one on bank)."],"writable":true,"relations":["bank"]},{"name":"lending_admin"},{"name":"supply_token_reserves_liquidity","writable":true},{"name":"lending_supply_position_on_liquidity","writable":true},{"name":"rate_model"},{"name":"vault","writable":true},{"name":"liquidity","writable":true},{"name":"liquidity_program"},{"name":"rewards_rate_model"},{"name":"juplend_program","address":"jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"juplend_init_position","docs":["(permissionless) Initialize the bank-level JupLend position.","","This creates the bank's fToken ATA (owned by the bank liquidity vault authority) and","performs a nominal seed deposit into JupLend, then flips the bank from `Paused` to","`Operational`."],"discriminator":[176,255,151,106,5,207,74,215],"accounts":[{"name":"fee_payer","docs":["Provides a nominal deposit amount."],"writable":true,"signer":true},{"name":"signer_token_account","docs":["Token account owned by the fee payer holding the underlying mint."],"writable":true},{"name":"bank","writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority PDA (acts as signer for JupLend CPIs)."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Bank liquidity vault (holds underlying mint and is used as depositor_token_account)."],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Underlying mint (must match bank mint and JupLend lending state mint)."],"relations":["bank"]},{"name":"integration_acc_1","docs":["JupLend lending state account."],"writable":true,"relations":["bank"]},{"name":"f_token_mint","docs":["JupLend fToken mint."],"writable":true,"relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["Bank's fToken vault (validated via has_one on bank)."],"writable":true,"relations":["bank"]},{"name":"lending_admin"},{"name":"supply_token_reserves_liquidity","writable":true},{"name":"lending_supply_position_on_liquidity","writable":true},{"name":"rate_model"},{"name":"vault","writable":true},{"name":"liquidity","writable":true},{"name":"liquidity_program"},{"name":"rewards_rate_model"},{"name":"juplend_program","address":"jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"juplend_withdraw","docs":["(user) Withdraw from a JupLend lending pool through a marginfi account.","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[245,164,253,202,53,77,251,221],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","docs":["Token account that will receive the underlying withdrawal.","WARN: Completely unchecked!"],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority PDA (acts as signer for JupLend CPIs).","NOTE: JupLend marks the signer as writable in their withdraw instruction."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"mint","docs":["Underlying mint."],"relations":["bank"]},{"name":"integration_acc_1","docs":["JupLend lending state account."],"writable":true,"relations":["bank"]},{"name":"f_token_mint","docs":["JupLend fToken mint."],"writable":true,"relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["Bank's fToken vault (validated via has_one on bank)."],"writable":true,"relations":["bank"]},{"name":"integration_acc_3","docs":["Withdraw intermediary ATA (authority = liquidity_vault_authority).","This must be an ATA to satisfy JupLend's withdraw constraints."],"writable":true,"relations":["bank"]},{"name":"lending_admin"},{"name":"supply_token_reserves_liquidity","writable":true},{"name":"lending_supply_position_on_liquidity","writable":true},{"name":"rate_model"},{"name":"vault","writable":true},{"name":"claim_account","docs":["JupLend claim account for liquidity_vault_authority.","TEMPORARY: Mainnet currently requires this account (passing None causes ConstraintMut errors),","but an upcoming upgrade is expected to make it truly optional. The account is never actually","validated or used - you can pass any mutable account. We create the canonical PDA for consistency.","Seeds: [\"user_claim\", liquidity_vault_authority, mint] on Liquidity program."],"writable":true},{"name":"liquidity","writable":true},{"name":"liquidity_program"},{"name":"rewards_rate_model"},{"name":"juplend_program","address":"jup3YeL8QhtSx1e253b2FDvsMNC87fDrgQZivbrndc9"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"kamino_deposit","docs":["(user) Deposit into a Kamino pool through a marginfi account","* amount - in the liquidity token (e.g. if there is a Kamino USDC bank, pass the amount of","USDC desired), in native decimals."],"discriminator":[237,8,188,187,115,99,49,85],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit."],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Kamino obligation. Note: Kamino needs","this to be mut because `deposit` might return the rent here"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit token into Kamino"],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","writable":true,"relations":["bank"]},{"name":"lending_market"},{"name":"lending_market_authority"},{"name":"integration_acc_1","docs":["The Kamino reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC). Kamino calls this the `reserve_liquidity_mint`"],"relations":["bank"]},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for tokenized representations of Kamino deposits."],"writable":true},{"name":"reserve_destination_deposit_collateral","docs":["The reserve's destination for tokenized representations of deposits. Note: the","`reserve_collateral_mint` will mint tokens directly to this account."],"writable":true},{"name":"obligation_farm_user_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"reserve_farm_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"farms_program","docs":["Farms program for Kamino staking functionality"],"address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"collateral_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"liquidity_token_program"},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"kamino_harvest_reward","docs":["(permissionless) Harvest the specified reward index from the Kamino Farm attached to this","bank. Rewards are always sent to the global fee wallet's canonical ATA.","","* `reward_index` — index of the reward token in the Kamino Farm's reward list"],"discriminator":[163,202,248,141,106,20,116,5],"accounts":[{"name":"bank"},{"name":"fee_state","docs":["Global fee state that contains the global_fee_admin"],"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"destination_token_account","docs":["Destination token account must be owned by the global fee admin"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"reward_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Kamino obligation."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"user_state","writable":true},{"name":"farm_state","writable":true},{"name":"global_config"},{"name":"reward_mint"},{"name":"user_reward_ata","docs":["An initialized ATA of type reward mint owned by liquidity vault"],"writable":true},{"name":"rewards_vault","writable":true},{"name":"rewards_treasury_vault","writable":true},{"name":"farm_vaults_authority"},{"name":"scope_prices","optional":true},{"name":"farms_program","address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"token_program"}],"args":[{"name":"reward_index","type":"u64"}]},{"name":"kamino_init_obligation","docs":["(permissionless) Initialize a Kamino obligation for a marginfi bank","* amount - In token, in native decimals. Must be >10 (i.e. 10 lamports, not 10 tokens). Lost","forever. Generally, try to make this the equivalent of around $1, in case Kamino ever","rounds small balances down to zero."],"discriminator":[253,177,160,225,70,156,217,109],"accounts":[{"name":"fee_payer","docs":["Pays to init the obligation and pays a nominal amount to ensure the obligation has a","non-zero balance."],"writable":true,"signer":true},{"name":"bank"},{"name":"signer_token_account","docs":["The fee payer must provide a nominal amount of bank tokens so the obligation is not empty.","This amount is irrecoverable and and will prevent the obligation from ever being closed,","even if the bank is otherwise empty (Kamino normally closes empty obligations automatically)"],"writable":true},{"name":"liquidity_vault_authority","docs":["The liquidity vault authority (PDA that will own the Kamino obligation). Note: Kamino needs","this to be mut because `deposit` might return the rent here"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit a nominal amount of token into the obligation."],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","docs":["The obligation account to be created. Note that the key was already derived when","initializing the bank, and this must match the obligation recorded at that time."],"writable":true,"relations":["bank"]},{"name":"user_metadata","writable":true},{"name":"lending_market"},{"name":"lending_market_authority"},{"name":"integration_acc_1","writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC). Kamino calls this the `reserve_liquidity_mint`"],"writable":true,"relations":["bank"]},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for tokenized representations of Kamino deposits."],"writable":true},{"name":"reserve_destination_deposit_collateral","docs":["The reserve's destination for tokenized representations of deposits. Note: the","`reserve_collateral_mint` will mint tokens directly to this account."],"writable":true},{"name":"pyth_oracle","optional":true},{"name":"switchboard_price_oracle","optional":true},{"name":"switchboard_twap_oracle","optional":true},{"name":"scope_prices","optional":true},{"name":"obligation_farm_user_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"reserve_farm_state","docs":["Required if the Kamino reserve has an active farm."],"writable":true,"optional":true},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"farms_program","docs":["Farms program for Kamino staking functionality"],"address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"collateral_token_program","docs":["Note: the collateral token always uses Token classic, never Token22."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"liquidity_token_program","docs":["Note: Kamino does not have full Token22 support, certain Token22 features are disallowed.","Expect this to update over time. Check with the Kamino source."]},{"name":"instruction_sysvar_account","address":"Sysvar1nstructions1111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"kamino_withdraw","docs":["(user) Withdraw from a Kamino pool through a marginfi account","* amount - in the collateral token (NOT liquidity token), in native decimals. Must convert","from collateral to liquidity token amounts using the current exchange rate.","* withdraw_all - if true, withdraw the entire mrgn balance (Note: due to rounding down, a","deposit and withdraw back to back may result in several lamports less)"],"discriminator":[199,101,41,45,213,98,224,200],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","docs":["Token account that will receive the withdrawn tokens. Mint/owner are validated by the","SPL transfer; the caller controls the destination."],"writable":true},{"name":"liquidity_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]},"relations":["bank"]},{"name":"integration_acc_2","writable":true,"relations":["bank"]},{"name":"lending_market","docs":["The Kamino lending market"]},{"name":"lending_market_authority","docs":["The Kamino lending market authority"]},{"name":"integration_acc_1","docs":["The Kamino reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["The liquidity token mint (e.g., USDC)","Needs serde to get the mint decimals for transfer checked","TODO: rename to just 'mint' to make use of has_one and to be consistent with deposit"],"writable":true,"relations":["bank"]},{"name":"reserve_liquidity_supply","docs":["The reserve's liquidity supply account"],"writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's collateral mint"],"writable":true},{"name":"reserve_source_collateral","docs":["The reserve's source for collateral tokens"],"writable":true},{"name":"obligation_farm_user_state","docs":["Optional farms accounts for Kamino staking functionality"],"writable":true,"optional":true},{"name":"reserve_farm_state","writable":true,"optional":true},{"name":"kamino_program","address":"KLend2g3cP87fffoy8q1mQqGKjrxjC8boSyAYavgmjD"},{"name":"farms_program","docs":["Farms program for Kamino staking functionality"],"address":"FarmsPZpWu9i7Kky8tPN37rs2TpmMrAZrC7S7vJa91Hr"},{"name":"collateral_token_program","docs":["The token program for the collateral token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"liquidity_token_program","docs":["The token program for the liquidity token"]},{"name":"instruction_sysvar_account","docs":["Used by kamino validate CPI calls"],"address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"lending_account_borrow","docs":["(account authority) Borrow assets from a bank. Accrues interest, records liability, applies","origination fee, transfers tokens, and runs a health check."],"discriminator":[4,126,116,53,48,5,212,31],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","writable":true},{"name":"bank_liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"lending_account_clear_emissions","docs":["(permissionless) Zero out `emissions_outstanding` on a balance after emissions are disabled","on the bank."],"discriminator":[239,4,221,98,45,167,201,244],"accounts":[{"name":"marginfi_account","writable":true},{"name":"bank"}],"args":[]},{"name":"lending_account_close_balance","docs":["(account authority) Close a balance position with dust-level amounts."],"discriminator":[245,54,41,4,243,202,31,17],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true}],"args":[]},{"name":"lending_account_deposit","docs":["(account authority) Deposit assets into a bank. Accrues interest, records deposit, and","transfers tokens from the signer's token account to the bank's liquidity vault."],"discriminator":[171,94,235,103,82,64,212,140],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","writable":true},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"deposit_up_to_limit","type":{"option":"bool"}}]},{"name":"lending_account_end_flashloan","docs":["(account authority) End a flash loan and run the health check."],"discriminator":[105,124,201,106,153,2,8,156],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]}],"args":[]},{"name":"lending_account_liquidate","docs":["(permissionless) Liquidate a lending account balance of an unhealthy marginfi account.","The liquidator takes on the liability and receives discounted collateral (2.5% liquidator","fee + 2.5% insurance fee).","* `asset_amount` - amount of collateral to liquidate","* `liquidatee_accounts` - number of remaining accounts for the liquidatee","* `liquidator_accounts` - number of remaining accounts for the liquidator"],"discriminator":[214,169,151,213,251,167,86,219],"accounts":[{"name":"group","relations":["asset_bank","liab_bank","liquidator_marginfi_account","liquidatee_marginfi_account"]},{"name":"asset_bank","writable":true},{"name":"liab_bank","writable":true},{"name":"liquidator_marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"liquidatee_marginfi_account","writable":true},{"name":"bank_liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"liab_bank"}]}},{"name":"bank_liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"liab_bank"}]}},{"name":"bank_insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"liab_bank"}]}},{"name":"token_program"}],"args":[{"name":"asset_amount","type":"u64"},{"name":"liquidatee_accounts","type":"u8"},{"name":"liquidator_accounts","type":"u8"}]},{"name":"lending_account_pulse_health","docs":["(Permissionless) Refresh the internal risk engine health cache. Useful for liquidators and","other consumers that want to see the internal risk state of a user account. This cache is","read-only and serves no purpose except being populated by this ix.","* remaining accounts expected in the same order as borrow, etc. I.e., for each balance the","user has, pass bank and oracle: "],"discriminator":[186,52,117,97,34,74,39,253],"accounts":[{"name":"marginfi_account","writable":true}],"args":[]},{"name":"lending_account_repay","docs":["(account authority, or any signer during receivership) Repay borrowed assets. Accrues","interest, records repayment, and transfers tokens to the bank's liquidity vault."],"discriminator":[79,209,172,177,222,51,173,151],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","docs":["Must be marginfi_account's authority, unless in liquidation/deleverage receivership or order execution","","Note: during receivership and order execution, there are no signer checks whatsoever: any key can repay as","long as the invariants checked at the end of execution are met."],"signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","writable":true},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"repay_all","type":{"option":"bool"}}]},{"name":"lending_account_start_flashloan","docs":["(account authority) Start a flash loan. Must have a corresponding `end_flashloan` ix in the","same tx. Health checks are skipped until the flash loan ends."],"discriminator":[14,131,33,220,81,186,180,107],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"ixs_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"end_index","type":"u64"}]},{"name":"lending_account_withdraw","docs":["(account authority, or any signer during receivership) Withdraw assets from a bank. Accrues","interest, records withdrawal, transfers tokens, and runs a health check (skipped during","receivership)."],"discriminator":[36,72,74,19,210,210,192,192],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","docs":["Must be marginfi_account's authority, unless in liquidation/deleverage receivership or order execution","","Note: during receivership and order execution, there are no signer checks whatsoever: any key can repay as","long as the invariants checked at the end of execution are met."],"signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","writable":true},{"name":"bank_liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"lending_pool_accrue_bank_interest","docs":["(permissionless) Accrue interest on a bank, updating share values and collecting fees."],"discriminator":[108,201,30,87,47,65,97,188],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true}],"args":[]},{"name":"lending_pool_add_bank","docs":["(admin only) Add a new bank to the lending pool"],"discriminator":[215,68,72,78,208,218,103,182],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","docs":["Pays to init accounts and pays `fee_state.bank_init_flat_sol_fee` lamports to the protocol"],"writable":true,"signer":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"bank_mint"},{"name":"bank","writable":true,"signer":true},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"BankConfigCompact"}}}]},{"name":"lending_pool_add_bank_drift","docs":["(group admin only) Add a Drift bank to the group."],"discriminator":[62,63,49,48,76,55,108,155],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by `integration_acc_1`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1","docs":["Drift spot market account that must match the bank mint"]},{"name":"integration_acc_2","docs":["Drift user account for the marginfi program (derived from liquidity_vault_authority)"],"pda":{"seeds":[{"kind":"const","value":[117,115,101,114]},{"kind":"account","path":"liquidity_vault_authority"},{"kind":"const","value":[0,0]}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}}},{"name":"integration_acc_3","docs":["Drift user stats account for the marginfi program (derived from liquidity_vault_authority)"],"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,115,116,97,116,115]},{"kind":"account","path":"liquidity_vault_authority"}],"program":{"kind":"const","value":[9,84,219,190,158,201,96,201,138,122,41,63,226,19,54,150,111,225,128,209,81,174,75,129,121,86,31,137,133,74,83,246]}}},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's liquidity vault. Used as intermediary for deposits/withdraws"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For Drift banks, the `liquidity_vault` never holds assets, but is instead used as an","intermediary when depositing/withdrawing, e.g., withdrawn funds move from Drift -> here ->","the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"DriftConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_juplend","docs":["(admin) Add a JupLend bank to the marginfi group.","","Remaining accounts (for oracle validation):","0. underlying oracle feed (pyth push or switchboard pull)","1. JupLend `Lending` state"],"discriminator":[18,208,117,90,53,111,195,41],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by the JupLend lending state."]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1","docs":["JupLend lending state account that must match the bank mint."]},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's liquidity vault. Used as intermediary for deposits/withdraws."],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For JupLend banks, the `liquidity_vault` is used as an intermediary when depositing/","withdrawing, e.g., withdrawn funds move from JupLend -> here -> the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"f_token_mint","relations":["integration_acc_1"]},{"name":"integration_acc_2","docs":["The bank's fToken vault holds the fTokens received when depositing into JupLend.",""],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,95,116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program","docs":["Token program for both underlying mint and fToken mint (SPL Token or Token-2022).","JupLend creates fToken mints using the same token program as the underlying."]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"JuplendConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_kamino","docs":["(group admin only) Add a Kamino bank to the group. Pass the oracle and reserve in remaining","accounts 0 and 1 respectively."],"discriminator":[118,53,16,243,255,245,149,241],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by the Kamino reserve (integration_acc_1), Kamino calls this the","`reserve_liquidity_mint` aka `liquidity.mint_pubkey`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1"},{"name":"integration_acc_2","docs":["Note: not yet initialized in this instruction, run `init_obligation` after."]},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's Kamino obligation (integration_acc_2). Note: When","depositing/withdrawing Kamino assets, the source/destination must also be owned by the","obligation authority.","Kamino assets, the source/destination must also be owned by the obligation authority. This","account owns the `liquidity_vault`, and thus acts as intermediary for deposits/withdraws"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For Kamino banks, the `liquidity_vault` never holds assets, but is instead used as an","intermediary when depositing/withdrawing, e.g., withdrawn funds move from Kamino -> here ->","the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"KaminoConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_permissionless","docs":["(permissionless) Add a staked collateral bank. Requires a valid SPL single-pool LST mint."],"discriminator":[127,187,121,34,187,167,238,102],"accounts":[{"name":"marginfi_group","writable":true,"relations":["staked_settings"]},{"name":"staked_settings"},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Mint of the spl-single-pool LST (a PDA derived from `stake_pool`)","","because the sol_pool and stake_pool will not derive to a valid PDA which is also owned by","the staking program and spl-single-pool program."]},{"name":"sol_pool"},{"name":"stake_pool","docs":["this key.","","If derives the same `bank_mint`, then this must be the correct stake pool for that mint, and","we can subsequently use it to validate the `sol_pool`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_solend","docs":["(admin) Add a Solend bank to the marginfi group"],"discriminator":[81,233,203,199,47,226,0,68],"accounts":[{"name":"group","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint","docs":["Must match the mint used by `integration_acc_1`, Solend calls this the `liquidity.mint_pubkey`"]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"integration_acc_1","docs":["Solend reserve account that must match the bank mint"]},{"name":"integration_acc_2","docs":["Obligation PDA for this bank in Solend","Will be initialized and transferred to Solend in init_obligation instruction"],"pda":{"seeds":[{"kind":"const","value":[115,111,108,101,110,100,95,111,98,108,105,103,97,116,105,111,110]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault_authority","docs":["Will be authority of the bank's liquidity vault. Used as intermediary for deposits/withdraws"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["For Solend banks, the `liquidity_vault` never holds assets, but is instead used as an","intermediary when depositing/withdrawing, e.g., withdrawn funds move from Solend -> here ->","the user's token account."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","docs":["Note: Currently does nothing."],"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","docs":["Note: Currently does nothing."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"SolendConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_add_bank_with_seed","docs":["(admin only) A copy of lending_pool_add_bank with an additional bank seed.","This seed is used to create a PDA for the bank's signature.","lending_pool_add_bank is preserved for backwards compatibility."],"discriminator":[76,211,213,171,117,78,158,76],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","docs":["Pays to init accounts and pays `fee_state.bank_init_flat_sol_fee` lamports to the protocol"],"writable":true,"signer":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"bank_mint"},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_config","type":{"defined":{"name":"BankConfigCompact"}}},{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_clone_bank","docs":["(admin only) Staging or localnet only, panics on mainnet","This instruction is used to clone a bank to a new PDA."],"discriminator":[214,93,17,236,177,228,78,17],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","writable":true,"signer":true,"relations":["marginfi_group"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"bank_mint"},{"name":"source_bank","docs":["Source bank to clone from mainnet program",""]},{"name":"bank","writable":true,"pda":{"seeds":[{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"bank_mint"},{"kind":"arg","path":"bank_seed"}]}},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_seed","type":"u64"}]},{"name":"lending_pool_clone_emode","docs":["(admin or emode_admin) Copies emode settings from one bank to another. Useful when applying","emode settings from e.g. one LST to another."],"discriminator":[146,167,94,106,184,202,15,10],"accounts":[{"name":"group","relations":["copy_from_bank","copy_to_bank"]},{"name":"signer","signer":true},{"name":"copy_from_bank"},{"name":"copy_to_bank","writable":true}],"args":[]},{"name":"lending_pool_close_bank","docs":["(admin only) Close a bank. Requires CLOSE_ENABLED_FLAG and zero positions/shares."],"discriminator":[22,115,7,130,227,85,0,47],"accounts":[{"name":"group","writable":true,"relations":["bank"]},{"name":"bank","writable":true},{"name":"admin","writable":true,"signer":true,"relations":["group"]}],"args":[]},{"name":"lending_pool_collect_bank_fees","docs":["(permissionless) Transfer accrued fees from the liquidity vault to insurance/fee/program","vaults."],"discriminator":[201,5,215,116,230,92,75,150],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"fee_ata","docs":["(validated in handler). Must already exist, may require initializing the ATA if it does not","already exist prior to this ix."],"writable":true},{"name":"token_program"}],"args":[]},{"name":"lending_pool_configure_bank","docs":["(admin only) Configure bank parameters. If the bank has `FREEZE_SETTINGS`, only","deposit/borrow limits are updated and all other config changes are silently ignored."],"discriminator":[121,173,156,40,93,148,56,237],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"bank_config_opt","type":{"defined":{"name":"BankConfigOpt"}}}]},{"name":"lending_pool_configure_bank_emode","docs":["(emode_admin only)"],"discriminator":[17,175,91,57,239,86,49,71],"accounts":[{"name":"group","relations":["bank"]},{"name":"emode_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"emode_tag","type":"u16"},{"name":"entries","type":{"array":[{"defined":{"name":"EmodeEntry"}},10]}}]},{"name":"lending_pool_configure_bank_interest_only","docs":["(delegate_curve_admin only) Update interest rate config. Does nothing if bank has","`FREEZE_SETTINGS`."],"discriminator":[245,107,83,38,103,219,163,241],"accounts":[{"name":"group","relations":["bank"]},{"name":"delegate_curve_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"interest_rate_config","type":{"defined":{"name":"InterestRateConfigOpt"}}}]},{"name":"lending_pool_configure_bank_limits_only","docs":["(delegate_limit_admin only) Update deposit/borrow/init limits only."],"discriminator":[157,196,221,200,202,62,84,21],"accounts":[{"name":"group","relations":["bank"]},{"name":"delegate_limit_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"deposit_limit","type":{"option":"u64"}},{"name":"borrow_limit","type":{"option":"u64"}},{"name":"total_asset_value_init_limit","type":{"option":"u64"}}]},{"name":"lending_pool_configure_bank_oracle","docs":["(admin only)"],"discriminator":[209,82,255,171,124,21,71,81],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"setup","type":"u8"},{"name":"oracle","type":"pubkey"}]},{"name":"lending_pool_force_tokenless_repay_complete","docs":["(risk_admin only) - Signals all of a bank's liability have been deleveraged. Used if a bank","still has liability dust after the risk admin has completed deleveraging all debts. The","risk admin is trusted not to execute this until all non-dust debts have been deleveraged."],"discriminator":[15,203,147,232,199,14,231,37],"accounts":[{"name":"group","relations":["bank"]},{"name":"risk_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[]},{"name":"lending_pool_handle_bankruptcy","docs":["(risk_admin or admin, unless `PERMISSIONLESS_BAD_DEBT_SETTLEMENT_FLAG` is set on the bank)","Handle bad debt of a bankrupt marginfi account for a given bank. Covers bad debt from the","insurance fund and socializes any remainder among depositors."],"discriminator":[162,11,56,139,90,128,70,173],"accounts":[{"name":"group","relations":["bank","marginfi_account"]},{"name":"signer","docs":["Must be risk_admin or admin, unless the bank has PERMISSIONLESS_BAD_DEBT_SETTLEMENT_FLAG","set, in which case any signer is accepted."],"signer":true},{"name":"bank","writable":true},{"name":"marginfi_account","writable":true},{"name":"liquidity_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"token_program"}],"args":[]},{"name":"lending_pool_pulse_bank_price_cache","docs":["(Permissionless) Refresh the cached oracle price for a bank."],"discriminator":[192,19,201,135,105,203,32,222],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true}],"args":[]},{"name":"lending_pool_reclaim_emissions_vault","docs":["(permissionless) Reclaim all remaining tokens from the emissions vault","to the global fee wallet ATA, and disable emissions on the bank."],"discriminator":[206,67,186,225,41,30,95,216],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true},{"name":"emissions_mint"},{"name":"emissions_auth","pda":{"seeds":[{"kind":"const","value":[101,109,105,115,115,105,111,110,115,95,97,117,116,104,95,115,101,101,100]},{"kind":"account","path":"bank"},{"kind":"account","path":"emissions_mint"}]}},{"name":"emissions_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[101,109,105,115,115,105,111,110,115,95,116,111,107,101,110,95,97,99,99,111,117,110,116,95,115,101,101,100]},{"kind":"account","path":"bank"},{"kind":"account","path":"emissions_mint"}]}},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"destination_account","docs":["emissions mint (validated in handler)."],"writable":true},{"name":"token_program"}],"args":[]},{"name":"lending_pool_set_fixed_oracle_price","docs":["(admin only)"],"discriminator":[28,126,127,127,60,37,211,125],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[{"name":"price","type":{"defined":{"name":"WrappedI80F48"}}}]},{"name":"lending_pool_update_fees_destination_account","docs":["(admin only) Set the destination wallet for permissionless fee withdrawals."],"discriminator":[102,4,121,243,237,110,95,13],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","writable":true},{"name":"admin","signer":true,"relations":["group"]},{"name":"destination_account","docs":["Bank fees will be sent to this account which must be an ATA of the bank's mint."]}],"args":[]},{"name":"lending_pool_withdraw_fees","docs":["(admin only) Withdraw collected group fees from the fee vault."],"discriminator":[92,140,215,254,170,0,83,174],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank"},{"name":"admin","signer":true,"relations":["group"]},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"dst_token_account","writable":true},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"lending_pool_withdraw_fees_permissionless","docs":["(permissionless) Withdraw group fees to the pre-configured `fees_destination_account`."],"discriminator":[57,245,1,208,130,18,145,113],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank"},{"name":"fee_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"fees_destination_account","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"lending_pool_withdraw_insurance","docs":["(admin only) Withdraw from the insurance vault."],"discriminator":[108,60,60,246,104,79,159,243],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank"},{"name":"admin","signer":true,"relations":["group"]},{"name":"insurance_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116]},{"kind":"account","path":"bank"}]}},{"name":"insurance_vault_authority","pda":{"seeds":[{"kind":"const","value":[105,110,115,117,114,97,110,99,101,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"dst_token_account","writable":true},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"marginfi_account_close","docs":["(account authority) Close a marginfi account. Requires all balances to be empty and no","active flags (disabled, flashloan, receivership)."],"discriminator":[186,221,93,34,50,97,194,241],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"fee_payer","writable":true,"signer":true}],"args":[]},{"name":"marginfi_account_close_order","docs":["(user) Close an existing Order, returning rent to the user"],"discriminator":[212,223,79,182,172,183,205,237],"accounts":[{"name":"marginfi_account","writable":true,"relations":["order"]},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"order","writable":true},{"name":"fee_recipient","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_end_execute_order","docs":["(permissionless keeper) End Order execution","* Closes the Order (keeper keeps the rent)","* Closes the borrow position involved in the Order, the lending position remains open","* User health must be \"unchanged\" (within Order requirements i.e. minus slippage). Keeper","may keep any slippage in excess of what was needed to complete the Order as profit.","* `StartExecuteOrder` must appear earlier in the tx","* Must appear last in the tx","* CPI is forbidden","* Returns rent for ephemeral accounts created during `StartExecuteOrder`"],"discriminator":[115,42,20,93,121,84,178,83],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","docs":["The account owning the order"],"writable":true,"relations":["order"]},{"name":"executor","docs":["The executioner ☠️"],"signer":true,"relations":["execute_record"]},{"name":"fee_recipient","writable":true},{"name":"order","writable":true,"relations":["execute_record"]},{"name":"execute_record","docs":["This keeps track of the relevant state to be checked at the end of execution."],"writable":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"marginfi_account_init_liq_record","docs":["(permissionless) Initialize a liquidation record PDA for a marginfi account. The fee_payer","pays rent; the record is required for receivership liquidation."],"discriminator":[236,213,238,126,147,251,164,8],"accounts":[{"name":"marginfi_account","writable":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"liquidation_record","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,95,114,101,99,111,114,100]},{"kind":"account","path":"marginfi_account"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_initialize","docs":["Initialize a marginfi account for a given group. The account is a fresh keypair, and must","sign. If you are a CPI caller, consider using `marginfi_account_initialize_pda` instead, or","create the account manually and use `transfer_to_new_account` to gift it to the owner you","wish."],"discriminator":[43,78,61,255,148,52,249,154],"accounts":[{"name":"marginfi_group"},{"name":"marginfi_account","writable":true,"signer":true},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_initialize_pda","docs":["The same as `marginfi_account_initialize`, except the created marginfi account uses a PDA","(Program Derived Address)","","seeds:","- marginfi_group","- authority: The account authority (owner)","- account_index: A u16 value to allow multiple accounts per authority","- third_party_id: Optional u16 for third-party tagging. Seeds < PDA_FREE_THRESHOLD can be","used freely. For a dedicated seed used by just your program (via CPI), contact us."],"discriminator":[87,177,91,80,218,119,245,31],"accounts":[{"name":"marginfi_group"},{"name":"marginfi_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,103,105,110,102,105,95,97,99,99,111,117,110,116]},{"kind":"account","path":"marginfi_group"},{"kind":"account","path":"authority"},{"kind":"arg","path":"account_index"},{"kind":"arg","path":"third_party_id.unwrap_or(0)"}]}},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"instructions_sysvar","docs":["Instructions sysvar for CPI validation",""],"address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"account_index","type":"u16"},{"name":"third_party_id","type":{"option":"u16"}}]},{"name":"marginfi_account_keeper_close_order","docs":["(permissionless keeper) Close an existing Order after the user account was closed, or it no","longer has the associated positions, or the user has executed","`marginfi_account_set_keeper_close_flags`. Keeper keeps the rent."],"discriminator":[128,114,71,46,194,71,186,106],"accounts":[{"name":"marginfi_account","docs":["marginfi account was closed.","The ownership check is checked in the handler or/and type checks are made in the handler."],"relations":["order"]},{"name":"fee_recipient","writable":true},{"name":"order","writable":true}],"args":[]},{"name":"marginfi_account_place_order","docs":["(user) Create a new Order.","* bank_keys - Currently only two keys: the lending position and borrowing position in the","users's Balances for which the order is being placed","* trigger - the type of order (stop loss, take profit, or both), and the threshold at which","to trigger the order, in dollars"],"discriminator":[244,112,75,138,143,108,7,186],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","writable":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"authority","signer":true,"relations":["marginfi_account"]},{"name":"order","writable":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"global_fee_wallet","writable":true,"relations":["fee_state"]},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bank_keys","type":{"vec":"pubkey"}},{"name":"trigger","type":{"defined":{"name":"OrderTrigger"}}}]},{"name":"marginfi_account_set_freeze","docs":["(admin only) Freeze or unfreeze a marginfi account. Frozen accounts can only be operated on","by the group admin."],"discriminator":[199,179,231,30,138,247,110,227],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","writable":true},{"name":"admin","signer":true}],"args":[{"name":"frozen","type":"bool"}]},{"name":"marginfi_account_set_keeper_close_flags","docs":["(user) Purge flags from some balances, enabling a Keeper to call","`marginfi_account_keeper_close_order` on associated Orders. Typically, use","`marginfi_account_close_order` instead if trying to close an Order."],"discriminator":[82,163,165,222,212,255,33,210],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true,"relations":["marginfi_account"]}],"args":[{"name":"bank_keys_opt","type":{"option":{"vec":"pubkey"}}}]},{"name":"marginfi_account_start_execute_order","docs":["(permissionless keeper) Begin Order execution","* Enables the Keeper to withdraw/repay associated positions until the end of the tx","* Only one `StartExecuteOrder` is allowed per tx","* Must appear before `EndExecuteOrder` in the tx, and before any instructions except certain","allowed ones (compute budget, kamino refresh, etc)","* `EndExecuteOrder` must also appear in the tx","* CPI is forbidden","* Costs a small amount of rent, which is returned at the end of the tx, make sure you have","enough SOL to start the tx."],"discriminator":[1,70,140,134,183,29,208,224],"accounts":[{"name":"group","relations":["marginfi_account"]},{"name":"marginfi_account","docs":["The account owning the order"],"writable":true,"relations":["order"]},{"name":"fee_payer","writable":true,"signer":true},{"name":"executor","docs":["This account will have the authority to withdraw/repay as if they are the user authority","until the end of the tx.",""]},{"name":"order","writable":true},{"name":"execute_record","docs":["This keeps track of the relevant state to be checked at the end of execution."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[101,120,101,99,117,116,101,95,111,114,100,101,114]},{"kind":"account","path":"order"}]}},{"name":"instruction_sysvar","address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"marginfi_account_update_emissions_destination_account","docs":["(account authority) Set the wallet whose canonical ATA will receive off-chain emissions."],"discriminator":[73,185,162,201,111,24,116,185],"accounts":[{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"destination_account","docs":["the canonical ATA for each emissions mint."]}],"args":[]},{"name":"marginfi_group_configure","docs":["(admin only) Configure group admin keys and emode leverage caps. All admin keys must be","provided on every call. Emode leverage caps are set if provided, otherwise the existing","(non-zero) values are kept. Pass `Some(value)` to update, `None` to leave unchanged."],"discriminator":[62,199,81,78,33,13,236,61],"accounts":[{"name":"marginfi_group","writable":true},{"name":"admin","signer":true,"relations":["marginfi_group"]}],"args":[{"name":"new_admin","type":{"option":"pubkey"}},{"name":"new_emode_admin","type":{"option":"pubkey"}},{"name":"new_curve_admin","type":{"option":"pubkey"}},{"name":"new_limit_admin","type":{"option":"pubkey"}},{"name":"new_flow_admin","type":{"option":"pubkey"}},{"name":"new_emissions_admin","type":{"option":"pubkey"}},{"name":"new_metadata_admin","type":{"option":"pubkey"}},{"name":"new_risk_admin","type":{"option":"pubkey"}},{"name":"emode_max_init_leverage","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"emode_max_maint_leverage","type":{"option":{"defined":{"name":"WrappedI80F48"}}}}]},{"name":"marginfi_group_initialize","docs":["(admin only) Initialize a new marginfi group. The signer becomes the group admin."],"discriminator":[255,67,67,26,94,31,34,20],"accounts":[{"name":"marginfi_group","writable":true,"signer":true},{"name":"admin","writable":true,"signer":true},{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"migrate_curve","docs":["(Permissionless) Convert a bank from the legacy curve setup to the new setup, with no effect","on how interest accrues."],"discriminator":[151,254,50,13,112,235,152,72],"accounts":[{"name":"bank","writable":true}],"args":[]},{"name":"panic_pause","docs":["(global_fee_admin only) Pause the protocol. Auto-expires after 30 minutes. Limited to 3","pauses per day and 2 consecutive pauses."],"discriminator":[76,164,123,25,4,43,79,165],"accounts":[{"name":"global_fee_admin","docs":["Admin of the global FeeState (can trigger panic pause)"],"signer":true,"relations":["fee_state"]},{"name":"fee_state","docs":["Global fee state account containing the panic state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"panic_unpause","docs":["(global_fee_admin only) Unpause the protocol before the auto-expiry."],"discriminator":[236,107,194,242,99,51,121,128],"accounts":[{"name":"global_fee_admin","docs":["Admin of the global FeeState (can manually unpause)"],"writable":true,"signer":true,"relations":["fee_state"]},{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"panic_unpause_permissionless","docs":["(permissionless) Unpause the protocol when pause time has expired"],"discriminator":[245,139,50,159,213,62,91,248],"accounts":[{"name":"fee_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}}],"args":[]},{"name":"propagate_fee_state","docs":["(Permissionless) Force any group to adopt the current FeeState settings"],"discriminator":[64,3,166,194,129,21,101,155],"accounts":[{"name":"fee_state","pda":{"seeds":[{"kind":"const","value":[102,101,101,115,116,97,116,101]}]}},{"name":"marginfi_group","docs":["Any group, this ix is permisionless and can propagate the fee to any group"],"writable":true}],"args":[]},{"name":"propagate_staked_settings","docs":["(permissionless) Propagate updated staked settings to a staked collateral bank."],"discriminator":[210,30,152,69,130,99,222,170],"accounts":[{"name":"marginfi_group","relations":["staked_settings"]},{"name":"staked_settings"},{"name":"bank","writable":true}],"args":[]},{"name":"purge_deleverage_balance","docs":["(risk admin only) Purge a user's lending balance without withdrawing anything. Only usable","after all the debt has been settled on a bank in deleveraging mode, e.g. when","`TOKENLESS_REPAYMENTS_ALLOWED` and `TOKENLESS_REPAYMENTS_COMPLETE`. used to purge remaining","lending assets in a now-worthless bank before it is fully sunset."],"discriminator":[132,187,25,149,181,59,253,136],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"risk_admin","signer":true,"relations":["group"]},{"name":"bank","writable":true}],"args":[]},{"name":"solend_deposit","docs":["(user) Deposit into a Solend reserve through a marginfi account","* amount - in the underlying token (e.g., USDC), in native decimals"],"discriminator":[56,127,176,148,12,25,3,24],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"signer_token_account","docs":["Owned by authority, the source account for the token deposit."],"writable":true},{"name":"liquidity_vault_authority","docs":["The bank's liquidity vault authority, which owns the Solend obligation"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit tokens into Solend"],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","docs":["The Solend obligation account"],"writable":true,"relations":["bank"]},{"name":"lending_market"},{"name":"lending_market_authority","docs":["Derived from the lending market"]},{"name":"integration_acc_1","docs":["The Solend reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"relations":["bank"]},{"name":"reserve_liquidity_supply","docs":["Reserve's liquidity supply SPL Token account"],"writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for cTokens"],"writable":true},{"name":"reserve_collateral_supply","docs":["The reserve's collateral supply account (where cTokens are stored)"],"writable":true},{"name":"user_collateral","docs":["The user's destination for cTokens (collateral). This is a temporary account owned by","liquidity_vault_authority that will hold cTokens between deposit and obligation update."],"writable":true},{"name":"pyth_price","docs":["Oracle accounts - required by Solend even if not actively used"]},{"name":"switchboard_feed"},{"name":"solend_program","address":"So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"solend_init_obligation","docs":["(permissionless) Initialize a Solend obligation for a marginfi bank","Requires a minimum deposit to ensure the obligation remains active","* amount - minimum deposit amount (at least 10 units) in native decimals"],"discriminator":[81,96,123,149,218,116,235,196],"accounts":[{"name":"fee_payer","docs":["Pays to init the obligation and pays a nominal amount to ensure the obligation has a","non-zero balance."],"writable":true,"signer":true},{"name":"bank"},{"name":"signer_token_account","docs":["The fee payer must provide a nominal amount of bank tokens so the obligation is not empty.","This amount is irrecoverable and will prevent the obligation from ever being closed."],"writable":true},{"name":"liquidity_vault_authority","docs":["The liquidity vault authority (PDA that will own the Solend obligation)"],"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","docs":["Used as an intermediary to deposit a nominal amount of token into the obligation."],"writable":true,"relations":["bank"]},{"name":"integration_acc_2","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,108,101,110,100,95,111,98,108,105,103,97,116,105,111,110]},{"kind":"account","path":"bank"}]},"relations":["bank"]},{"name":"lending_market"},{"name":"lending_market_authority","docs":["Derived from the lending market"]},{"name":"integration_acc_1","writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"writable":true,"relations":["bank"]},{"name":"reserve_liquidity_supply","writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for cTokens"],"writable":true},{"name":"reserve_collateral_supply","docs":["The reserve's collateral supply account (where cTokens are stored)"],"writable":true},{"name":"user_collateral","docs":["The user's destination for cTokens (collateral). This is a temporary account owned by","liquidity_vault_authority that will hold cTokens between deposit and obligation update."],"writable":true},{"name":"pyth_price","docs":["Oracle accounts - required by Solend even if not actively used"]},{"name":"switchboard_feed"},{"name":"solend_program","address":"So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"},{"name":"token_program"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"solend_withdraw","docs":["(user) Withdraw from a Solend reserve through a marginfi account","* amount - in collateral tokens (cTokens), in native decimals","* withdraw_all - withdraw entire position if true"],"discriminator":[238,144,170,199,21,72,155,36],"accounts":[{"name":"group","relations":["marginfi_account","bank"]},{"name":"marginfi_account","writable":true},{"name":"authority","signer":true},{"name":"bank","writable":true},{"name":"destination_token_account","docs":["Token account that will receive the withdrawn tokens. Mint/owner are validated by the","SPL transfer; the caller controls the destination."],"writable":true},{"name":"liquidity_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"integration_acc_2","docs":["The Solend obligation account"],"writable":true,"relations":["bank"]},{"name":"lending_market","writable":true},{"name":"lending_market_authority","docs":["Derived from the lending market"]},{"name":"integration_acc_1","docs":["The Solend reserve that holds liquidity"],"writable":true,"relations":["bank"]},{"name":"mint","docs":["Bank's liquidity token mint (e.g., USDC)"],"relations":["bank"]},{"name":"reserve_liquidity_supply","docs":["Reserve's liquidity supply SPL Token account"],"writable":true},{"name":"reserve_collateral_mint","docs":["The reserve's mint for cTokens"],"writable":true},{"name":"reserve_collateral_supply","docs":["The reserve's collateral supply account (where cTokens are stored)"],"writable":true},{"name":"user_collateral","docs":["The user's destination for cTokens (collateral). This is a temporary account owned by","liquidity_vault_authority that holds cTokens."],"writable":true},{"name":"solend_program","address":"So1endDq2YkqhipRh3WViPa8hdiSpxWy6z3Z6tMCpAo"},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"},{"name":"withdraw_all","type":{"option":"bool"}}]},{"name":"start_deleverage","docs":["(risk_admin only) Begin forced deleverage on an account. Similar to start_liquidation but","does not require the account to be unhealthy."],"discriminator":[10,138,10,57,40,232,182,193],"accounts":[{"name":"marginfi_account","docs":["Account to deleverage"],"writable":true},{"name":"liquidation_record","docs":["The associated liquidation record PDA for the given `marginfi_account`"],"writable":true,"relations":["marginfi_account"]},{"name":"group","relations":["marginfi_account"]},{"name":"risk_admin","docs":["The risk admin will have the authority to withdraw/repay as if they are the user authority","until the end of the tx."],"signer":true,"relations":["group"]},{"name":"instruction_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[]},{"name":"start_liquidation","docs":["(permissionless) Begin receivership liquidation on an unhealthy account. Snapshots health","and marks the account in receivership. Must have `end_liquidation` as the last ix in the tx."],"discriminator":[244,93,90,214,192,166,191,21],"accounts":[{"name":"marginfi_account","docs":["Account under liquidation"],"writable":true},{"name":"liquidation_record","docs":["The associated liquidation record PDA for the given `marginfi_account`"],"writable":true,"relations":["marginfi_account"]},{"name":"liquidation_receiver","docs":["This account will have the authority to withdraw/repay as if they are the user authority","until the end of the tx.",""]},{"name":"instruction_sysvar","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[]},{"name":"super_admin_deposit","docs":["(primary admin only) Deposit directly into a bank liquidity vault and raise","`asset_share_value` proportionally. No marginfi account is involved."],"discriminator":[241,189,199,17,207,225,64,75],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true},{"name":"admin_token_account","writable":true},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"super_admin_withdraw","docs":["(primary admin only) Withdraw directly from a bank liquidity vault and lower","`asset_share_value` proportionally. No marginfi account is involved."],"discriminator":[202,67,85,126,104,138,79,197],"accounts":[{"name":"group","relations":["bank"]},{"name":"admin","signer":true,"relations":["group"]},{"name":"bank","writable":true},{"name":"destination_token_account","writable":true},{"name":"liquidity_vault_authority","pda":{"seeds":[{"kind":"const","value":[108,105,113,117,105,100,105,116,121,95,118,97,117,108,116,95,97,117,116,104]},{"kind":"account","path":"bank"}]}},{"name":"liquidity_vault","writable":true,"relations":["bank"]},{"name":"token_program"}],"args":[{"name":"amount","type":"u64"}]},{"name":"transfer_to_new_account","docs":["(account authority) Transfer all positions to a new account under a new authority. The old","account is disabled. Pays a flat SOL fee to the protocol."],"discriminator":[28,79,129,231,169,69,69,65],"accounts":[{"name":"group","relations":["old_marginfi_account"]},{"name":"old_marginfi_account","writable":true},{"name":"new_marginfi_account","writable":true,"signer":true},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"new_authority"},{"name":"global_fee_wallet","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"transfer_to_new_account_pda","docs":["(account authority) Same as `transfer_to_new_account` except the resulting account is a PDA","","seeds:","- marginfi_group","- authority: The account authority (owner)","- account_index: A u16 value to allow multiple accounts per authority","- third_party_id: Optional u16 for third-party tagging. Seeds < PDA_FREE_THRESHOLD can be","used freely. For a dedicated seed used by just your program (via CPI), contact us."],"discriminator":[172,210,224,220,146,212,253,49],"accounts":[{"name":"group","relations":["old_marginfi_account"]},{"name":"old_marginfi_account","writable":true},{"name":"new_marginfi_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,114,103,105,110,102,105,95,97,99,99,111,117,110,116]},{"kind":"account","path":"group"},{"kind":"account","path":"new_authority"},{"kind":"arg","path":"account_index"},{"kind":"arg","path":"third_party_id.unwrap_or(0)"}]}},{"name":"authority","signer":true},{"name":"fee_payer","writable":true,"signer":true},{"name":"new_authority"},{"name":"global_fee_wallet","writable":true},{"name":"instructions_sysvar","docs":["Instructions sysvar for CPI validation"],"address":"Sysvar1nstructions1111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"account_index","type":"u16"},{"name":"third_party_id","type":{"option":"u16"}}]},{"name":"update_deleverage_withdrawals","docs":["(delegate_flow_admin only) Update the deleverage daily withdraw outflow with","aggregated data. The delegate flow admin aggregates","`DeleverageWithdrawFlowEvent` events off-chain and calls this instruction at intervals."],"discriminator":[56,3,181,118,27,247,207,227],"accounts":[{"name":"marginfi_group","writable":true},{"name":"delegate_flow_admin","signer":true,"relations":["marginfi_group"]}],"args":[{"name":"outflow_usd","type":"u32"},{"name":"update_seq","type":"u64"},{"name":"event_start_slot","type":"u64"},{"name":"event_end_slot","type":"u64"}]},{"name":"update_group_rate_limiter","docs":["(delegate_flow_admin only) Update the group rate limiter with aggregated","inflow/outflow. The delegate flow admin aggregates","`RateLimitFlowEvent` events off-chain, converts to USD, and calls this instruction at","intervals to update group rate limiter state."],"discriminator":[23,78,60,139,187,44,129,37],"accounts":[{"name":"marginfi_group","writable":true},{"name":"delegate_flow_admin","signer":true,"relations":["marginfi_group"]}],"args":[{"name":"outflow_usd","type":{"option":"u64"}},{"name":"inflow_usd","type":{"option":"u64"}},{"name":"update_seq","type":"u64"},{"name":"event_start_slot","type":"u64"},{"name":"event_end_slot","type":"u64"}]},{"name":"write_bank_metadata","docs":["(metadata admin only) Write ticker/description information for a bank on-chain. Optional, not","all Banks are guaranteed to have metadata."],"discriminator":[147,78,81,133,129,138,233,59],"accounts":[{"name":"group","relations":["bank"]},{"name":"bank","relations":["metadata"]},{"name":"metadata_admin","writable":true,"signer":true,"relations":["group"]},{"name":"metadata","writable":true}],"args":[{"name":"ticker","type":{"option":"bytes"}},{"name":"description","type":{"option":"bytes"}}]}],"accounts":[{"name":"Bank","discriminator":[142,49,166,242,50,66,97,188]},{"name":"BankMetadata","discriminator":[49,207,31,34,67,225,169,186]},{"name":"ExecuteOrderRecord","discriminator":[6,100,107,60,164,226,56,97]},{"name":"FeeState","discriminator":[63,224,16,85,193,36,235,220]},{"name":"Lending","discriminator":[135,199,82,16,249,131,182,241]},{"name":"LiquidationRecord","discriminator":[95,116,23,132,89,210,245,162]},{"name":"MarginfiAccount","discriminator":[67,178,130,109,126,114,28,42]},{"name":"MarginfiGroup","discriminator":[182,23,173,240,151,206,182,67]},{"name":"MinimalObligation","discriminator":[168,206,141,106,88,76,172,167]},{"name":"MinimalReserve","discriminator":[43,242,204,202,26,247,59,127]},{"name":"MinimalSpotMarket","discriminator":[100,177,8,107,168,65,65,39]},{"name":"MinimalUser","discriminator":[159,117,95,227,239,151,58,236]},{"name":"Order","discriminator":[134,173,223,185,77,86,28,51]},{"name":"SolendMinimalReserve","discriminator":[1]},{"name":"StakedSettings","discriminator":[157,140,6,77,89,173,173,125]}],"events":[{"name":"DeleverageEvent","discriminator":[161,8,108,204,209,198,12,30]},{"name":"DeleverageWithdrawFlowEvent","discriminator":[109,90,139,200,10,204,84,176]},{"name":"EditStakedSettingsEvent","discriminator":[29,58,155,191,75,220,145,206]},{"name":"HealthPulseEvent","discriminator":[183,159,218,110,61,220,65,1]},{"name":"KeeperCloseOrderEvent","discriminator":[46,152,11,174,92,157,77,64]},{"name":"LendingAccountBorrowEvent","discriminator":[223,96,81,10,156,99,26,59]},{"name":"LendingAccountDepositEvent","discriminator":[161,54,237,217,105,248,122,151]},{"name":"LendingAccountLiquidateEvent","discriminator":[166,160,249,154,183,39,23,242]},{"name":"LendingAccountRepayEvent","discriminator":[16,220,55,111,7,80,16,25]},{"name":"LendingAccountWithdrawEvent","discriminator":[3,220,148,243,33,249,54,88]},{"name":"LendingPoolBankAccrueInterestEvent","discriminator":[104,117,187,156,111,154,106,186]},{"name":"LendingPoolBankCollectFeesEvent","discriminator":[101,119,97,250,169,175,156,253]},{"name":"LendingPoolBankConfigureEvent","discriminator":[246,35,233,110,93,152,235,40]},{"name":"LendingPoolBankConfigureFrozenEvent","discriminator":[24,10,55,18,49,150,157,179]},{"name":"LendingPoolBankConfigureOracleEvent","discriminator":[119,140,110,253,150,64,210,62]},{"name":"LendingPoolBankCreateEvent","discriminator":[236,220,201,63,239,126,136,249]},{"name":"LendingPoolBankHandleBankruptcyEvent","discriminator":[166,77,41,140,36,94,10,57]},{"name":"LendingPoolBankSetFixedOraclePriceEvent","discriminator":[65,72,8,85,229,20,90,26]},{"name":"LendingPoolSuperAdminDepositEvent","discriminator":[99,152,211,30,58,165,210,71]},{"name":"LendingPoolSuperAdminWithdrawEvent","discriminator":[107,168,232,181,144,161,252,37]},{"name":"LiquidationReceiverEvent","discriminator":[40,131,224,220,151,83,24,230]},{"name":"MarginfiAccountCloseOrderEvent","discriminator":[158,34,122,98,23,146,229,212]},{"name":"MarginfiAccountCreateEvent","discriminator":[183,5,117,104,122,199,68,51]},{"name":"MarginfiAccountFreezeEvent","discriminator":[219,219,57,178,75,86,146,122]},{"name":"MarginfiAccountPlaceOrderEvent","discriminator":[1,105,79,28,142,242,99,145]},{"name":"MarginfiAccountTransferToNewAccount","discriminator":[59,105,171,110,223,136,80,89]},{"name":"MarginfiGroupConfigureEvent","discriminator":[241,104,172,167,41,195,199,170]},{"name":"MarginfiGroupCreateEvent","discriminator":[233,125,61,14,98,240,136,253]},{"name":"RateLimitFlowEvent","discriminator":[229,5,73,200,0,107,105,109]},{"name":"SetKeeperCloseFlagsEvent","discriminator":[193,230,93,128,117,87,96,21]}],"errors":[{"code":6000,"name":"InternalLogicError","msg":"Internal Marginfi logic error"},{"code":6001,"name":"BankNotFound","msg":"Invalid bank index"},{"code":6002,"name":"LendingAccountBalanceNotFound","msg":"Lending account balance not found"},{"code":6003,"name":"BankAssetCapacityExceeded","msg":"Bank deposit capacity exceeded"},{"code":6004,"name":"InvalidTransfer","msg":"Invalid transfer"},{"code":6005,"name":"MissingPythOrBankAccount","msg":"Missing Oracle, Bank, LST mint, or Sol Pool"},{"code":6006,"name":"MissingPythAccount","msg":"Missing Pyth account"},{"code":6007,"name":"MissingBankAccount","msg":"Missing Bank account"},{"code":6008,"name":"InvalidBankAccount","msg":"Invalid Bank account"},{"code":6009,"name":"RiskEngineInitRejected","msg":"RiskEngine rejected due to either bad health or stale oracles"},{"code":6010,"name":"LendingAccountBalanceSlotsFull","msg":"Lending account balance slots are full"},{"code":6011,"name":"BankAlreadyExists","msg":"Bank already exists"},{"code":6012,"name":"ZeroLiquidationAmount","msg":"Amount to liquidate must be positive"},{"code":6013,"name":"AccountNotBankrupt","msg":"Account is not bankrupt"},{"code":6014,"name":"BalanceNotBadDebt","msg":"Account balance is not bad debt"},{"code":6015,"name":"InvalidConfig","msg":"Invalid group config"},{"code":6016,"name":"BankPaused","msg":"Bank paused"},{"code":6017,"name":"BankReduceOnly","msg":"Bank is ReduceOnly mode"},{"code":6018,"name":"BankAccountNotFound","msg":"Bank is missing"},{"code":6019,"name":"OperationDepositOnly","msg":"Operation is deposit-only"},{"code":6020,"name":"OperationWithdrawOnly","msg":"Operation is withdraw-only"},{"code":6021,"name":"OperationBorrowOnly","msg":"Operation is borrow-only"},{"code":6022,"name":"OperationRepayOnly","msg":"Operation is repay-only"},{"code":6023,"name":"NoAssetFound","msg":"No asset found"},{"code":6024,"name":"NoLiabilityFound","msg":"No liability found"},{"code":6025,"name":"InvalidOracleSetup","msg":"Invalid oracle setup"},{"code":6026,"name":"IllegalUtilizationRatio","msg":"Invalid bank utilization ratio"},{"code":6027,"name":"BankLiabilityCapacityExceeded","msg":"Bank borrow cap exceeded"},{"code":6028,"name":"InvalidPrice","msg":"Invalid Price"},{"code":6029,"name":"IsolatedAccountIllegalState","msg":"Account can have only one liability when account is under isolated risk"},{"code":6030,"name":"EmissionsAlreadySetup","msg":"Emissions already setup"},{"code":6031,"name":"OracleNotSetup","msg":"Oracle is not set"},{"code":6032,"name":"InvalidSwitchboardDecimalConversion","msg":"Invalid switchboard decimal conversion"},{"code":6033,"name":"CannotCloseOutstandingEmissions","msg":"Cannot close balance because of outstanding emissions"},{"code":6034,"name":"EmissionsUpdateError","msg":"Update emissions error"},{"code":6035,"name":"AccountDisabled","msg":"Account disabled"},{"code":6036,"name":"AccountTempActiveBalanceLimitExceeded","msg":"Account can't temporarily open 3 balances, please close a balance first"},{"code":6037,"name":"AccountInFlashloan","msg":"Illegal action during flashloan"},{"code":6038,"name":"IllegalFlashloan","msg":"Illegal flashloan"},{"code":6039,"name":"IllegalFlag","msg":"Illegal flag"},{"code":6040,"name":"IllegalBalanceState","msg":"Illegal balance state"},{"code":6041,"name":"IllegalAccountAuthorityTransfer","msg":"Illegal account authority transfer"},{"code":6042,"name":"Unauthorized","msg":"Unauthorized"},{"code":6043,"name":"IllegalAction","msg":"Invalid account authority"},{"code":6044,"name":"T22MintRequired","msg":"Token22 Banks require mint account as first remaining account"},{"code":6045,"name":"InvalidFeeAta","msg":"Invalid ATA for global fee account"},{"code":6046,"name":"AddedStakedPoolManually","msg":"Use add pool permissionless instead"},{"code":6047,"name":"AssetTagMismatch","msg":"Staked SOL accounts can only deposit staked assets and borrow SOL"},{"code":6048,"name":"StakePoolValidationFailed","msg":"Stake pool validation failed: check the stake pool, mint, or sol pool"},{"code":6049,"name":"SwitchboardStalePrice","msg":"Switchboard oracle: stale price"},{"code":6050,"name":"PythPushStalePrice","msg":"Pyth Push oracle: stale price"},{"code":6051,"name":"WrongNumberOfOracleAccounts","msg":"Oracle error: wrong number of accounts"},{"code":6052,"name":"WrongOracleAccountKeys","msg":"Oracle error: wrong account keys"},{"code":6053,"name":"Vacated2","msg":"Vacated2"},{"code":6054,"name":"Vacated3","msg":"Vacated3"},{"code":6055,"name":"OracleMaxConfidenceExceeded","msg":"Oracle max confidence exceeded: try again later"},{"code":6056,"name":"PythPushInsufficientVerificationLevel","msg":"Pyth Push oracle: insufficient verification level"},{"code":6057,"name":"ZeroAssetPrice","msg":"Zero asset price"},{"code":6058,"name":"ZeroLiabilityPrice","msg":"Zero liability price"},{"code":6059,"name":"SwitchboardWrongAccountOwner","msg":"Switchboard oracle: wrong account owner"},{"code":6060,"name":"PythPushInvalidAccount","msg":"Pyth Push oracle: invalid account"},{"code":6061,"name":"SwitchboardInvalidAccount","msg":"Switchboard oracle: invalid account"},{"code":6062,"name":"MathError","msg":"Math error"},{"code":6063,"name":"InvalidEmissionsDestinationAccount","msg":"Invalid emissions destination account"},{"code":6064,"name":"SameAssetAndLiabilityBanks","msg":"Asset and liability bank cannot be the same"},{"code":6065,"name":"OverliquidationAttempt","msg":"Trying to withdraw more assets than available"},{"code":6066,"name":"NoLiabilitiesInLiabilityBank","msg":"Liability bank has no liabilities"},{"code":6067,"name":"AssetsInLiabilityBank","msg":"Liability bank has assets"},{"code":6068,"name":"HealthyAccount","msg":"Account is healthy and cannot be liquidated"},{"code":6069,"name":"ExhaustedLiability","msg":"Liability payoff too severe, exhausted liability"},{"code":6070,"name":"TooSeverePayoff","msg":"Liability payoff too severe, liability balance has assets"},{"code":6071,"name":"TooSevereLiquidation","msg":"Liquidation too severe, account above maintenance requirement"},{"code":6072,"name":"WorseHealthPostLiquidation","msg":"Liquidation would worsen account health"},{"code":6073,"name":"IntegrationPositionLimitExceeded","msg":"Exceeded the maximum allowed integration positions"},{"code":6074,"name":"MaxInitLeverageExceeded","msg":"Maximum initial leverage exceeded"},{"code":6075,"name":"BadEmodeConfig","msg":"The Emode config was invalid"},{"code":6076,"name":"PythPushInvalidWindowSize","msg":"TWAP window size does not match expected duration"},{"code":6077,"name":"InvalidFeesDestinationAccount","msg":"Invalid fees destination account"},{"code":6078,"name":"BankCannotClose","msg":"Banks cannot close when they have open positions or emissions outstanding"},{"code":6079,"name":"AccountAlreadyMigrated","msg":"Account already migrated"},{"code":6080,"name":"ProtocolPaused","msg":"Protocol is paused"},{"code":6081,"name":"MetadataTooLong","msg":"Metadata is too long"},{"code":6082,"name":"PauseLimitExceeded","msg":"Pause limit exceeded"},{"code":6083,"name":"ProtocolNotPaused","msg":"Protocol is not paused"},{"code":6084,"name":"BankKilledByBankruptcy","msg":"Bank killed by bankruptcy: bank shutdown and value of all holdings is zero"},{"code":6085,"name":"UnexpectedLiquidationState","msg":"Liquidation state issue. Check start before end, end last, and both unique"},{"code":6086,"name":"StartNotFirst","msg":"Liquidation start must be first instruction (other than compute program ixes)"},{"code":6087,"name":"StartRepeats","msg":"Only one liquidation event allowed per tx"},{"code":6088,"name":"EndNotLast","msg":"The end instruction must be the last ix in the tx"},{"code":6089,"name":"ForbiddenIx","msg":"Tried to call an instruction that is forbidden during liquidation"},{"code":6090,"name":"LiquidationPremiumTooHigh","msg":"Seized too much of the asset relative to liability repaid"},{"code":6091,"name":"NotAllowedInCPI","msg":"Start and end liquidation and flashloan must be top-level instructions"},{"code":6092,"name":"ZeroSupplyInStakePool","msg":"Stake pool supply is zero: cannot compute price"},{"code":6093,"name":"InvalidGroup","msg":"Invalid group: account constraint violated"},{"code":6094,"name":"InvalidLiquidityVault","msg":"Invalid liquidity vault: account constraint violated"},{"code":6095,"name":"InvalidLiquidationRecord","msg":"Invalid liquidation record: account constraint violated"},{"code":6096,"name":"InvalidLiquidationReceiver","msg":"Invalid liquidation receiver: account constraint violated"},{"code":6097,"name":"InvalidEmissionsMint","msg":"Invalid emissions mint: account constraint violated"},{"code":6098,"name":"InvalidMint","msg":"Invalid mint: account constraint violated"},{"code":6099,"name":"InvalidFeeWallet","msg":"Invalid fee wallet: account constraint violated"},{"code":6100,"name":"FixedOraclePriceNegative","msg":"Fixed oracle price must be zero or greater"},{"code":6101,"name":"DailyWithdrawalLimitExceeded","msg":"Daily withdrawal limit exceeded: try again later"},{"code":6102,"name":"ZeroWithdrawalLimit","msg":"Cannot set daily withdrawal limit to zero"},{"code":6103,"name":"AccountFrozen","msg":"Account is frozen by the group admin"},{"code":6104,"name":"DuplicateBalance","msg":"Cannot reference duplicate balances"},{"code":6105,"name":"InvalidBalanceCount","msg":"Invalid amount of balances referenced"},{"code":6106,"name":"LiquidatorOrderCloseNotAllowed","msg":"Liquidator not allowed to close order"},{"code":6107,"name":"OrderTriggerNotMet","msg":"Order trigger is yet to be met"},{"code":6108,"name":"UnexpectedOrderExecutionState","msg":"Order execution state issue. Check the necessary invariants i.e not in flashloan or disabled e.t.c"},{"code":6109,"name":"OrderLiabilityNotClosed","msg":"Order liability not closed"},{"code":6110,"name":"InvalidAssetOrLiabilitiesCount","msg":"Invalid asset or liabilities count"},{"code":6111,"name":"WorseHealthPostExecution","msg":"Account health can only worsen if account is healthy"},{"code":6112,"name":"InvalidOrderTakeProfitOrStopLoss","msg":"TP must be > 0, SL must be > 0 and TP > SL if both are set"},{"code":6113,"name":"InvalidSlippage","msg":"Max slippage must be less than 100%"},{"code":6114,"name":"OrderExecutionOverWithdrawal","msg":"Executor withdrew too much: slippage or max fee constraint violated"},{"code":6115,"name":"BankHourlyRateLimitExceeded","msg":"Bank hourly rate limit exceeded: try again later"},{"code":6116,"name":"BankDailyRateLimitExceeded","msg":"Bank daily rate limit exceeded: try again later"},{"code":6117,"name":"GroupHourlyRateLimitExceeded","msg":"Group hourly rate limit exceeded: try again later"},{"code":6118,"name":"GroupDailyRateLimitExceeded","msg":"Group daily rate limit exceeded: try again later"},{"code":6119,"name":"InvalidRateLimitPrice","msg":"Invalid rate limit price: pass oracle or pre-crank cache"},{"code":6120,"name":"GroupRateLimiterUpdateEmpty","msg":"Group rate limiter admin update must include inflow and/or outflow"},{"code":6121,"name":"GroupRateLimiterUpdateInvalidSlotRange","msg":"Group rate limiter admin update slot range is invalid"},{"code":6122,"name":"GroupRateLimiterUpdateFutureSlot","msg":"Group rate limiter admin update cannot reference future slots"},{"code":6123,"name":"GroupRateLimiterUpdateStale","msg":"Group rate limiter admin update is too stale"},{"code":6124,"name":"GroupRateLimiterUpdateOutOfOrderSlot","msg":"Group rate limiter admin update slot progression is out of order"},{"code":6125,"name":"GroupRateLimiterUpdateOutOfOrderSeq","msg":"Group rate limiter admin update sequence is out of order"},{"code":6126,"name":"DeleverageWithdrawalUpdateEmpty","msg":"Deleverage withdrawal admin update must include outflow"},{"code":6127,"name":"DeleverageWithdrawalUpdateInvalidSlotRange","msg":"Deleverage withdrawal admin update slot range is invalid"},{"code":6128,"name":"DeleverageWithdrawalUpdateFutureSlot","msg":"Deleverage withdrawal admin update cannot reference future slots"},{"code":6129,"name":"DeleverageWithdrawalUpdateStale","msg":"Deleverage withdrawal admin update is too stale"},{"code":6130,"name":"DeleverageWithdrawalUpdateOutOfOrderSlot","msg":"Deleverage withdrawal admin update slot progression is out of order"},{"code":6131,"name":"DeleverageWithdrawalUpdateOutOfOrderSeq","msg":"Deleverage withdrawal admin update sequence is out of order"},{"code":6200,"name":"WrongAssetTagForStandardInstructions","msg":"Wrong asset tag for standard instructions, expected DEFAULT, SOL, or STAKED asset tag"},{"code":6201,"name":"WrongAssetTagForKaminoInstructions","msg":"Wrong asset tag for Kamino instructions, expected KAMINO asset tag"},{"code":6202,"name":"CantAddPool","msg":"Cannot create a kamino bank with this instruction, use add_bank_kamino"},{"code":6203,"name":"KaminoReserveMintAddressMismatch","msg":"Kamino reserve mint address doesn't match the bank mint address"},{"code":6204,"name":"KaminoDepositFailed","msg":"Deposit failed: obligation deposit amount increase did not match the expected increase, left - actual, right - expected"},{"code":6205,"name":"KaminoWithdrawFailed","msg":"Withdraw failed: token vault increase did not match the expected increase, left - actual, right - expected"},{"code":6206,"name":"ReserveStale","msg":"Kamino Reserve data is stale - run refresh_reserve on kamino program first"},{"code":6207,"name":"InvalidObligationDepositCount","msg":"Kamino obligation must have exactly one active deposit, at index 0"},{"code":6208,"name":"ObligationDepositReserveMismatch","msg":"Kamino obligation deposit doesn't match the expected reserve"},{"code":6209,"name":"ObligationInitDepositInsufficient","msg":"Failed to meet minimum deposit amount requirement for init obligation"},{"code":6210,"name":"KaminoReserveValidationFailed","msg":"Kamino reserve validation failed"},{"code":6211,"name":"KaminoInvalidOracleSetup","msg":"Invalid oracle setup: only KaminoPythPush and KaminoSwitchboardPull are supported"},{"code":6212,"name":"MaxMaintLeverageExceeded","msg":"Maximum Maintenance leverage exceeded"},{"code":6213,"name":"InvalidKaminoReserve","msg":"Invalid Kamino reserve: account constraint violated"},{"code":6214,"name":"InvalidKaminoObligation","msg":"Invalid Kamino obligation: account constraint violated"},{"code":6300,"name":"DriftInvalidOracleSetup","msg":"Invalid oracle setup: only DriftPythPull and DriftSwitchboardPull are supported"},{"code":6301,"name":"DriftSpotMarketMintMismatch","msg":"Drift spot market mint does not match bank mint"},{"code":6302,"name":"WrongBankAssetTagForDriftOperation","msg":"Wrong bank asset tag for Drift operation"},{"code":6303,"name":"CantUseStandardOperationsOnDriftAssets","msg":"Cannot use standard operations on Drift assets"},{"code":6304,"name":"DriftSpotMarketValidationFailed","msg":"Drift spot market validation failed"},{"code":6305,"name":"DriftInvalidSpotPositions","msg":"Drift user has invalid spot positions (only first position can have balance)"},{"code":6306,"name":"DriftSpotPositionMarketMismatch","msg":"Drift spot position market does not match bank's configured market"},{"code":6307,"name":"DriftInvalidPositionType","msg":"Drift position has invalid balance type (must be deposit)"},{"code":6308,"name":"DriftScaledBalanceMismatch","msg":"Drift scaled balance change does not match expected amount"},{"code":6309,"name":"DriftWithdrawFailed","msg":"Drift withdrawal failed - token amount mismatch"},{"code":6310,"name":"DriftUserInitDepositInsufficient","msg":"Drift user initial deposit insufficient (minimum 10 units required)"},{"code":6311,"name":"InvalidDriftAccount","msg":"Invalid drift account"},{"code":6312,"name":"DriftAuthorityMismatch","msg":"Drift authority mismatch"},{"code":6313,"name":"DriftInvalidHarvestPositionIndex","msg":"Invalid harvest position index - must be between 2 and 7"},{"code":6314,"name":"DriftPositionEmpty","msg":"Drift position is empty"},{"code":6315,"name":"DriftInvalidBalanceType","msg":"Drift position has invalid balance type"},{"code":6316,"name":"DriftNoAdminDeposit","msg":"No admin deposits found in Drift positions 2-7 for this market"},{"code":6317,"name":"DriftHarvestSameMarket","msg":"Cannot harvest from the same market as the bank's main drift spot market"},{"code":6318,"name":"DriftBrickedAccount","msg":"Drift account bricked: too many active deposits from admin operations"},{"code":6319,"name":"DriftMissingRewardOracle","msg":"Drift reward oracle required when 2+ active deposits exist"},{"code":6320,"name":"DriftMissingRewardSpotMarket","msg":"Drift reward spot market required when 2+ active deposits exist"},{"code":6321,"name":"DriftMissingRewardAccounts","msg":"Drift account has admin deposits that require reward accounts to be provided"},{"code":6322,"name":"DriftSpotMarketStale","msg":"Drift spot market is stale, interest needs to be updated"},{"code":6323,"name":"InvalidDriftSpotMarket","msg":"Invalid Drift spot market: account constraint violated"},{"code":6324,"name":"InvalidDriftUser","msg":"Invalid Drift user: account constraint violated"},{"code":6325,"name":"InvalidDriftUserStats","msg":"Invalid Drift user stats: account constraint violated"},{"code":6326,"name":"DriftUnsupportedTokenDecimals","msg":"Drift cannot support tokens with more than 19 decimals"},{"code":6400,"name":"SolendInvalidOracleSetup","msg":"Invalid oracle setup: only SolendPythPull and SolendSwitchboardPull are supported"},{"code":6401,"name":"SolendReserveValidationFailed","msg":"Solend reserve validation failed"},{"code":6402,"name":"SolendObligationOwnerMismatch","msg":"Solend obligation owner mismatch"},{"code":6403,"name":"WrongBankAssetTagForSolendOperation","msg":"Wrong bank asset tag for Solend operation"},{"code":6404,"name":"CantUseStandardOperationsOnSolendAssets","msg":"Cannot use standard operations on Solend assets"},{"code":6405,"name":"SolendReserveMismatch","msg":"Solend reserve mismatch"},{"code":6406,"name":"SolendReserveMintMismatch","msg":"Solend reserve mint mismatch"},{"code":6407,"name":"SolendInvalidDepositPositions","msg":"Solend obligation has invalid deposits (only first position can have balance)"},{"code":6408,"name":"SolendDepositPositionReserveMismatch","msg":"Solend deposit position reserve does not match bank's configured reserve"},{"code":6409,"name":"SolendCTokenBalanceMismatch","msg":"Solend cToken balance change does not match expected amount"},{"code":6410,"name":"SolendWithdrawFailed","msg":"Solend withdrawal failed - token amount mismatch"},{"code":6411,"name":"SolendReserveStale","msg":"Solend reserve is stale"},{"code":6412,"name":"SolendDepositFailed","msg":"Solend deposit failed - collateral amount mismatch"},{"code":6413,"name":"InvalidSolendAccount","msg":"Invalid Solend account owner"},{"code":6414,"name":"InvalidSolendAccountVersion","msg":"Invalid Solend account version"},{"code":6415,"name":"InvalidSolendReserve","msg":"Invalid Solend reserve: account constraint violated"},{"code":6416,"name":"InvalidSolendObligation","msg":"Invalid Solend obligation: account constraint violated"},{"code":6500,"name":"JuplendInvalidOracleSetup","msg":"Invalid oracle setup: only JuplendPythPull and JuplendSwitchboardPull are supported"},{"code":6501,"name":"JuplendLendingValidationFailed","msg":"Juplend lending state validation failed"},{"code":6502,"name":"WrongBankAssetTagForJuplendOperation","msg":"Wrong bank asset tag for Juplend operation"},{"code":6503,"name":"CantUseStandardOperationsOnJuplendAssets","msg":"Cannot use standard operations on Juplend assets"},{"code":6504,"name":"JuplendLendingStale","msg":"Juplend lending state is stale"},{"code":6505,"name":"InvalidJuplendLending","msg":"Invalid Juplend lending: account constraint violated"},{"code":6506,"name":"JuplendLendingMintMismatch","msg":"Juplend lending mint mismatch"},{"code":6507,"name":"JuplendBankAlreadyActivated","msg":"Juplend bank is already activated"},{"code":6508,"name":"InvalidJuplendFTokenVault","msg":"Invalid Juplend fToken vault"},{"code":6509,"name":"JuplendDepositFailed","msg":"Juplend deposit failed"},{"code":6510,"name":"JuplendWithdrawFailed","msg":"Juplend withdraw failed"},{"code":6511,"name":"JuplendInitPositionDepositInsufficient","msg":"Juplend init position deposit insufficient"},{"code":6512,"name":"InvalidJuplendWithdrawIntermediaryAta","msg":"Invalid Juplend withdraw intermediary ATA"}],"types":[{"name":"AccountEventHeader","type":{"kind":"struct","fields":[{"name":"signer","type":{"option":"pubkey"}},{"name":"marginfi_account","type":"pubkey"},{"name":"marginfi_account_authority","type":"pubkey"},{"name":"marginfi_group","type":"pubkey"}]}},{"name":"Balance","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"active","docs":["Whether this balance slot is in use (nonzero = active)"],"type":"u8"},{"name":"bank_pk","docs":["The bank this balance corresponds to"],"type":"pubkey"},{"name":"bank_asset_tag","docs":["Inherited from the bank when the position is first created and CANNOT BE CHANGED after that.","Note that all balances created before the addition of this feature use `ASSET_TAG_DEFAULT`"],"type":"u8"},{"name":"tag","docs":["Tag used by orders to reference this balance (0 means unused/unassigned).","A tag may also have a non-zero value while having no orders."],"type":"u16"},{"name":"_pad0","type":{"array":["u8",4]}},{"name":"asset_shares","docs":["The user's asset (deposit) shares in the bank. Multiply by `bank.asset_share_value` for","the token amount."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_shares","docs":["The user's liability (borrow) shares in the bank. Multiply by `bank.liability_share_value`","for the token amount."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"emissions_outstanding","docs":["Unclaimed emissions rewards for this position"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_update","docs":["Unix timestamp (u64) of the last emissions calculation for this position"],"type":"u64"},{"name":"_padding","docs":["Reserved for future use"],"type":{"array":["u64",1]}}]}},{"name":"Bank","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","docs":["The SPL token mint this bank manages"],"type":"pubkey"},{"name":"mint_decimals","docs":["Number of decimals of the `mint`. Must be < 24."],"type":"u8"},{"name":"group","docs":["The `MarginfiGroup` this bank belongs to"],"type":"pubkey"},{"name":"_pad0","type":{"array":["u8",7]}},{"name":"asset_share_value","docs":["Monotonically increases as interest rate accumulates. For typical banks, a user's asset","value in token = (number of shares the user has * asset_share_value).","* A float (arbitrary decimals)","* Initially 1"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_share_value","docs":["Monotonically increases as interest rate accumulates. For typical banks, a user's liabilty","value in token = (number of shares the user has * liability_share_value)","* A float (arbitrary decimals)","* Initially 1"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidity_vault","docs":["The SPL token account holding deposited liquidity"],"type":"pubkey"},{"name":"liquidity_vault_bump","docs":["PDA bump for the liquidity vault"],"type":"u8"},{"name":"liquidity_vault_authority_bump","docs":["PDA bump for the liquidity vault authority"],"type":"u8"},{"name":"insurance_vault","docs":["The SPL token account holding insurance fund tokens"],"type":"pubkey"},{"name":"insurance_vault_bump","docs":["PDA bump for the insurance vault"],"type":"u8"},{"name":"insurance_vault_authority_bump","docs":["PDA bump for the insurance vault authority"],"type":"u8"},{"name":"_pad1","type":{"array":["u8",4]}},{"name":"collected_insurance_fees_outstanding","docs":["Fees collected and pending withdraw for the `insurance_vault`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"fee_vault","docs":["The SPL token account holding collected group fees"],"type":"pubkey"},{"name":"fee_vault_bump","docs":["PDA bump for the fee vault"],"type":"u8"},{"name":"fee_vault_authority_bump","docs":["PDA bump for the fee vault authority"],"type":"u8"},{"name":"_pad2","type":{"array":["u8",6]}},{"name":"collected_group_fees_outstanding","docs":["Fees collected and pending withdraw for the `fee_vault`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"total_liability_shares","docs":["Sum of all liability shares held by all borrowers in this bank.","Multiply by `liability_share_value` to get the total liability amount in native token units."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"total_asset_shares","docs":["Sum of all asset shares held by all depositors in this bank.","Multiply by `asset_share_value` to get the total asset amount in native token units.","* For Kamino banks, this is the quantity of collateral tokens (NOT liquidity tokens) in the","bank, and also uses `mint_decimals`, though the mint itself will always show (6) decimals","exactly (i.e Kamino ignores this and treats it as if it was using `mint_decimals`)"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_update","docs":["Unix timestamp (i64) of the last interest accrual"],"type":"i64"},{"name":"config","docs":["The bank's configuration parameters (weights, limits, oracle setup, interest rate config)"],"type":{"defined":{"name":"BankConfig"}}},{"name":"flags","docs":["Bank flags bitfield (u64).","","- Bit 0 (1): `EMISSIONS_FLAG_BORROW_ACTIVE` — borrow-side emissions are active","- Bit 1 (2): `EMISSIONS_FLAG_LENDING_ACTIVE` — lending-side emissions are active","- Bit 2 (4): `PERMISSIONLESS_BAD_DEBT_SETTLEMENT_FLAG` — anyone can settle bad debt","- Bit 3 (8): `FREEZE_SETTINGS` — bank configuration is frozen (only limits can change)","- Bit 4 (16): `CLOSE_ENABLED_FLAG` — bank can be closed (set at creation for banks >= 0.1.4)","- Bit 5 (32): `TOKENLESS_REPAYMENTS_ALLOWED` — risk admin can repay debt without tokens","- Bit 6 (64): `TOKENLESS_REPAYMENTS_COMPLETE` — all debt cleared, lender purge enabled"],"type":"u64"},{"name":"emissions_rate","docs":["Emissions APR. Number of emitted tokens (emissions_mint) per 1e(bank.mint_decimal) tokens","(bank mint) (native amount) per 1 YEAR."],"type":"u64"},{"name":"emissions_remaining","docs":["Remaining emissions tokens available for distribution"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"emissions_mint","docs":["The SPL token mint used for emissions rewards"],"type":"pubkey"},{"name":"collected_program_fees_outstanding","docs":["Fees collected and pending withdraw for the `FeeState.global_fee_wallet`'s canonical ATA for `mint`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"emode","docs":["Controls this bank's emode configuration, which enables some banks to treat the assets of","certain other banks more preferentially as collateral."],"type":{"defined":{"name":"EmodeSettings"}}},{"name":"fees_destination_account","docs":["Set with `update_fees_destination_account`. Fees can be withdrawn to the canonical ATA of","this wallet without the admin's input (withdraw_fees_permissionless). If pubkey default, the","bank doesn't support this feature, and the fees must be collected manually (withdraw_fees)."],"type":"pubkey"},{"name":"cache","docs":["Cached bank metrics (interest rates, oracle price, etc.)"],"type":{"defined":{"name":"BankCache"}}},{"name":"lending_position_count","docs":["Number of user lending positions currently open in this bank","* For banks created prior to 0.1.4, this is the number of positions opened/closed after","0.1.4 goes live, and may be negative.","* For banks created in 0.1.4 or later, this is the number of positions open in total, and","the bank may safely be closed if this is zero. Will never go negative."],"type":"i32"},{"name":"borrowing_position_count","docs":["Number of user borrowing positions currently open in this bank","* For banks created prior to 0.1.4, this is the number of positions opened/closed after","0.1.4 goes live, and may be negative.","* For banks created in 0.1.4 or later, this is the number of positions open in total, and","the bank may safely be closed if this is zero. Will never go negative."],"type":"i32"},{"name":"_padding_0","docs":["Reserved for future use"],"type":{"array":["u8",16]}},{"name":"integration_acc_1","docs":["Integration account slot 1 (default Pubkey for non-integrations).","- Kamino: reserve","- Drift: spot market","- Solend: reserve","- JupLend: lending state"],"type":"pubkey"},{"name":"integration_acc_2","docs":["Integration account slot 2 (default Pubkey for non-integrations).","- Kamino: obligation","- Drift: user","- Solend: obligation","- JupLend: fToken vault"],"type":"pubkey"},{"name":"integration_acc_3","docs":["Integration account slot 3 (default Pubkey for non-integrations).","- Drift: user stats","- JupLend: withdraw intermediary ATA (ATA of liquidity_vault_authority for bank mint)"],"type":"pubkey"},{"name":"rate_limiter","docs":["Rate limiter for controlling withdraw/borrow outflow.","Tracks net outflow (outflows - inflows) in native tokens."],"type":{"defined":{"name":"BankRateLimiter"}}},{"name":"_pad_0","type":{"array":["u8",16]}},{"name":"_padding_1","type":{"array":[{"array":["u64",2]},7]}}]}},{"name":"BankCache","docs":["A read-only cache of the bank's key metrics, e.g. spot interest/fee rates."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_rate","docs":["Actual (spot) interest/fee rates of the bank, based on utilization","* APR (annual percentage rate) values","* From 0-1000%, as u32, e.g. u32::MAX = 1000%, u32::MAX/2 = 500%, etc"],"type":"u32"},{"name":"lending_rate","docs":["Equivalent to `base_rate` * utilization","* From 0-1000%, as u32, e.g. u32::MAX = 1000%, u32::MAX/2 = 500%, etc"],"type":"u32"},{"name":"borrowing_rate","docs":["Equivalent to `base_rate` * (1 + ir_fees) + fixed_fees","* From 0-1000%, as u32, e.g. u32::MAX = 1000%, u32::MAX/2 = 500%, etc"],"type":"u32"},{"name":"interest_accumulated_for","docs":["* in seconds"],"type":"u32"},{"name":"accumulated_since_last_update","docs":["equivalent to (share value increase in the last `interest_accumulated_for` seconds *","shares), i.e. the delta in `asset_share_value`, in token.","* Note: if the tx that triggered this cache update increased or decreased the net shares,","this value still reports using the PRE-CHANGE share amount, since interest is always","earned on that amount.","* in token, in native decimals, as I80F48"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_oracle_price","docs":["Oracle price used in the last instruction that consumed an oracle price","* Only updated when instruction uses an oracle price, not updated for operations that don't","require prices (e.g., deposit, repay)","* Price in USD, with no price bias","* Zero if never updated"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_oracle_price_timestamp","docs":["Unix timestamp (seconds) when last_oracle_price was last updated","* Used to determine staleness of cached price","* Zero if never updated"],"type":"i64"},{"name":"last_oracle_price_confidence","docs":["Confidence interval reported by the oracle when last_oracle_price was fetched","* Always non-negative","* Zero if never updated","* Note: this value is the confidence reported by oracles, multiplied by `STD_DEV_MULTIPLE`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liq_cache_flags","docs":["Liquidation cache flags, set during receivership flow.","* 1 (LIQ_CACHE_LOCKED_FLAG) - We \"lock\" the liquidation cache when writing to it in Start","Liquidate as an additional safeguard, if the liquidation prices stored here were to be","edited between start and end, it would completely break the risk engine. End validates that","the lock is set, panics if not, and removes it - which prevents footguns if the cache was","e.g. accidently set to default. The lock is also removed when a Balance is closed via","withdraw_all, repay_all, or close_balance, but only when the account has","ACCOUNT_IN_RECEIVERSHIP set, so that operations on unrelated accounts sharing the same","bank do not interfere with an in-progress liquidation."],"type":"u8"},{"name":"_padding","type":{"array":["u8",23]}},{"name":"liquidation_price_rt","docs":["Cached real-time price for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_price_rt_confidence","docs":["Cached real-time price confidence for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_price_twap","docs":["Cached TWAP price for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liquidation_price_twap_confidence","docs":["Cached TWAP price confidence for receivership liquidation."],"type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"BankConfig","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_weight_init","docs":["Discount factor for asset values in initial margin calculation (0 to 1).","E.g., 0.8 means assets count as 80% of their value for borrowing purposes."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","docs":["Discount factor for asset values in maintenance margin calculation (0 to 2).","Used for liquidation eligibility. Generally >= asset_weight_init."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_init","docs":["Premium factor for liability values in initial margin calculation (>= 1).","E.g., 1.2 means liabilities count as 120% of their value for borrowing purposes."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_maint","docs":["Premium factor for liability values in maintenance margin calculation (>= 1).","Used for liquidation eligibility. Generally <= liability_weight_init."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","docs":["Maximum total deposits allowed in this bank, in native token units (0 = no limit)"],"type":"u64"},{"name":"interest_rate_config","docs":["Interest rate model configuration"],"type":{"defined":{"name":"InterestRateConfig"}}},{"name":"operational_state","docs":["Current operational state of the bank (Paused, Operational, ReduceOnly, KilledByBankruptcy)"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"oracle_setup","docs":["Oracle type used for price feeds"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"oracle_keys","docs":["Oracle account keys (usage depends on oracle_setup type)"],"type":{"array":["pubkey",5]}},{"name":"_pad0","type":{"array":["u8",6]}},{"name":"borrow_limit","docs":["Maximum total borrows allowed in this bank, in native token units (0 = no limit)"],"type":"u64"},{"name":"risk_tier","docs":["Risk tier for this bank (Collateral or Isolated)"],"type":{"defined":{"name":"RiskTier"}}},{"name":"asset_tag","docs":["Determines what kinds of assets users of this bank can interact with. Options:","* `ASSET_TAG_DEFAULT` (0) - A regular asset that can be comingled with any other regular","asset or with `ASSET_TAG_SOL`","* `ASSET_TAG_SOL` (1) - Accounts with a SOL position can comingle with **either**","`ASSET_TAG_DEFAULT` or `ASSET_TAG_STAKED` positions, but not both","* `ASSET_TAG_STAKED` (2) - Staked SOL assets. Accounts with a STAKED position can only","deposit other STAKED assets or SOL (`ASSET_TAG_SOL`) and can only borrow SOL","* `ASSET_TAG_KAMINO` (3) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_DRIFT` (4) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_SOLEND` (5) - Treated the same as `ASSET_TAG_DEFAULT`"],"type":"u8"},{"name":"config_flags","docs":["Flags for various config options","* 1 - Always set if bank created in 0.1.4 or later, or if migrated to the new pyth oracle","setup from a prior version. Not set in 0.1.3 or earlier banks using pyth that have not yet","migrated. Does nothing for banks that use switchboard.","* 2, 4, 8, 16, etc - reserved for future use."],"type":"u8"},{"name":"_pad1","type":{"array":["u8",5]}},{"name":"total_asset_value_init_limit","docs":["USD denominated limit for calculating asset value for initialization margin requirements.","Example, if total SOL deposits are equal to $1M and the limit it set to $500K, then SOL","assets will be discounted by 50%.","","In other words the max value of liabilities that can be backed by the asset is $500K. This","is useful for limiting the damage of oracle attacks.","","Value is UI USD value, for example value 100 -> $100"],"type":"u64"},{"name":"oracle_max_age","docs":["Time window in seconds for the oracle price feed to be considered live."],"type":"u16"},{"name":"_padding0","type":{"array":["u8",2]}},{"name":"oracle_max_confidence","docs":["From 0-100%, if the confidence exceeds this value, the oracle is considered invalid. Note:","the confidence adjustment is capped at 5% regardless of this value.","* 0 falls back to using the default 10% instead, i.e., U32_MAX_DIV_10","* A %, as u32, e.g. 100% = u32::MAX, 50% = u32::MAX/2, etc."],"type":"u32"},{"name":"fixed_price","docs":["Stored oracle price for `OracleSetup::Fixed`, otherwise does nothing"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"_padding1","type":{"array":["u8",16]}}]}},{"name":"BankConfigCompact","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"interest_rate_config","type":{"defined":{"name":"InterestRateConfigCompact"}}},{"name":"operational_state","type":{"defined":{"name":"BankOperationalState"}}},{"name":"borrow_limit","type":"u64"},{"name":"risk_tier","type":{"defined":{"name":"RiskTier"}}},{"name":"asset_tag","docs":["Determines what kinds of assets users of this bank can interact with. Options:","* `ASSET_TAG_DEFAULT` (0) - A regular asset that can be comingled with any other regular","asset or with `ASSET_TAG_SOL`","* `ASSET_TAG_SOL` (1) - Accounts with a SOL position can comingle with **either**","`ASSET_TAG_DEFAULT` or `ASSET_TAG_STAKED` positions, but not both","* `ASSET_TAG_STAKED` (2) - Staked SOL assets. Accounts with a STAKED position can only","deposit other STAKED assets or SOL (`ASSET_TAG_SOL`) and can only borrow SOL","* `ASSET_TAG_KAMINO` (3) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_DRIFT` (4) - Treated the same as `ASSET_TAG_DEFAULT`","* `ASSET_TAG_SOLEND` (5) - Treated the same as `ASSET_TAG_DEFAULT`"],"type":"u8"},{"name":"config_flags","docs":["Flags for various config options","* 1 - Always set if bank created in 0.1.4 or later, or if migrated to the new oracle setup","from a prior version. Not set in 0.1.3 or earlier banks that have not yet migrated.","* 2, 4, 8, 16, etc - reserved for future use."],"type":"u8"},{"name":"_pad0","type":{"array":["u8",5]}},{"name":"total_asset_value_init_limit","docs":["USD denominated limit for calculating asset value for initialization margin requirements.","Example, if total SOL deposits are equal to $1M and the limit it set to $500K, then SOL","assets will be discounted by 50%.","","In other words the max value of liabilities that can be backed by the asset is $500K. This","is useful for limiting the damage of oracle attacks.","","Value is UI USD value, for example value 100 -> $100"],"type":"u64"},{"name":"oracle_max_age","docs":["Time window in seconds for the oracle price feed to be considered live."],"type":"u16"},{"name":"oracle_max_confidence","docs":["From 0-100%, if the confidence exceeds this value, the oracle is considered invalid. Note:","the confidence adjustment is capped at 5% regardless of this value.","* 0% = use the default (10%)","* A %, as u32, e.g. 100% = u32::MAX, 50% = u32::MAX/2, etc."],"type":"u32"}]}},{"name":"BankConfigOpt","type":{"kind":"struct","fields":[{"name":"asset_weight_init","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"asset_weight_maint","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"liability_weight_init","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"liability_weight_maint","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"deposit_limit","type":{"option":"u64"}},{"name":"borrow_limit","type":{"option":"u64"}},{"name":"operational_state","type":{"option":{"defined":{"name":"BankOperationalState"}}}},{"name":"interest_rate_config","type":{"option":{"defined":{"name":"InterestRateConfigOpt"}}}},{"name":"risk_tier","type":{"option":{"defined":{"name":"RiskTier"}}}},{"name":"asset_tag","type":{"option":"u8"}},{"name":"total_asset_value_init_limit","type":{"option":"u64"}},{"name":"oracle_max_confidence","type":{"option":"u32"}},{"name":"oracle_max_age","type":{"option":"u16"}},{"name":"permissionless_bad_debt_settlement","type":{"option":"bool"}},{"name":"freeze_settings","type":{"option":"bool"}},{"name":"tokenless_repayments_allowed","type":{"option":"bool"}}]}},{"name":"BankMetadata","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bank","docs":["Bank this metadata corresponds to"],"type":"pubkey"},{"name":"placeholder","type":"u64"},{"name":"ticker","docs":["The token's ticker name, e.g. USDC","* utf-8"],"type":{"array":["u8",64]}},{"name":"description","docs":["The token's plain english description, e.g US Dollar Coin","* utf-8"],"type":{"array":["u8",128]}},{"name":"data_blob","docs":["Reserved for future use. Room for a very small icon or something else cool"],"type":{"array":["u8",256]}},{"name":"end_description_byte","docs":["The last data byte in description (padding follows)"],"type":"u16"},{"name":"end_data_blob","docs":["The last data byte in data_blob (padding follows)"],"type":"u16"},{"name":"end_ticker_byte","docs":["The last data byte in ticker (padding follows)"],"type":"u8"},{"name":"bump","type":"u8"},{"name":"_pad0","type":{"array":["u8",2]}}]}},{"name":"BankOperationalState","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Operational"},{"name":"ReduceOnly"},{"name":"KilledByBankruptcy"}]}},{"name":"BankRateLimiter","docs":["Per-bank rate limiting configuration and state.","Tracks net outflow in native tokens."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"hourly","docs":["Hourly window rate limiter (native tokens)."],"type":{"defined":{"name":"RateLimitWindow"}}},{"name":"daily","docs":["Daily window rate limiter (native tokens)."],"type":{"defined":{"name":"RateLimitWindow"}}}]}},{"name":"DeleverageEvent","type":{"kind":"struct","fields":[{"name":"marginfi_account","type":"pubkey"},{"name":"risk_admin","type":"pubkey"},{"name":"deleveragee_assets_seized","type":"f64"},{"name":"deleveragee_liability_repaid","type":"f64"}]}},{"name":"DeleverageWithdrawFlowEvent","docs":["Emitted for deleverage-only withdraw outflows.","The delegate flow admin aggregates these off-chain and","updates the deleverage daily withdraws via `update_deleverage_withdrawals`."],"type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"outflow_usd","docs":["Equity-denominated outflow value in USD, rounded to integer."],"type":"u32"},{"name":"current_timestamp","docs":["Unix timestamp when the flow was recorded"],"type":"i64"}]}},{"name":"DriftConfigCompact","docs":["Used to configure Drift banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since Drift banks cannot earn interest or be borrowed against."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `DriftPythPull` or `DriftSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"operational_state","docs":["Bank operational state - allows starting banks in paused state"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"risk_tier","docs":["Risk tier - determines if assets can be borrowed in isolation"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing"],"type":"u8"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"EditStakedSettingsEvent","type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"settings","type":{"defined":{"name":"StakedSettingsEditConfig"}}}]}},{"name":"EmodeConfig","docs":["An emode configuration. Each bank has one such configuration, but this may also be the","intersection of many configurations (see `reconcile_emode_configs`). For example, the risk","engine creates such an intersection from all the emode config of all banks the user is borrowing","from."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"entries","type":{"array":[{"defined":{"name":"EmodeEntry"}},10]}}]}},{"name":"EmodeEntry","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"collateral_bank_emode_tag","docs":["emode_tag of the bank(s) whose collateral you wish to treat preferentially."],"type":"u16"},{"name":"flags","docs":["* APPLIES_TO_ISOLATED (1) - (NOT YET IMPLEMENTED) if set, isolated banks with this tag","also benefit. If not set, isolated banks continue to offer zero collateral, even if they","use this tag.","* 2, 4, 8, 16, 32, etc - reserved for future use"],"type":"u8"},{"name":"pad0","type":{"array":["u8",5]}},{"name":"asset_weight_init","docs":["Note: If set below the collateral bank's weight, does nothing."],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","docs":["Note: If set below the collateral bank's weight, does nothing."],"type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"EmodeSettings","docs":["Controls the bank's e-mode configuration, allowing certain collateral sources to be treated more","favorably as collateral when used to borrow from this bank."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"emode_tag","docs":["This bank's NON-unique id that other banks will use to determine what emode rate to use when","this bank is offered as collateral.","","For example, all stablecoin banks might share the same emode_tag, and in their entries, each","such stablecoin bank will recognize that collateral sources with this \"stable\" tag get","preferential weights. When a new stablecoin is added that is considered riskier, it may get","a new, less favorable emode tag, and eventually get upgraded to the same one as the other","stables","","* 0 is in an invalid tag and will do nothing."],"type":"u16"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"timestamp","docs":["Unix timestamp from the system clock when emode state was last updated"],"type":"i64"},{"name":"flags","docs":["EMODE_ON (1) - If set, at least one entry is configured","2, 4, 8, etc, Reserved for future use"],"type":"u64"},{"name":"emode_config","type":{"defined":{"name":"EmodeConfig"}}}]}},{"name":"ExecuteOrderBalanceRecord","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bank","type":"pubkey"},{"name":"is_asset","type":"u8"},{"name":"_pad0","type":{"array":["u8",5]}},{"name":"tag","type":"u16"},{"name":"shares","type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"ExecuteOrderRecord","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"order","type":"pubkey"},{"name":"executor","type":"pubkey"},{"name":"balance_states","type":{"array":[{"defined":{"name":"ExecuteOrderBalanceRecord"}},14]}},{"name":"active_balance_count","type":"u8"},{"name":"inactive_balance_count","type":"u8"},{"name":"_reserved0","type":{"array":["u8",6]}},{"name":"order_start_health","type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"FeeState","docs":["Unique per-program. The Program Owner uses this account to administrate fees collected by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"key","docs":["The fee state's own key. A PDA derived from just `b\"feestate\"`"],"type":"pubkey"},{"name":"global_fee_admin","docs":["Can modify fees"],"type":"pubkey"},{"name":"global_fee_wallet","docs":["The base wallet for all protocol fees. All SOL fees go to this wallet. All non-SOL fees go","to the cannonical ATA of this wallet for that asset."],"type":"pubkey"},{"name":"placeholder0","type":"u64"},{"name":"bank_init_flat_sol_fee","docs":["Flat fee assessed when a new bank is initialized, in lamports.","* In SOL, in native decimals."],"type":"u32"},{"name":"bump_seed","type":"u8"},{"name":"_padding0","type":{"array":["u8",3]}},{"name":"liquidation_max_fee","docs":["Liquidators can claim at this premium, when liquidating an asset in receivership","liquidation, e.g. (1 + this) * amount repaid >= asset seized","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_fixed","docs":["Fee collected by the program owner from all groups","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","docs":["Fee collected by the program owner from all groups","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"panic_state","docs":["When the global admin pauses the protocol in the event of an emergency, information about","the pause duration will be stored here and propagated to groups."],"type":{"defined":{"name":"PanicState"}}},{"name":"placeholder1","type":"u64"},{"name":"liquidation_flat_sol_fee","docs":["Flat fee assessed for insurance/program use when a liquidation is executed","* In SOL, in native decimals."],"type":"u32"},{"name":"order_init_flat_sol_fee","docs":["Flat fee assessed for preventing spam use when creating an order","* In SOL, in native decimals."],"type":"u32"},{"name":"order_execution_max_fee","docs":["Take-profit Orders can be executed at this premium, which Keepers are allowed to keep (no","pun intended) e.g. (1 + this) * amount repaid >= asset seized","* A percentage"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"_reserved1","type":{"array":["u8",32]}}]}},{"name":"FeeStateCache","docs":["Cached fee configuration propagated from the global FeeState"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"global_fee_wallet","docs":["The wallet that receives program-level fees"],"type":"pubkey"},{"name":"program_fee_fixed","docs":["Fixed fee APR charged to borrowers (program-level)"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"program_fee_rate","docs":["Proportional fee rate on interest (program-level)"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"last_update","docs":["Unix timestamp of the last fee state propagation"],"type":"i64"}]}},{"name":"GroupEventHeader","type":{"kind":"struct","fields":[{"name":"signer","type":{"option":"pubkey"}},{"name":"marginfi_group","type":"pubkey"}]}},{"name":"GroupRateLimiter","docs":["Per-group rate limiting configuration and state.","Tracks aggregate net outflow in USD."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"hourly","docs":["Hourly window rate limiter (USD)."],"type":{"defined":{"name":"RateLimitWindow"}}},{"name":"daily","docs":["Daily window rate limiter (USD)."],"type":{"defined":{"name":"RateLimitWindow"}}}]}},{"name":"HealthCache","docs":["A read-only cache of the internal risk engine's information. Only valid in borrow/withdraw if","the tx does not fail. To see the state in any context, e.g. to figure out if the risk engine is","failing due to some bad price information, use `pulse_health`."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_value","docs":["Internal risk engine asset value, using initial weight (e.g. what is used for borrowing","purposes), with all confidence adjustments, and other discounts on price.","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value","docs":["Internal risk engine liability value, using initial weight (e.g. what is used for borrowing","purposes), with all confidence adjustments, and other discounts on price.","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_value_maint","docs":["Internal risk engine asset value, using maintenance weight (e.g. what is used for","liquidation purposes), with all confidence adjustments.","* Zero if the risk engine failed to load","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_maint","docs":["Internal risk engine liability value, using maintenance weight (e.g. what is used for","liquidation purposes), with all confidence adjustments.","* Zero if the risk engine failed to load","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_value_equity","docs":["The \"true\" value of assets without any confidence or weight adjustments. Internally, used","only for bankruptcies.","* Zero if the risk engine failed to load","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_equity","docs":["The \"true\" value of liabilities without any confidence or weight adjustments.","Internally, used only for bankruptcies.","* Zero if the risk engine failed to load","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"timestamp","docs":["Unix timestamp from the system clock when this cache was last updated"],"type":"i64"},{"name":"flags","docs":["The flags that indicate the state of the health cache. This is a u32 bitfield, where each","bit represents a flag.","","* HEALTHY = 1 - If set, the account cannot be liquidated. If 0, the account is unhealthy and","can be liquidated.","* ENGINE STATUS = 2 - If set, the engine did not error during the last health pulse. If 0,","the engine would have errored and this cache is likely invalid. `RiskEngineInitRejected`","is ignored and will allow the flag to be set anyways.","* ORACLE OK = 4 - If set, the engine did not error due to an oracle issue. If 0, engine was","passed a bad bank or oracle account, or an oracle was stale. Check the order in which","accounts were passed and ensure each balance has the correct banks/oracles, and that","oracle cranks ran recently enough. Check `internal_err` and `err_index` for more details","in some circumstances. Invalid if generated after borrow/withdraw (these instructions will","ignore oracle issues if health is still satisfactory with some balance zeroed out).","* 8, 16, 32, 64, 128, etc - reserved for future use"],"type":"u32"},{"name":"mrgn_err","docs":["If the engine errored, look here for the error code. If the engine returns ok, you may also","check here to see if the risk engine rejected this tx (3009)."],"type":"u32"},{"name":"prices","docs":["Each price corresponds to that index of Balances in the LendingAccount. Useful for debugging","or liquidator consumption, to determine how a user's position is priced internally.","* An f64 stored as bytes"],"type":{"array":[{"array":["u8",8]},16]}},{"name":"internal_err","docs":["Errors in asset oracles are ignored (with prices treated as zero). If you see a zero price","and the `ORACLE_OK` flag is not set, check here to see what error was ignored internally."],"type":"u32"},{"name":"err_index","docs":["Index in `balances` where `internal_err` appeared"],"type":"u8"},{"name":"program_version","docs":["Since 0.1.3, the version will be encoded here. See PROGRAM_VERSION."],"type":"u8"},{"name":"pad0","type":{"array":["u8",2]}},{"name":"internal_liq_err","docs":["Error code from the liquidation health check during the last health pulse (0 if none)"],"type":"u32"},{"name":"internal_bankruptcy_err","docs":["Error code from the bankruptcy check during the last health pulse (0 if none)"],"type":"u32"},{"name":"reserved0","type":{"array":["u8",32]}},{"name":"reserved1","type":{"array":["u8",16]}}]}},{"name":"HealthPulseEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"health_cache","type":{"defined":{"name":"HealthCache"}}}]}},{"name":"InterestRateConfig","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"optimal_utilization_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"plateau_interest_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_interest_rate","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"insurance_fee_fixed_apr","docs":["Goes to insurance, funds `collected_insurance_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"insurance_ir_fee","docs":["Goes to insurance, funds `collected_insurance_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_fixed_fee_apr","docs":["Earned by the group, goes to `collected_group_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_ir_fee","docs":["Earned by the group, goes to `collected_group_fees_outstanding`"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_origination_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"zero_util_rate","docs":["The base rate at utilization = 0","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"hundred_util_rate","docs":["The base rate at utilization = 100","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"points","docs":["The base rate at various points between 0 and 100%, exclusive. Essentially a piece-wise","linear curve.","* always in ascending order, e.g. points[0] = first kink point, points[1] = second kink","point, and so forth.","* points where util = 0 are unused"],"type":{"array":[{"defined":{"name":"RatePoint"}},5]}},{"name":"curve_type","docs":["Determines which interest rate curve implementation is active. 0 (INTEREST_CURVE_LEGACY) =","legacy three point curve, 1 (INTEREST_CURVE_SEVEN_POINT) = multi-point curve."],"type":"u8"},{"name":"_pad0","type":{"array":["u8",7]}},{"name":"_padding1","type":{"array":["u8",32]}},{"name":"_padding2","type":{"array":["u8",16]}},{"name":"_padding3","type":{"array":["u8",8]}}]}},{"name":"InterestRateConfigCompact","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"insurance_fee_fixed_apr","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"insurance_ir_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_fixed_fee_apr","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_ir_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"protocol_origination_fee","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"zero_util_rate","docs":["The base rate at utilization = 0","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"hundred_util_rate","docs":["The base rate at utilization = 100","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"},{"name":"points","docs":["The base rate at various points between 0 and 100%, exclusive. Essentially a piece-wise","linear curve.","* always in ascending order, e.g. points[0] = first kink point, points[1] = second kink","point, and so forth.","* points where util = 0 are unused"],"type":{"array":[{"defined":{"name":"RatePoint"}},5]}}]}},{"name":"InterestRateConfigOpt","type":{"kind":"struct","fields":[{"name":"insurance_fee_fixed_apr","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"insurance_ir_fee","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"protocol_fixed_fee_apr","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"protocol_ir_fee","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"protocol_origination_fee","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"zero_util_rate","docs":["The base rate at utilization = 0","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":{"option":"u32"}},{"name":"hundred_util_rate","docs":["The base rate at utilization = 100","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":{"option":"u32"}},{"name":"points","docs":["The base rate at various points between 0 and 100%, exclusive. Essentially a piece-wise","linear curve.","* always in ascending order, e.g. points[0] = first kink point, points[1] = second kink","point, and so forth.","* points where util = 0 are unused"],"type":{"option":{"array":[{"defined":{"name":"RatePoint"}},5]}}}]}},{"name":"JuplendConfigCompact","docs":["Used to configure JupLend banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since JupLend banks cannot earn interest or be borrowed against.","","Note: JupLend banks do not take an Operational State, they always start in `Paused` state and","are set to `Operational` via `juplend_init_position` (seed deposit + protocol fToken vault)."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `JuplendPythPull` or `JuplendSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"risk_tier","docs":["Isolated or Collateral"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing, currently ignored"],"type":"u8"},{"name":"total_asset_value_init_limit","docs":["In $"],"type":"u64"},{"name":"oracle_max_age","docs":["In seconds"],"type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"KaminoConfigCompact","docs":["Used to configure Kamino banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since Kamino banks cannot earn interest or be borrowed against."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `KaminoPythPush` or `KaminoSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"operational_state","docs":["Bank operational state - allows starting banks in paused state"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"risk_tier","docs":["Risk tier - determines if assets can be borrowed in isolation"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing"],"type":"u8"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","docs":["Currently unused: Kamino's oracle age applies to kamino banks."],"type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"KeeperCloseOrderEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"order","type":"pubkey"}]}},{"name":"Lending","docs":["Minimal representation of the on-chain JupLend `Lending` account.","","Notes:","- We intentionally use a **zero-copy** layout here to match how other integrations load large","external accounts (and to avoid paying Borsh (de)serialization cost on every access).","- `repr(C, packed)` keeps the byte layout identical to a field-by-field serialization","(i.e. no implicit padding). This is important because `Pubkey` has alignment=1 while `u64`","has alignment=8; using plain `repr(C)` would insert padding before the first `u64`."],"serialization":"bytemuck","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"f_token_mint","type":"pubkey"},{"name":"lending_id","type":"u16"},{"name":"decimals","docs":["number of decimals for the fToken, same as underlying mint"],"type":"u8"},{"name":"rewards_rate_model","docs":["PDA of rewards rate model (LRRM)"],"type":"pubkey"},{"name":"liquidity_exchange_price","docs":["exchange price in the liquidity layer (no rewards)"],"type":"u64"},{"name":"token_exchange_price","docs":["exchange price between fToken and underlying (with rewards)"],"type":"u64"},{"name":"last_update_timestamp","docs":["unix timestamp when exchange prices were updated last"],"type":"u64"},{"name":"token_reserves_liquidity","type":"pubkey"},{"name":"supply_position_on_liquidity","type":"pubkey"},{"name":"bump","type":"u8"}]}},{"name":"LendingAccount","docs":["The lending account holds up to 16 balance positions for a user."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"balances","docs":["Array of balance positions (max 16). Sorted in descending order by bank_pk."],"type":{"array":[{"defined":{"name":"Balance"}},16]}},{"name":"last_tag_used","docs":["Last allocated balance tag (u16), used to find the next unused tag."],"type":"u16"},{"name":"_pad1","docs":["Reserved for future use"],"type":{"array":["u8",6]}},{"name":"_padding","docs":["Reserved for future use"],"type":{"array":["u64",7]}}]}},{"name":"LendingAccountBorrowEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"LendingAccountDepositEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"LendingAccountLiquidateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"liquidatee_marginfi_account","type":"pubkey"},{"name":"liquidatee_marginfi_account_authority","type":"pubkey"},{"name":"asset_bank","type":"pubkey"},{"name":"asset_mint","type":"pubkey"},{"name":"liability_bank","type":"pubkey"},{"name":"liability_mint","type":"pubkey"},{"name":"liquidatee_pre_health","type":"f64"},{"name":"liquidatee_post_health","type":"f64"},{"name":"pre_balances","type":{"defined":{"name":"LiquidationBalances"}}},{"name":"post_balances","type":{"defined":{"name":"LiquidationBalances"}}}]}},{"name":"LendingAccountRepayEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"close_balance","type":"bool"}]}},{"name":"LendingAccountWithdrawEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"close_balance","type":"bool"}]}},{"name":"LendingPoolBankAccrueInterestEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"delta","type":"u64"},{"name":"fees_collected","type":"f64"},{"name":"insurance_collected","type":"f64"}]}},{"name":"LendingPoolBankCollectFeesEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"group_fees_collected","type":"f64"},{"name":"group_fees_outstanding","type":"f64"},{"name":"insurance_fees_collected","type":"f64"},{"name":"insurance_fees_outstanding","type":"f64"}]}},{"name":"LendingPoolBankConfigureEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"config","type":{"defined":{"name":"BankConfigOpt"}}}]}},{"name":"LendingPoolBankConfigureFrozenEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"deposit_limit","type":"u64"},{"name":"borrow_limit","type":"u64"}]}},{"name":"LendingPoolBankConfigureOracleEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"oracle_setup","type":"u8"},{"name":"oracle","type":"pubkey"}]}},{"name":"LendingPoolBankCreateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"LendingPoolBankHandleBankruptcyEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"bad_debt","type":"f64"},{"name":"covered_amount","type":"f64"},{"name":"socialized_amount","type":"f64"}]}},{"name":"LendingPoolBankSetFixedOraclePriceEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"price","type":{"defined":{"name":"WrappedI80F48"}}}]}},{"name":"LendingPoolSuperAdminDepositEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"transfer_amount","docs":["Amount requested in SPL transfer instruction."],"type":"u64"},{"name":"vault_inflow_amount","docs":["Assumed vault inflow. Token-2022 transfer fees are not handled by this instruction path."],"type":"u64"}]}},{"name":"LendingPoolSuperAdminWithdrawEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"vault_outflow_amount","type":"u64"}]}},{"name":"LiquidationBalances","type":{"kind":"struct","fields":[{"name":"liquidatee_asset_balance","type":"f64"},{"name":"liquidatee_liability_balance","type":"f64"},{"name":"liquidator_asset_balance","type":"f64"},{"name":"liquidator_liability_balance","type":"f64"}]}},{"name":"LiquidationCache","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_value_maint","docs":["Internal risk engine asset value snapshot taken when liquidation begins, using maintenance","weight with all confidence adjustments.","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_maint","docs":["Internal risk engine liability value snapshot taken when liquidation begins, using","maintenance weight with all confidence adjustments.","* Uses SPOT price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_value_equity","docs":["Actual cash value of assets pre-liquidation (inclusive of price adjustment for oracle","confidence, but without any weights)","* Liquidator is allowed to seize up to `liability_value_equity` - this amount","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"liability_value_equity","docs":["Actual cash value of liabilities pre-liquidation (inclusive of price adjustment for oracle","confidence, but without any weights)","* Liquidator is allowed to seize up to this amount - `asset_value_equity`","* Uses EMA price","* In dollars"],"type":{"defined":{"name":"WrappedI80F48"}}},{"name":"_placeholder","type":"u64"},{"name":"_reserved0","type":{"array":["u8",32]}}]}},{"name":"LiquidationEntry","docs":["Used to record key details of the last few liquidation events on the account"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"asset_amount_seized","docs":["Dollar amount seized","* An f64 stored as bytes"],"type":{"array":["u8",8]}},{"name":"liab_amount_repaid","docs":["Dollar amount repaid","* An f64 stored as bytes"],"type":{"array":["u8",8]}},{"name":"placeholder0","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"_reserved0","type":{"array":["u8",16]}}]}},{"name":"LiquidationReceiverEvent","type":{"kind":"struct","fields":[{"name":"marginfi_account","type":"pubkey"},{"name":"liquidation_receiver","type":"pubkey"},{"name":"liquidatee_assets_seized","type":"f64"},{"name":"liquidatee_liability_repaid","type":"f64"},{"name":"lamps_fee_paid","type":"u32"}]}},{"name":"LiquidationRecord","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"key","docs":["This account's own key. A PDA derived from `marginfi_account`"],"type":"pubkey"},{"name":"marginfi_account","docs":["Account this record tracks"],"type":"pubkey"},{"name":"record_payer","docs":["The key that paid to create this account. At some point, we may allow this wallet to reclaim","the rent paid to open a record."],"type":"pubkey"},{"name":"liquidation_receiver","docs":["The liquidator taking receivership of the `marginfi_account` to complete a liquidation. Pays","the liquidation fee.","* Always pubkey default unless actively within a liquidation event."],"type":"pubkey"},{"name":"entries","docs":["Basic historical data for the last few liquidation events on this account"],"type":{"array":[{"defined":{"name":"LiquidationEntry"}},4]}},{"name":"cache","type":{"defined":{"name":"LiquidationCache"}}},{"name":"_reserved0","type":{"array":["u8",64]}},{"name":"_reserved2","type":{"array":["u8",16]}},{"name":"_reserved3","type":{"array":["u8",8]}}]}},{"name":"MarginfiAccount","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"lending_account","type":{"defined":{"name":"LendingAccount"}}},{"name":"account_flags","docs":["The flags that indicate the state of the account. This is u64 bitfield, where each bit","represents a flag.","","Flags:MarginfiAccount","- 1: `ACCOUNT_DISABLED` - Indicates that the account is disabled and no further actions can","be taken on it.","- 2: `ACCOUNT_IN_FLASHLOAN` - Only set when an account is within a flash loan, e.g. when","start_flashloan is called, then unset when the flashloan ends.","- 4: `ACCOUNT_FLAG_DEPRECATED` - Deprecated, available for future use","- 8: `ACCOUNT_TRANSFER_AUTHORITY_DEPRECATED` - the admin has flagged with account to be","moved, original owner can now call `set_account_transfer_authority`","- 16: `ACCOUNT_IN_RECEIVERSHIP` - the account is eligible to be liquidated and has entered","receivership, a liquidator is able to control borrows and withdraws until the end of the","tx. This flag will only appear within a tx.","- 32: `ACCOUNT_IN_DELEVERAGE - the account is being deleveraged by the risk admin","- 64: `ACCOUNT_FROZEN` - the admin has frozen the account; only the group admin may perform","actions until unfrozen."],"type":"u64"},{"name":"emissions_destination_account","docs":["Wallet whose canonical ATA receives off-chain emissions distributions."],"type":"pubkey"},{"name":"health_cache","type":{"defined":{"name":"HealthCache"}}},{"name":"migrated_from","docs":["If this account was migrated from another one, store the original account key"],"type":"pubkey"},{"name":"migrated_to","docs":["If this account has been migrated to another one, store the destination account key"],"type":"pubkey"},{"name":"last_update","docs":["Unix timestamp (u64) of the last account interaction. Note: Bank.last_update uses i64."],"type":"u64"},{"name":"account_index","docs":["If a PDA-based account, the account index, a seed used to derive the PDA that can be chosen","arbitrarily (0.1.5 or later). Otherwise, does nothing."],"type":"u16"},{"name":"third_party_index","docs":["If a PDA-based account (0.1.5 or later), a \"vendor specific\" id. Values < PDA_FREE_THRESHOLD","can be used by anyone with no restrictions. Values >= PDA_FREE_THRESHOLD can only be used by","a particular program via CPI. These values require being added to a list, contact us for","more details. For legacy non-pda accounts, does nothing.","","Note: use a unique seed to tag accounts related to some particular program or campaign so","you can easily fetch them all later."],"type":"u16"},{"name":"bump","docs":["This account's bump, if a PDA-based account (0.1.5 or later). Otherwise, does nothing."],"type":"u8"},{"name":"_pad0","type":{"array":["u8",3]}},{"name":"liquidation_record","docs":["Stores information related to liquidations made against this account. A pda of this","account's key, and \"liq_record\"","* Typically pubkey default if this account has never been liquidated or close to liquidation","* Opening this account is permissionless. Typically the liquidator pays, but e.g. we may","also charge the user if they are opening a risky position on the front end."],"type":"pubkey"},{"name":"_padding0","type":{"array":["u64",7]}}]}},{"name":"MarginfiAccountCloseOrderEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"order","type":"pubkey"}]}},{"name":"MarginfiAccountCreateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}}]}},{"name":"MarginfiAccountFreezeEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"frozen","type":"bool"}]}},{"name":"MarginfiAccountPlaceOrderEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"order","type":"pubkey"},{"name":"trigger","type":{"defined":{"name":"OrderTriggerType"}}},{"name":"stop_loss","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"take_profit","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"tags","type":{"array":["u16",2]}}]}},{"name":"MarginfiAccountTransferToNewAccount","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"old_account","type":"pubkey"},{"name":"old_account_authority","type":"pubkey"},{"name":"new_account_authority","type":"pubkey"}]}},{"name":"MarginfiGroup","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"admin","docs":["Broadly able to modify anything, and can set/remove other admins at will."],"type":"pubkey"},{"name":"group_flags","docs":["Bitmask for group settings flags.","* Bit 0 (1): `PROGRAM_FEES_ENABLED` — If set, program-level fees are enabled.","* Bits 1-63: Reserved for future use."],"type":"u64"},{"name":"fee_state_cache","docs":["Caches information from the global `FeeState` so the FeeState can be omitted on certain ixes"],"type":{"defined":{"name":"FeeStateCache"}}},{"name":"banks","docs":["For groups initialized in versions 0.1.2 or greater, this is an authoritative count","of the number of banks under this group. For groups initialized prior to 0.1.2,","a non-authoritative count of the number of banks initiated after 0.1.2 went live."],"type":"u16"},{"name":"pad0","type":{"array":["u8",6]}},{"name":"emode_admin","docs":["This admin can configure collateral ratios above (but not below) the collateral ratio of","certain banks, e.g. allow SOL to count as 90% collateral when borrowing an LST instead of","the default rate."],"type":"pubkey"},{"name":"delegate_curve_admin","docs":["Can modify the fields in `config.interest_rate_config` but nothing else, for every bank","under this group"],"type":"pubkey"},{"name":"delegate_limit_admin","docs":["Can modify the `deposit_limit`, `borrow_limit`, `total_asset_value_init_limit` but nothing","else, for every bank under this group"],"type":"pubkey"},{"name":"delegate_emissions_admin","docs":["Can modify the emissions `flags`, `emissions_rate` and `emissions_mint`, but nothing else,","for every bank under this group"],"type":"pubkey"},{"name":"panic_state_cache","docs":["When program keeper temporarily puts the program into panic mode, information about the","duration of the lockup will be available here."],"type":{"defined":{"name":"PanicStateCache"}}},{"name":"deleverage_withdraw_window_cache","docs":["Keeps track of the liquidity withdrawn from the group over the day as a result of","deleverages. Used as a protection mechanism against too big (and unwanted) withdrawals (e.g.","when the risk admin is compromised)."],"type":{"defined":{"name":"WithdrawWindowCache"}}},{"name":"risk_admin","docs":["Can run bankruptcy and forced deleverage ixes to e.g. sunset risky/illiquid assets"],"type":"pubkey"},{"name":"metadata_admin","docs":["Can modify a Bank's metadata, and nothing else."],"type":"pubkey"},{"name":"emode_max_init_leverage","docs":["Maximum leverage allowed for emode positions (initial margin), stored as u32 basis.","Use `u32_to_basis` to convert to I80F48. Range: 1-100."],"type":"u32"},{"name":"emode_max_maint_leverage","docs":["Maximum leverage allowed for emode positions (maintenance margin), stored as u32 basis.","Must be > emode_max_init_leverage. Range: 1-100."],"type":"u32"},{"name":"_padding","docs":["Reserved for future use"],"type":{"array":["u8",8]}},{"name":"rate_limiter","docs":["Rate limiter for controlling aggregate withdraw/borrow outflow across all banks.","Tracks net outflow in USD."],"type":{"defined":{"name":"GroupRateLimiter"}}},{"name":"rate_limiter_last_admin_update_slot","docs":["Last slot covered by an admin group rate limiter aggregation update."],"type":"u64"},{"name":"rate_limiter_last_admin_update_seq","docs":["Monotonic sequence number for admin group rate limiter updates.","This is used to enforce strict ordering and prevent duplicate/replayed batches","when slot ranges overlap or multiple updates happen in the same slot."],"type":"u64"},{"name":"deleverage_withdraw_last_admin_update_slot","docs":["Last slot covered by an admin deleverage withdraw-limit aggregation update."],"type":"u64"},{"name":"deleverage_withdraw_last_admin_update_seq","docs":["Monotonic sequence number for admin deleverage withdraw-limit updates."],"type":"u64"},{"name":"delegate_flow_admin","docs":["Can modify flow-control status for the group, i.e. update the withdraw caches with flow","information from banks. Typically this is a hot wallet that lives in e.g. some cron job. If","compromised, flow control can be effectively disabled until the admin is restored, which","does not itself compromise any funds, and is merely annoying."],"type":"pubkey"},{"name":"_padding_0","type":{"array":[{"array":["u64",2]},2]}},{"name":"_padding_1","type":{"array":[{"array":["u64",2]},32]}}]}},{"name":"MarginfiGroupConfigureEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}},{"name":"admin","type":{"option":"pubkey"}},{"name":"flags","type":"u64"}]}},{"name":"MarginfiGroupCreateEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"GroupEventHeader"}}}]}},{"name":"MinimalObligation","docs":["A minimal copy of Kamino's Obligation for zero-copy deserialization"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"tag","type":"u64"},{"name":"last_update_slot","docs":["Kamino obligations are only good for one slot, e.g. `refresh_obligation` must have run within the","same slot as any ix that needs a non-stale obligation e.g. withdraw."],"type":"u64"},{"name":"last_update_stale","docs":["True if the obligation is stale, which will cause various ixes like withdraw to fail. Typically","set to true in any tx that modifies obligation balance, and set to false at the end of a","successful `refresh_obligation`","* 0 = false, 1 = true"],"type":"u8"},{"name":"last_update_price_status","docs":["Each bit represents a passed check in price status.","* 63 = all checks passed","","Otherwise:","* PRICE_LOADED = 0b_0000_0001; // 1","* PRICE_AGE_CHECKED = 0b_0000_0010; // 2","* TWAP_CHECKED = 0b_0000_0100; // 4","* TWAP_AGE_CHECKED = 0b_0000_1000; // 8","* HEURISTIC_CHECKED = 0b_0001_0000; // 16","* PRICE_USAGE_ALLOWED = 0b_0010_0000; // 32"],"type":"u8"},{"name":"last_update_placeholder","type":{"array":["u8",6]}},{"name":"lending_market","type":"pubkey"},{"name":"owner","docs":["For mrgn banks, the bank's Liquidity Vault Authority (a pda which can be derived if the bank","key is known)"],"type":"pubkey"},{"name":"deposits","type":{"array":[{"defined":{"name":"MinimalObligationCollateral"}},8]}},{"name":"lowest_reserve_deposit_liquidation_ltv","type":"u64"},{"name":"deposited_value_sf","type":{"array":["u8",16]}},{"name":"padding_part1","type":{"array":["u8",512]}},{"name":"padding_part2","type":{"array":["u8",512]}},{"name":"padding_part3","type":{"array":["u8",512]}},{"name":"padding_part4","type":{"array":["u8",512]}},{"name":"padding_part5a","type":{"array":["u8",64]}},{"name":"padding_part5c","type":{"array":["u8",24]}}]}},{"name":"MinimalObligationCollateral","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"deposit_reserve","type":"pubkey"},{"name":"deposited_amount","docs":["In collateral token (NOT liquidity token), use `collateral_to_liquidity` to convert back to","liquidity token!","* Always 6 decimals"],"type":"u64"},{"name":"market_value_sf","docs":["* In dollars, based on last oracle price update","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino.","* A float (arbitrary decimals)"],"type":{"array":["u8",16]}},{"name":"borrowed_amount_against_this_collateral_in_elevation_group","type":"u64"},{"name":"padding","type":{"array":["u64",9]}}]}},{"name":"MinimalReserve","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"version","type":"u64"},{"name":"slot","docs":["Kamino reserves are only good for one slot, e.g. `refresh_reserve` must have run within the","same slot as any ix that needs a non-stale reserve e.g. withdraw."],"type":"u64"},{"name":"stale","docs":["True if the reserve is stale, which will cause various ixes like withdraw to fail. Typically","set to true in any tx that modifies reserve balance, and set to false at the end of a","successful `refresh_reserve`","* 0 = false, 1 = true"],"type":"u8"},{"name":"price_status","docs":["Each bit represents a passed check in price status.","* 63 = all checks passed","","Otherwise:","* PRICE_LOADED = 0b_0000_0001; // 1","* PRICE_AGE_CHECKED = 0b_0000_0010; // 2","* TWAP_CHECKED = 0b_0000_0100; // 4","* TWAP_AGE_CHECKED = 0b_0000_1000; // 8","* HEURISTIC_CHECKED = 0b_0001_0000; // 16","* PRICE_USAGE_ALLOWED = 0b_0010_0000; // 32"],"type":"u8"},{"name":"placeholder","type":{"array":["u8",6]}},{"name":"lending_market","type":"pubkey"},{"name":"farm_collateral","type":"pubkey"},{"name":"farm_debt","type":"pubkey"},{"name":"mint_pubkey","type":"pubkey"},{"name":"supply_vault","docs":["* A PDA"],"type":"pubkey"},{"name":"fee_vault","docs":["* A PDA"],"type":"pubkey"},{"name":"available_amount","docs":["In simple terms: (amount in supply vault - outstanding borrows)","* In token, with `mint_decimals`"],"type":"u64"},{"name":"borrowed_amount_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"market_price_sf","docs":["* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"market_price_last_updated_ts","type":"u64"},{"name":"mint_decimals","type":"u64"},{"name":"deposit_limit_crossed_timestamp","type":"u64"},{"name":"borrow_limit_crossed_timestamp","type":"u64"},{"name":"cumulative_borrow_rate_bsf","type":{"array":["u8",48]}},{"name":"accumulated_protocol_fees_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"accumulated_referrer_fees_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"pending_referrer_fees_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"absolute_referral_rate_sf","docs":["* In token, with `mint_decimals`","* Actually an I68F60, stored as a u128 (i.e. BN) in Kamino."],"type":{"array":["u8",16]}},{"name":"token_program","docs":["Token or Token22. If token22, note that Kamino does not support all Token22 extensions."],"type":"pubkey"},{"name":"padding2_part1","type":{"array":["u8",256]}},{"name":"padding2_part2","type":{"array":["u8",128]}},{"name":"padding2_part3","type":{"array":["u8",24]}},{"name":"padding3","type":{"array":["u8",512]}},{"name":"padding_part1","type":{"array":["u8",512]}},{"name":"padding_part2","type":{"array":["u8",512]}},{"name":"padding_part3","type":{"array":["u8",128]}},{"name":"padding_part4","type":{"array":["u8",48]}},{"name":"collateral_mint_pubkey","docs":["Mints collateral tokens","* A PDA","* technically 6 decimals, but uses `mint_decimals` regardless for all purposes","* authority = lending_market_authority"],"type":"pubkey"},{"name":"mint_total_supply","docs":["Total number of collateral tokens","* uses `mint_decimals`, even though it's technically 6 decimals under the hood"],"type":"u64"},{"name":"collateral_supply_vault","docs":["* A PDA"],"type":"pubkey"},{"name":"padding1_reserve_collateral","type":{"array":["u8",512]}},{"name":"padding2_reserve_collateral","type":{"array":["u8",512]}},{"name":"padding4_part1","type":{"array":["u8",4096]}},{"name":"padding4_part2","type":{"array":["u8",512]}},{"name":"padding4_part3","type":{"array":["u8",256]}},{"name":"padding4_part4","type":{"array":["u8",64]}},{"name":"padding4_part5","type":{"array":["u8",32]}},{"name":"padding4_part6","type":{"array":["u8",8]}}]}},{"name":"MinimalSpotMarket","docs":["Minimal representation of Drift's SpotMarket account","Only includes the fields we actually need for marginfi integration","https://github.com/drift-labs/protocol-v2/tree/master/programs/drift/src/state/spot_market.rs#L35"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pubkey","docs":["The address of the spot market. It is a pda of the market index"],"type":"pubkey"},{"name":"oracle","docs":["The oracle used to price the markets deposits/borrows"],"type":"pubkey"},{"name":"mint","docs":["The token mint of the market"],"type":"pubkey"},{"name":"vault","docs":["The vault used to store the market's deposits"],"type":"pubkey"},{"name":"_padding1","type":{"array":[{"array":["u64",4]},9]}},{"name":"_padding2","type":{"array":["u8",8]}},{"name":"deposit_balance","docs":["All the fields we need for testing (stored as raw bytes for simplicity)"],"type":{"array":["u8",16]}},{"name":"borrow_balance","type":{"array":["u8",16]}},{"name":"cumulative_deposit_interest","type":{"array":["u8",16]}},{"name":"cumulative_borrow_interest","type":{"array":["u8",16]}},{"name":"_padding3","type":{"array":["u64",9]}},{"name":"last_interest_ts","docs":["Last time the cumulative deposit and borrow interest was updated","Offset: 568 bytes from start of struct (including discriminator)"],"type":"u64"},{"name":"_padding4","type":{"array":["u64",13]}},{"name":"decimals","type":"u32"},{"name":"market_index","type":"u16"},{"name":"_padding5","type":{"array":["u16",24]}},{"name":"_padding6","type":{"array":["u8",1]}},{"name":"pool_id","type":"u8"},{"name":"_padding7","docs":["Padding to reach 776 bytes total (including discriminator)"],"type":{"array":["u64",5]}}]}},{"name":"MinimalUser","docs":["Minimal representation of Drift's User account","Only includes the fields we actually need"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"authority","docs":["The owner/authority of the account"],"type":"pubkey"},{"name":"delegate","docs":["An addresses that can control the account on the authority's behalf"],"type":"pubkey"},{"name":"name","docs":["Encoded display name for the account"],"type":{"array":["u8",32]}},{"name":"spot_positions","docs":["The user's spot positions (8 positions)"],"type":{"array":[{"defined":{"name":"SpotPosition"}},8]}},{"name":"_padding1","docs":["Skip to the fields we need at the end"],"type":{"array":["u64",256]}},{"name":"_padding2","type":{"array":["u64",128]}},{"name":"_padding3","type":{"array":["u64",64]}},{"name":"_padding4","type":{"array":["u64",32]}},{"name":"_padding5","type":{"array":["u64",8]}},{"name":"_padding6","type":{"array":["u64",2]}},{"name":"_padding7","type":{"array":["u16",1]}},{"name":"sub_account_id","docs":["Sub account id for this user account"],"type":"u16"},{"name":"status","type":{"defined":{"name":"UserStatus"}}},{"name":"_padding8","type":{"array":["u8",27]}}]}},{"name":"OracleSetup","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"None"},{"name":"PythLegacy"},{"name":"SwitchboardV2"},{"name":"PythPushOracle"},{"name":"SwitchboardPull"},{"name":"StakedWithPythPush"},{"name":"KaminoPythPush"},{"name":"KaminoSwitchboardPull"},{"name":"Fixed"},{"name":"DriftPythPull"},{"name":"DriftSwitchboardPull"},{"name":"SolendPythPull"},{"name":"SolendSwitchboardPull"},{"name":"FixedKamino"},{"name":"FixedDrift"},{"name":"JuplendPythPull"},{"name":"JuplendSwitchboardPull"},{"name":"FixedJuplend"}]}},{"name":"Order","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"marginfi_account","type":"pubkey"},{"name":"stop_loss","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"take_profit","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"placeholder","docs":["Reserved for future use"],"type":"u64"},{"name":"max_slippage","docs":["* a %, as u32, out of 100%, e.g. 50% = .5 * u32::MAX"],"type":"u32"},{"name":"pad0","type":{"array":["u8",4]}},{"name":"tags","docs":["Active tags (currently 2). Remaining capacity is stored in padding for layout compatibility.","Padding byte `ORDER_TAG_PADDING - 1` stores the tag count for forward compatibility. (u16 *","2 = 4 bytes)"],"type":{"array":["u16",2]}},{"name":"pad1","type":{"array":["u8",4]}},{"name":"_tags_padding","type":{"array":["u8",32]}},{"name":"trigger","docs":["Stop Loss (0), Take Profit (1), or Both (2)"],"type":{"defined":{"name":"OrderTriggerType"}}},{"name":"bump","docs":["Bump to derive this pda"],"type":"u8"},{"name":"pad2","type":{"array":["u8",6]}},{"name":"_reserved1","type":{"array":[{"array":["u8",32]},4]}}]}},{"name":"OrderTrigger","repr":{"kind":"c"},"type":{"kind":"enum","variants":[{"name":"StopLoss","fields":[{"name":"threshold","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_slippage","type":"u32"}]},{"name":"TakeProfit","fields":[{"name":"threshold","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_slippage","type":"u32"}]},{"name":"Both","fields":[{"name":"stop_loss","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"take_profit","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"max_slippage","type":"u32"}]}]}},{"name":"OrderTriggerType","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"StopLoss"},{"name":"TakeProfit"},{"name":"Both"}]}},{"name":"PanicState","docs":["Panic state for emergency protocol pausing"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pause_flags","docs":["Whether the protocol is currently paused (1 = paused, 0 = not paused)"],"type":"u8"},{"name":"daily_pause_count","docs":["Number of times paused today (resets every 24 hours)"],"type":"u8"},{"name":"consecutive_pause_count","docs":["Number of consecutive pauses (resets when unpause happens)"],"type":"u8"},{"name":"_reserved","type":{"array":["u8",5]}},{"name":"pause_start_timestamp","docs":["Timestamp when the current pause started (0 if not paused)","* When a pause is extended before expiring, this could be in the future."],"type":"i64"},{"name":"last_daily_reset_timestamp","docs":["Timestamp of the last daily reset (for tracking daily pause count)"],"type":"i64"},{"name":"_reserved_space","docs":["Reserved for future use (making total struct 32 bytes)"],"type":{"array":["u8",8]}}]}},{"name":"PanicStateCache","docs":["Cached panic state information for fast checking during user operations"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pause_flags","docs":["Whether the protocol is currently paused (1 = paused, 0 = not paused)"],"type":"u8"},{"name":"_reserved","type":{"array":["u8",7]}},{"name":"pause_start_timestamp","docs":["Timestamp when the current pause started (0 if not paused)"],"type":"i64"},{"name":"last_cache_update","docs":["Timestamp when this cache was last updated"],"type":"i64"}]}},{"name":"RateLimitFlowEvent","docs":["Emitted when a bank-level inflow or outflow is recorded.","The delegate flow admin aggregates these off-chain and","updates the group rate limiter via `update_group_rate_limiter`."],"type":{"kind":"struct","fields":[{"name":"group","type":"pubkey"},{"name":"bank","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"flow_direction","docs":["0 = outflow (withdraw/borrow), 1 = inflow (deposit/repay)"],"type":"u8"},{"name":"native_amount","docs":["Amount in native tokens"],"type":"u64"},{"name":"mint_decimals","type":"u8"},{"name":"current_timestamp","docs":["Unix timestamp when the flow was recorded"],"type":"i64"}]}},{"name":"RateLimitWindow","docs":["A sliding window rate limiter that tracks net outflow over a time window.","Uses weighted blend of previous and current windows for smooth transitions.","","Net outflow = (withdraws + borrows) - (deposits + repays).","A negative net outflow increases remaining capacity for subsequent outflows."],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"max_outflow","docs":["Maximum net outflow allowed per window (0 = disabled).","For bank-level: denominated in native tokens.","For group-level: denominated in USD."],"type":"u64"},{"name":"window_duration","docs":["Window duration in seconds (e.g., 3600 for hourly, 86400 for daily)."],"type":"u64"},{"name":"window_start","docs":["Unix timestamp when the current window started."],"type":"i64"},{"name":"prev_window_outflow","docs":["Net outflow accumulated in the previous window.","Signed to allow tracking when inflows exceed outflows."],"type":"i64"},{"name":"cur_window_outflow","docs":["Net outflow accumulated in the current window.","Signed to allow tracking when inflows exceed outflows."],"type":"i64"}]}},{"name":"RatePoint","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"util","docs":["The utilization rate where `rate` applies","* a %, as u32, out of 100%, e.g. 50% = .5 * u32::MAX"],"type":"u32"},{"name":"rate","docs":["The base rate that applies","* a %, as u32, out of 1000%, e.g. 100% = 0.1 * u32::MAX"],"type":"u32"}]}},{"name":"RiskTier","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Collateral"},{"name":"Isolated"}]}},{"name":"SetKeeperCloseFlagsEvent","type":{"kind":"struct","fields":[{"name":"header","type":{"defined":{"name":"AccountEventHeader"}}},{"name":"bank_keys","type":{"option":{"vec":"pubkey"}}}]}},{"name":"SolendConfigCompact","docs":["Used to configure Solend banks. A simplified version of `BankConfigCompact` which omits most","values related to interest since Solend banks cannot earn interest or be borrowed against."],"type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"oracle_setup","docs":["Either `SolendPythPull` or `SolendSwitchboardPull`"],"type":{"defined":{"name":"OracleSetup"}}},{"name":"operational_state","docs":["Bank operational state - allows starting banks in paused state"],"type":{"defined":{"name":"BankOperationalState"}}},{"name":"risk_tier","docs":["Risk tier - determines if assets can be borrowed in isolation"],"type":{"defined":{"name":"RiskTier"}}},{"name":"config_flags","docs":["Config flags for future-proofing"],"type":"u8"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"oracle_max_confidence","docs":["Oracle confidence threshold (0 = use default 10%)"],"type":"u32"}]}},{"name":"SolendMinimalReserve","serialization":"bytemuck","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"last_update_slot","docs":["Last slot when supply and rates updated"],"type":"u64"},{"name":"last_update_stale","docs":["True when marked stale"],"type":"u8"},{"name":"lending_market","docs":["Lending market address"],"type":"pubkey"},{"name":"liquidity_mint_pubkey","type":"pubkey"},{"name":"liquidity_mint_decimals","type":"u8"},{"name":"liquidity_supply_pubkey","type":"pubkey"},{"name":"liquidity_pyth_oracle_pubkey","type":"pubkey"},{"name":"liquidity_switchboard_oracle_pubkey","type":"pubkey"},{"name":"liquidity_available_amount","type":"u64"},{"name":"liquidity_borrowed_amount_wads","type":{"array":["u8",16]}},{"name":"liquidity_cumulative_borrow_rate_wads","type":{"array":["u8",16]}},{"name":"liquidity_market_price","type":{"array":["u8",16]}},{"name":"collateral_mint_pubkey","type":"pubkey"},{"name":"collateral_mint_total_supply","type":"u64"},{"name":"collateral_supply_pubkey","type":"pubkey"},{"name":"config_optimal_utilization_rate","type":"u8"},{"name":"config_loan_to_value_ratio","type":"u8"},{"name":"config_liquidation_bonus","type":"u8"},{"name":"config_liquidation_threshold","type":"u8"},{"name":"_padding_to_fees_64","type":{"array":["u8",64]}},{"name":"_padding_to_fees_6","type":{"array":["u8",6]}},{"name":"liquidity_accumulated_protocol_fees_wads","type":{"array":["u8",16]}},{"name":"_padding_final_128","type":{"array":["u8",128]}},{"name":"_padding_final_64","type":{"array":["u8",64]}},{"name":"_padding_final_32","type":{"array":["u8",32]}},{"name":"_padding_final_6","type":{"array":["u8",6]}}]}},{"name":"SpotBalanceType","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Deposit"},{"name":"Borrow"}]}},{"name":"SpotPosition","docs":["Minimal representation of a spot position within a User account"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"scaled_balance","docs":["The scaled balance of the position.","* Precision: SPOT_BALANCE_PRECISION"],"type":"u64"},{"name":"open_bids","docs":["How many spot bids the user has open","* Precision: token mint precision"],"type":"i64"},{"name":"open_asks","docs":["How many spot asks the user has open","* Precision: token mint precision"],"type":"i64"},{"name":"cumulative_deposits","docs":["The cumulative deposits/borrows a user has made","* Precision: token mint precision"],"type":"i64"},{"name":"market_index","docs":["The market index of the corresponding spot market"],"type":"u16"},{"name":"balance_type","docs":["Whether the position is deposit or borrow"],"type":{"defined":{"name":"SpotBalanceType"}}},{"name":"open_orders","docs":["Number of open orders"],"type":"u8"},{"name":"padding","docs":["Padding"],"type":{"array":["u8",4]}}]}},{"name":"StakedSettings","docs":["Unique per-group. Staked Collateral banks created under a group automatically use these","settings. Groups that have not created this struct cannot create staked collateral banks. When","this struct updates, changes must be permissionlessly propagated to staked collateral banks.","Administrators can also edit the bank manually, i.e. with configure_bank, to temporarily make","changes such as raising the deposit limit for a single bank."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"key","docs":["This account's own key. A PDA derived from `marginfi_group` and `STAKED_SETTINGS_SEED`"],"type":"pubkey"},{"name":"marginfi_group","docs":["Group for which these settings apply"],"type":"pubkey"},{"name":"oracle","docs":["Generally, the Pyth push oracle for SOL"],"type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"risk_tier","type":{"defined":{"name":"RiskTier"}}},{"name":"_pad0","type":{"array":["u8",5]}},{"name":"_reserved0","docs":["The following values are irrelevant because staked collateral positions do not support","borrowing."],"type":{"array":["u8",8]}},{"name":"_reserved1","type":{"array":["u8",32]}},{"name":"_reserved2","type":{"array":["u8",64]}}]}},{"name":"StakedSettingsConfig","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"asset_weight_init","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"asset_weight_maint","type":{"defined":{"name":"WrappedI80F48"}}},{"name":"deposit_limit","type":"u64"},{"name":"total_asset_value_init_limit","type":"u64"},{"name":"oracle_max_age","type":"u16"},{"name":"risk_tier","docs":["WARN: You almost certainly want \"Collateral\", using Isolated risk tier makes the asset","worthless as collateral, and is generally useful only when creating a staked collateral pool","for rewards purposes only."],"type":{"defined":{"name":"RiskTier"}}}]}},{"name":"StakedSettingsEditConfig","type":{"kind":"struct","fields":[{"name":"oracle","type":{"option":"pubkey"}},{"name":"asset_weight_init","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"asset_weight_maint","type":{"option":{"defined":{"name":"WrappedI80F48"}}}},{"name":"deposit_limit","type":{"option":"u64"}},{"name":"total_asset_value_init_limit","type":{"option":"u64"}},{"name":"oracle_max_age","type":{"option":"u16"}},{"name":"risk_tier","docs":["WARN: You almost certainly want \"Collateral\", using Isolated risk tier makes the asset","worthless as collateral, making all outstanding accounts eligible to be liquidated, and is","generally useful only when creating a staked collateral pool for rewards purposes only."],"type":{"option":{"defined":{"name":"RiskTier"}}}}]}},{"name":"UserStatus","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Active"},{"name":"BeingLiquidated"},{"name":"Bankrupt"},{"name":"ReduceOnly"},{"name":"AdvancedLp"},{"name":"ProtectedMakerOrders"}]}},{"name":"WithdrawWindowCache","docs":["Tracks deleverage withdrawal limits to protect against compromised risk admin"],"repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"daily_limit","docs":["Maximum USD value that can be withdrawn per day via deleverage (0 = no limit)"],"type":"u32"},{"name":"withdrawn_today","docs":["USD value withdrawn today via deleverage (approximate, rounded)"],"type":"u32"},{"name":"last_daily_reset_timestamp","docs":["Unix timestamp of the last daily counter reset"],"type":"i64"}]}},{"name":"WrappedI80F48","serialization":"bytemuck","repr":{"kind":"c","align":8},"type":{"kind":"struct","fields":[{"name":"value","type":{"array":["u8",16]}}]}}]} \ No newline at end of file diff --git a/idls/marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json b/idls/marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json new file mode 100644 index 0000000..8b5674a --- /dev/null +++ b/idls/marinade_finance.MarBmsSgKXdrN1egZf5sqe1TMai9K1rChYNDJgjq7aD.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"marinade_finance","instructions":[{"name":"initialize","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"msolMint","isMut":false,"isSigner":false},{"name":"operationalSolAccount","isMut":false,"isSigner":false},{"name":"liqPool","accounts":[{"name":"lpMint","isMut":false,"isSigner":false},{"name":"solLegPda","isMut":false,"isSigner":false},{"name":"msolLeg","isMut":false,"isSigner":false}]},{"name":"treasuryMsolAccount","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"InitializeData"}}]},{"name":"changeAuthority","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true}],"args":[{"name":"data","type":{"defined":"ChangeAuthorityData"}}]},{"name":"addValidator","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"validatorVote","isMut":false,"isSigner":false},{"name":"duplicationFlag","isMut":true,"isSigner":false,"docs":["by initializing this account we mark the validator as added"]},{"name":"rentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"score","type":"u32"}]},{"name":"removeValidator","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"duplicationFlag","isMut":true,"isSigner":false},{"name":"operationalSolAccount","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u32"},{"name":"validatorVote","type":"publicKey"}]},{"name":"setValidatorScore","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false}],"args":[{"name":"index","type":"u32"},{"name":"validatorVote","type":"publicKey"},{"name":"score","type":"u32"}]},{"name":"configValidatorSystem","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"managerAuthority","isMut":false,"isSigner":true}],"args":[{"name":"extraRuns","type":"u32"}]},{"name":"deposit","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"liqPoolMsolLegAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"transferFrom","isMut":true,"isSigner":true},{"name":"mintTo","isMut":true,"isSigner":false,"docs":["user mSOL Token account to send the mSOL"]},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"lamports","type":"u64"}]},{"name":"depositStakeAccount","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeAuthority","isMut":false,"isSigner":true},{"name":"duplicationFlag","isMut":true,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"mintTo","isMut":true,"isSigner":false,"docs":["user mSOL Token account to send the mSOL"]},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"validatorIndex","type":"u32"}]},{"name":"liquidUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"getMsolFrom","isMut":true,"isSigner":false},{"name":"getMsolFromAuthority","isMut":false,"isSigner":true},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"msolAmount","type":"u64"}]},{"name":"addLiquidity","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"lpMintAuthority","isMut":false,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":false,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"transferFrom","isMut":true,"isSigner":true},{"name":"mintTo","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"lamports","type":"u64"}]},{"name":"removeLiquidity","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"burnFrom","isMut":true,"isSigner":false},{"name":"burnFromAuthority","isMut":false,"isSigner":true},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"transferMsolTo","isMut":true,"isSigner":false},{"name":"liqPoolSolLegPda","isMut":true,"isSigner":false},{"name":"liqPoolMsolLeg","isMut":true,"isSigner":false},{"name":"liqPoolMsolLegAuthority","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"tokens","type":"u64"}]},{"name":"configLp","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"ConfigLpParams"}}]},{"name":"configMarinade","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true}],"args":[{"name":"params","type":{"defined":"ConfigMarinadeParams"}}]},{"name":"orderUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"burnMsolFrom","isMut":true,"isSigner":false},{"name":"burnMsolAuthority","isMut":false,"isSigner":true},{"name":"newTicketAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"msolAmount","type":"u64"}]},{"name":"claim","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"ticketAccount","isMut":true,"isSigner":false},{"name":"transferSolTo","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"stakeReserve","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"validatorVote","isMut":true,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":true},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"rentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"epochSchedule","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeConfig","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"validatorIndex","type":"u32"}]},{"name":"updateActive","accounts":[{"name":"common","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}]},{"name":"validatorList","isMut":true,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"updateDeactivated","accounts":[{"name":"common","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"msolMintAuthority","isMut":false,"isSigner":false},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}]},{"name":"operationalSolAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"}]},{"name":"deactivateStake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"epochSchedule","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"emergencyUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorManagerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"partialUnstake","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorManagerAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"},{"name":"desiredUnstakeAmount","type":"u64"}]},{"name":"mergeStakes","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"destinationStake","isMut":true,"isSigner":false},{"name":"sourceStake","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"operationalSolAccount","isMut":true,"isSigner":false},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"destinationStakeIndex","type":"u32"},{"name":"sourceStakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"}]},{"name":"redelegate","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"reservePda","isMut":false,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"destValidatorAccount","isMut":false,"isSigner":false},{"name":"redelegateStakeAccount","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"stakeHistory","isMut":false,"isSigner":false},{"name":"stakeConfig","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"sourceValidatorIndex","type":"u32"},{"name":"destValidatorIndex","type":"u32"}]},{"name":"pause","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pauseAuthority","isMut":false,"isSigner":true}],"args":[]},{"name":"resume","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pauseAuthority","isMut":false,"isSigner":true}],"args":[]},{"name":"withdrawStakeAccount","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"msolMint","isMut":true,"isSigner":false},{"name":"burnMsolFrom","isMut":true,"isSigner":false},{"name":"burnMsolAuthority","isMut":true,"isSigner":true},{"name":"treasuryMsolAccount","isMut":true,"isSigner":false},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"stakeWithdrawAuthority","isMut":false,"isSigner":false},{"name":"stakeDepositAuthority","isMut":false,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"splitStakeAccount","isMut":true,"isSigner":true},{"name":"splitStakeRentPayer","isMut":true,"isSigner":true},{"name":"clock","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"stakeProgram","isMut":false,"isSigner":false}],"args":[{"name":"stakeIndex","type":"u32"},{"name":"validatorIndex","type":"u32"},{"name":"msolAmount","type":"u64"},{"name":"beneficiary","type":"publicKey"}]},{"name":"reallocValidatorList","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"validatorList","isMut":true,"isSigner":false},{"name":"rentFunds","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"capacity","type":"u32"}]},{"name":"reallocStakeList","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"adminAuthority","isMut":false,"isSigner":true},{"name":"stakeList","isMut":true,"isSigner":false},{"name":"rentFunds","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"capacity","type":"u32"}]}],"accounts":[{"name":"TicketAccountData","type":{"kind":"struct","fields":[{"name":"stateAddress","type":"publicKey"},{"name":"beneficiary","type":"publicKey"},{"name":"lamportsAmount","type":"u64"},{"name":"createdEpoch","type":"u64"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"msolMint","type":"publicKey"},{"name":"adminAuthority","type":"publicKey"},{"name":"operationalSolAccount","type":"publicKey"},{"name":"treasuryMsolAccount","type":"publicKey"},{"name":"reserveBumpSeed","type":"u8"},{"name":"msolMintAuthorityBumpSeed","type":"u8"},{"name":"rentExemptForTokenAcc","type":"u64"},{"name":"rewardFee","type":{"defined":"Fee"}},{"name":"stakeSystem","type":{"defined":"StakeSystem"}},{"name":"validatorSystem","type":{"defined":"ValidatorSystem"}},{"name":"liqPool","type":{"defined":"LiqPool"}},{"name":"availableReserveBalance","type":"u64"},{"name":"msolSupply","type":"u64"},{"name":"msolPrice","type":"u64"},{"name":"circulatingTicketCount","docs":["count tickets for delayed-unstake"],"type":"u64"},{"name":"circulatingTicketBalance","docs":["total lamports amount of generated and not claimed yet tickets"],"type":"u64"},{"name":"lentFromReserve","type":"u64"},{"name":"minDeposit","type":"u64"},{"name":"minWithdraw","type":"u64"},{"name":"stakingSolCap","type":"u64"},{"name":"emergencyCoolingDown","type":"u64"},{"name":"pauseAuthority","docs":["emergency pause"],"type":"publicKey"},{"name":"paused","type":"bool"},{"name":"delayedUnstakeFee","type":{"defined":"FeeCents"}},{"name":"withdrawStakeAccountFee","type":{"defined":"FeeCents"}},{"name":"withdrawStakeAccountEnabled","type":"bool"},{"name":"lastStakeMoveEpoch","type":"u64"},{"name":"stakeMoved","type":"u64"},{"name":"maxStakeMovedPerEpoch","type":{"defined":"Fee"}}]}}],"types":[{"name":"SplitStakeAccountInfo","type":{"kind":"struct","fields":[{"name":"account","type":"publicKey"},{"name":"index","type":"u32"}]}},{"name":"U64ValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"u64"},{"name":"new","type":"u64"}]}},{"name":"U32ValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"u32"},{"name":"new","type":"u32"}]}},{"name":"FeeValueChange","type":{"kind":"struct","fields":[{"name":"old","type":{"defined":"Fee"}},{"name":"new","type":{"defined":"Fee"}}]}},{"name":"FeeCentsValueChange","type":{"kind":"struct","fields":[{"name":"old","type":{"defined":"FeeCents"}},{"name":"new","type":{"defined":"FeeCents"}}]}},{"name":"PubkeyValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"publicKey"},{"name":"new","type":"publicKey"}]}},{"name":"BoolValueChange","type":{"kind":"struct","fields":[{"name":"old","type":"bool"},{"name":"new","type":"bool"}]}},{"name":"ChangeAuthorityData","type":{"kind":"struct","fields":[{"name":"admin","type":{"option":"publicKey"}},{"name":"validatorManager","type":{"option":"publicKey"}},{"name":"operationalSolAccount","type":{"option":"publicKey"}},{"name":"treasuryMsolAccount","type":{"option":"publicKey"}},{"name":"pauseAuthority","type":{"option":"publicKey"}}]}},{"name":"ConfigLpParams","type":{"kind":"struct","fields":[{"name":"minFee","type":{"option":{"defined":"Fee"}}},{"name":"maxFee","type":{"option":{"defined":"Fee"}}},{"name":"liquidityTarget","type":{"option":"u64"}},{"name":"treasuryCut","type":{"option":{"defined":"Fee"}}}]}},{"name":"ConfigMarinadeParams","type":{"kind":"struct","fields":[{"name":"rewardsFee","type":{"option":{"defined":"Fee"}}},{"name":"slotsForStakeDelta","type":{"option":"u64"}},{"name":"minStake","type":{"option":"u64"}},{"name":"minDeposit","type":{"option":"u64"}},{"name":"minWithdraw","type":{"option":"u64"}},{"name":"stakingSolCap","type":{"option":"u64"}},{"name":"liquiditySolCap","type":{"option":"u64"}},{"name":"withdrawStakeAccountEnabled","type":{"option":"bool"}},{"name":"delayedUnstakeFee","type":{"option":{"defined":"FeeCents"}}},{"name":"withdrawStakeAccountFee","type":{"option":{"defined":"FeeCents"}}},{"name":"maxStakeMovedPerEpoch","type":{"option":{"defined":"Fee"}}}]}},{"name":"InitializeData","type":{"kind":"struct","fields":[{"name":"adminAuthority","type":"publicKey"},{"name":"validatorManagerAuthority","type":"publicKey"},{"name":"minStake","type":"u64"},{"name":"rewardsFee","type":{"defined":"Fee"}},{"name":"liqPool","type":{"defined":"LiqPoolInitializeData"}},{"name":"additionalStakeRecordSpace","type":"u32"},{"name":"additionalValidatorRecordSpace","type":"u32"},{"name":"slotsForStakeDelta","type":"u64"},{"name":"pauseAuthority","type":"publicKey"}]}},{"name":"LiqPoolInitializeData","type":{"kind":"struct","fields":[{"name":"lpLiquidityTarget","type":"u64"},{"name":"lpMaxFee","type":{"defined":"Fee"}},{"name":"lpMinFee","type":{"defined":"Fee"}},{"name":"lpTreasuryCut","type":{"defined":"Fee"}}]}},{"name":"Fee","type":{"kind":"struct","fields":[{"name":"basisPoints","type":"u32"}]}},{"name":"FeeCents","docs":["FeeCents, same as Fee but / 1_000_000 instead of 10_000","1 FeeCent = 0.0001%, 10_000 FeeCent = 1%, 1_000_000 FeeCent = 100%"],"type":{"kind":"struct","fields":[{"name":"bpCents","type":"u32"}]}},{"name":"LiqPool","type":{"kind":"struct","fields":[{"name":"lpMint","type":"publicKey"},{"name":"lpMintAuthorityBumpSeed","type":"u8"},{"name":"solLegBumpSeed","type":"u8"},{"name":"msolLegAuthorityBumpSeed","type":"u8"},{"name":"msolLeg","type":"publicKey"},{"name":"lpLiquidityTarget","docs":["Liquidity target. If the Liquidity reach this amount, the fee reaches lp_min_discount_fee"],"type":"u64"},{"name":"lpMaxFee","docs":["Liquidity pool max fee"],"type":{"defined":"Fee"}},{"name":"lpMinFee","docs":["SOL/mSOL Liquidity pool min fee"],"type":{"defined":"Fee"}},{"name":"treasuryCut","docs":["Treasury cut"],"type":{"defined":"Fee"}},{"name":"lpSupply","type":"u64"},{"name":"lentFromSolLeg","type":"u64"},{"name":"liquiditySolCap","type":"u64"}]}},{"name":"List","type":{"kind":"struct","fields":[{"name":"account","type":"publicKey"},{"name":"itemSize","type":"u32"},{"name":"count","type":"u32"},{"name":"reserved1","type":"publicKey"},{"name":"reserved2","type":"u32"}]}},{"name":"StakeRecord","type":{"kind":"struct","fields":[{"name":"stakeAccount","type":"publicKey"},{"name":"lastUpdateDelegatedLamports","type":"u64"},{"name":"lastUpdateEpoch","type":"u64"},{"name":"isEmergencyUnstaking","type":"u8"}]}},{"name":"StakeList","type":{"kind":"struct","fields":[]}},{"name":"StakeSystem","type":{"kind":"struct","fields":[{"name":"stakeList","type":{"defined":"List"}},{"name":"delayedUnstakeCoolingDown","type":"u64"},{"name":"stakeDepositBumpSeed","type":"u8"},{"name":"stakeWithdrawBumpSeed","type":"u8"},{"name":"slotsForStakeDelta","docs":["set by admin, how much slots before the end of the epoch, stake-delta can start"],"type":"u64"},{"name":"lastStakeDeltaEpoch","docs":["Marks the start of stake-delta operations, meaning that if somebody starts a delayed-unstake ticket","after this var is set with epoch_num the ticket will have epoch_created = current_epoch+1","(the user must wait one more epoch, because their unstake-delta will be execute in this epoch)"],"type":"u64"},{"name":"minStake","type":"u64"},{"name":"extraStakeDeltaRuns","docs":["can be set by validator-manager-auth to allow a second run of stake-delta to stake late stakers in the last minute of the epoch","so we maximize user's rewards"],"type":"u32"}]}},{"name":"ValidatorRecord","type":{"kind":"struct","fields":[{"name":"validatorAccount","docs":["Validator vote pubkey"],"type":"publicKey"},{"name":"activeBalance","docs":["Validator total balance in lamports"],"type":"u64"},{"name":"score","type":"u32"},{"name":"lastStakeDeltaEpoch","type":"u64"},{"name":"duplicationFlagBumpSeed","type":"u8"}]}},{"name":"ValidatorList","type":{"kind":"struct","fields":[]}},{"name":"ValidatorSystem","type":{"kind":"struct","fields":[{"name":"validatorList","type":{"defined":"List"}},{"name":"managerAuthority","type":"publicKey"},{"name":"totalValidatorScore","type":"u32"},{"name":"totalActiveBalance","docs":["sum of all active lamports staked"],"type":"u64"},{"name":"autoAddValidatorEnabled","docs":["DEPRECATED, no longer used"],"type":"u8"}]}}],"events":[{"name":"ChangeAuthorityEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"adminChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"validatorManagerChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"operationalSolAccountChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"treasuryMsolAccountChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false},{"name":"pauseAuthorityChange","type":{"option":{"defined":"PubkeyValueChange"}},"index":false}]},{"name":"ConfigLpEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"minFeeChange","type":{"option":{"defined":"FeeValueChange"}},"index":false},{"name":"maxFeeChange","type":{"option":{"defined":"FeeValueChange"}},"index":false},{"name":"liquidityTargetChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"treasuryCutChange","type":{"option":{"defined":"FeeValueChange"}},"index":false}]},{"name":"ConfigMarinadeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"rewardsFeeChange","type":{"option":{"defined":"FeeValueChange"}},"index":false},{"name":"slotsForStakeDeltaChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"minStakeChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"minDepositChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"minWithdrawChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"stakingSolCapChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"liquiditySolCapChange","type":{"option":{"defined":"U64ValueChange"}},"index":false},{"name":"withdrawStakeAccountEnabledChange","type":{"option":{"defined":"BoolValueChange"}},"index":false},{"name":"delayedUnstakeFeeChange","type":{"option":{"defined":"FeeCentsValueChange"}},"index":false},{"name":"withdrawStakeAccountFeeChange","type":{"option":{"defined":"FeeCentsValueChange"}},"index":false},{"name":"maxStakeMovedPerEpochChange","type":{"option":{"defined":"FeeValueChange"}},"index":false}]},{"name":"InitializeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"params","type":{"defined":"InitializeData"},"index":false},{"name":"stakeList","type":"publicKey","index":false},{"name":"validatorList","type":"publicKey","index":false},{"name":"msolMint","type":"publicKey","index":false},{"name":"operationalSolAccount","type":"publicKey","index":false},{"name":"lpMint","type":"publicKey","index":false},{"name":"lpMsolLeg","type":"publicKey","index":false},{"name":"treasuryMsolAccount","type":"publicKey","index":false}]},{"name":"EmergencyPauseEvent","fields":[{"name":"state","type":"publicKey","index":false}]},{"name":"ResumeEvent","fields":[{"name":"state","type":"publicKey","index":false}]},{"name":"ReallocValidatorListEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"count","type":"u32","index":false},{"name":"newCapacity","type":"u32","index":false}]},{"name":"ReallocStakeListEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"count","type":"u32","index":false},{"name":"newCapacity","type":"u32","index":false}]},{"name":"DeactivateStakeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"lastUpdateStakeDelegation","type":"u64","index":false},{"name":"splitStakeAccount","type":{"option":{"defined":"SplitStakeAccountInfo"}},"index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"totalStakeTarget","type":"u64","index":false},{"name":"validatorStakeTarget","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"delayedUnstakeCoolingDown","type":"u64","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalUnstakeDelta","type":"u64","index":false},{"name":"unstakedAmount","type":"u64","index":false}]},{"name":"MergeStakesEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"destinationStakeIndex","type":"u32","index":false},{"name":"destinationStakeAccount","type":"publicKey","index":false},{"name":"lastUpdateDestinationStakeDelegation","type":"u64","index":false},{"name":"sourceStakeIndex","type":"u32","index":false},{"name":"sourceStakeAccount","type":"publicKey","index":false},{"name":"lastUpdateSourceStakeDelegation","type":"u64","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"extraDelegated","type":"u64","index":false},{"name":"returnedStakeRent","type":"u64","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"operationalSolBalance","type":"u64","index":false}]},{"name":"RedelegateEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"lastUpdateDelegation","type":"u64","index":false},{"name":"sourceValidatorIndex","type":"u32","index":false},{"name":"sourceValidatorVote","type":"publicKey","index":false},{"name":"sourceValidatorScore","type":"u32","index":false},{"name":"sourceValidatorBalance","type":"u64","index":false},{"name":"sourceValidatorStakeTarget","type":"u64","index":false},{"name":"destValidatorIndex","type":"u32","index":false},{"name":"destValidatorVote","type":"publicKey","index":false},{"name":"destValidatorScore","type":"u32","index":false},{"name":"destValidatorBalance","type":"u64","index":false},{"name":"destValidatorStakeTarget","type":"u64","index":false},{"name":"redelegateAmount","type":"u64","index":false},{"name":"splitStakeAccount","type":{"option":{"defined":"SplitStakeAccountInfo"}},"index":false},{"name":"redelegateStakeIndex","type":"u32","index":false},{"name":"redelegateStakeAccount","type":"publicKey","index":false}]},{"name":"StakeReserveEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"totalStakeTarget","type":"u64","index":false},{"name":"validatorStakeTarget","type":"u64","index":false},{"name":"reserveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalStakeDelta","type":"u64","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"UpdateActiveEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorVote","type":"publicKey","index":false},{"name":"delegationChange","type":{"defined":"U64ValueChange"},"index":false},{"name":"delegationGrowthMsolFees","type":{"option":"u64"},"index":false},{"name":"extraLamports","type":"u64","index":false},{"name":"extraMsolFees","type":{"option":"u64"},"index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"msolPriceChange","type":{"defined":"U64ValueChange"},"index":false},{"name":"rewardFeeUsed","type":{"defined":"Fee"},"index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"UpdateDeactivatedEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"stakeAccount","type":"publicKey","index":false},{"name":"balanceWithoutRentExempt","type":"u64","index":false},{"name":"lastUpdateDelegatedLamports","type":"u64","index":false},{"name":"msolFees","type":{"option":"u64"},"index":false},{"name":"msolPriceChange","type":{"defined":"U64ValueChange"},"index":false},{"name":"rewardFeeUsed","type":{"defined":"Fee"},"index":false},{"name":"operationalSolBalance","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"ClaimEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"ticket","type":"publicKey","index":false},{"name":"beneficiary","type":"publicKey","index":false},{"name":"circulatingTicketBalance","type":"u64","index":false},{"name":"circulatingTicketCount","type":"u64","index":false},{"name":"reserveBalance","type":"u64","index":false},{"name":"userBalance","type":"u64","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"OrderUnstakeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"ticketEpoch","type":"u64","index":false},{"name":"ticket","type":"publicKey","index":false},{"name":"beneficiary","type":"publicKey","index":false},{"name":"circulatingTicketBalance","type":"u64","index":false},{"name":"circulatingTicketCount","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"burnedMsolAmount","type":"u64","index":false},{"name":"solAmount","type":"u64","index":false},{"name":"feeBpCents","type":"u32","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"AddLiquidityEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"solOwner","type":"publicKey","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"userLpBalance","type":"u64","index":false},{"name":"solLegBalance","type":"u64","index":false},{"name":"lpSupply","type":"u64","index":false},{"name":"solAddedAmount","type":"u64","index":false},{"name":"lpMinted","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"LiquidUnstakeEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"msolOwner","type":"publicKey","index":false},{"name":"liqPoolSolBalance","type":"u64","index":false},{"name":"liqPoolMsolBalance","type":"u64","index":false},{"name":"treasuryMsolBalance","type":{"option":"u64"},"index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"msolAmount","type":"u64","index":false},{"name":"msolFee","type":"u64","index":false},{"name":"treasuryMsolCut","type":"u64","index":false},{"name":"solAmount","type":"u64","index":false},{"name":"lpLiquidityTarget","type":"u64","index":false},{"name":"lpMaxFee","type":{"defined":"Fee"},"index":false},{"name":"lpMinFee","type":{"defined":"Fee"},"index":false},{"name":"treasuryCut","type":{"defined":"Fee"},"index":false}]},{"name":"RemoveLiquidityEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"solLegBalance","type":"u64","index":false},{"name":"msolLegBalance","type":"u64","index":false},{"name":"userLpBalance","type":"u64","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"lpMintSupply","type":"u64","index":false},{"name":"lpBurned","type":"u64","index":false},{"name":"solOutAmount","type":"u64","index":false},{"name":"msolOutAmount","type":"u64","index":false}]},{"name":"AddValidatorEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"index","type":"u32","index":false},{"name":"score","type":"u32","index":false}]},{"name":"RemoveValidatorEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"index","type":"u32","index":false},{"name":"operationalSolBalance","type":"u64","index":false}]},{"name":"SetValidatorScoreEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"index","type":"u32","index":false},{"name":"scoreChange","type":{"defined":"U32ValueChange"},"index":false}]},{"name":"DepositStakeAccountEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"stake","type":"publicKey","index":false},{"name":"delegated","type":"u64","index":false},{"name":"withdrawer","type":"publicKey","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"validatorActiveBalance","type":"u64","index":false},{"name":"totalActiveBalance","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"msolMinted","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"DepositEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"solOwner","type":"publicKey","index":false},{"name":"userSolBalance","type":"u64","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"solLegBalance","type":"u64","index":false},{"name":"msolLegBalance","type":"u64","index":false},{"name":"reserveBalance","type":"u64","index":false},{"name":"solSwapped","type":"u64","index":false},{"name":"msolSwapped","type":"u64","index":false},{"name":"solDeposited","type":"u64","index":false},{"name":"msolMinted","type":"u64","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]},{"name":"WithdrawStakeAccountEvent","fields":[{"name":"state","type":"publicKey","index":false},{"name":"epoch","type":"u64","index":false},{"name":"stake","type":"publicKey","index":false},{"name":"lastUpdateStakeDelegation","type":"u64","index":false},{"name":"stakeIndex","type":"u32","index":false},{"name":"validator","type":"publicKey","index":false},{"name":"validatorIndex","type":"u32","index":false},{"name":"userMsolBalance","type":"u64","index":false},{"name":"userMsolAuth","type":"publicKey","index":false},{"name":"msolBurned","type":"u64","index":false},{"name":"msolFees","type":"u64","index":false},{"name":"splitStake","type":"publicKey","index":false},{"name":"beneficiary","type":"publicKey","index":false},{"name":"splitLamports","type":"u64","index":false},{"name":"feeBpCents","type":"u32","index":false},{"name":"totalVirtualStakedLamports","type":"u64","index":false},{"name":"msolSupply","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"WrongReserveOwner","msg":"Wrong reserve owner. Must be a system account"},{"code":6001,"name":"NonEmptyReserveData","msg":"Reserve must have no data, but has data"},{"code":6002,"name":"InvalidInitialReserveLamports","msg":"Invalid initial reserve lamports"},{"code":6003,"name":"ZeroValidatorChunkSize","msg":"Zero validator chunk size"},{"code":6004,"name":"TooBigValidatorChunkSize","msg":"Too big validator chunk size"},{"code":6005,"name":"ZeroCreditChunkSize","msg":"Zero credit chunk size"},{"code":6006,"name":"TooBigCreditChunkSize","msg":"Too big credit chunk size"},{"code":6007,"name":"TooLowCreditFee","msg":"Too low credit fee"},{"code":6008,"name":"InvalidMintAuthority","msg":"Invalid mint authority"},{"code":6009,"name":"MintHasInitialSupply","msg":"Non empty initial mint supply"},{"code":6010,"name":"InvalidOwnerFeeState","msg":"Invalid owner fee state"},{"code":6011,"name":"InvalidProgramId","msg":"Invalid program id. For using program from another account please update id in the code"},{"code":6012,"name":"UnexpectedAccount","msg":"Unexpected account"},{"code":6013,"name":"CalculationFailure","msg":"Calculation failure"},{"code":6014,"name":"StakeAccountWithLockup","msg":"You can't deposit a stake-account with lockup"},{"code":6015,"name":"MinStakeIsTooLow","msg":"Min stake is too low"},{"code":6016,"name":"LpMaxFeeIsTooHigh","msg":"Lp max fee is too high"},{"code":6017,"name":"BasisPointsOverflow","msg":"Basis points overflow"},{"code":6018,"name":"LpFeesAreWrongWayRound","msg":"LP min fee > LP max fee"},{"code":6019,"name":"LiquidityTargetTooLow","msg":"Liquidity target too low"},{"code":6020,"name":"TicketNotDue","msg":"Ticket not due. Wait more epochs"},{"code":6021,"name":"TicketNotReady","msg":"Ticket not ready. Wait a few hours and try again"},{"code":6022,"name":"WrongBeneficiary","msg":"Wrong Ticket Beneficiary"},{"code":6023,"name":"StakeAccountNotUpdatedYet","msg":"Stake Account not updated yet"},{"code":6024,"name":"StakeNotDelegated","msg":"Stake Account not delegated"},{"code":6025,"name":"StakeAccountIsEmergencyUnstaking","msg":"Stake Account is emergency unstaking"},{"code":6026,"name":"InsufficientLiquidity","msg":"Insufficient Liquidity in the Liquidity Pool"},{"code":6027,"name":"NotUsed6027"},{"code":6028,"name":"InvalidAdminAuthority","msg":"Invalid admin authority"},{"code":6029,"name":"InvalidValidatorManager","msg":"Invalid validator system manager"},{"code":6030,"name":"InvalidStakeListDiscriminator","msg":"Invalid stake list account discriminator"},{"code":6031,"name":"InvalidValidatorListDiscriminator","msg":"Invalid validator list account discriminator"},{"code":6032,"name":"TreasuryCutIsTooHigh","msg":"Treasury cut is too high"},{"code":6033,"name":"RewardsFeeIsTooHigh","msg":"Reward fee is too high"},{"code":6034,"name":"StakingIsCapped","msg":"Staking is capped"},{"code":6035,"name":"LiquidityIsCapped","msg":"Liquidity is capped"},{"code":6036,"name":"UpdateWindowIsTooLow","msg":"Update window is too low"},{"code":6037,"name":"MinWithdrawIsTooHigh","msg":"Min withdraw is too high"},{"code":6038,"name":"WithdrawAmountIsTooLow","msg":"Withdraw amount is too low"},{"code":6039,"name":"DepositAmountIsTooLow","msg":"Deposit amount is too low"},{"code":6040,"name":"NotEnoughUserFunds","msg":"Not enough user funds"},{"code":6041,"name":"WrongTokenOwnerOrDelegate","msg":"Wrong token owner or delegate"},{"code":6042,"name":"TooEarlyForStakeDelta","msg":"Too early for stake delta"},{"code":6043,"name":"RequiredDelegatedStake","msg":"Required delegated stake"},{"code":6044,"name":"RequiredActiveStake","msg":"Required active stake"},{"code":6045,"name":"RequiredDeactivatingStake","msg":"Required deactivating stake"},{"code":6046,"name":"DepositingNotActivatedStake","msg":"Depositing not activated stake"},{"code":6047,"name":"TooLowDelegationInDepositingStake","msg":"Too low delegation in the depositing stake"},{"code":6048,"name":"WrongStakeBalance","msg":"Wrong deposited stake balance"},{"code":6049,"name":"WrongValidatorAccountOrIndex","msg":"Wrong validator account or index"},{"code":6050,"name":"WrongStakeAccountOrIndex","msg":"Wrong stake account or index"},{"code":6051,"name":"UnstakingOnPositiveDelta","msg":"Delta stake is positive so we must stake instead of unstake"},{"code":6052,"name":"StakingOnNegativeDelta","msg":"Delta stake is negative so we must unstake instead of stake"},{"code":6053,"name":"MovingStakeIsCapped","msg":"Moving stake during an epoch is capped"},{"code":6054,"name":"StakeMustBeUninitialized","msg":"Stake must be uninitialized"},{"code":6055,"name":"DestinationStakeMustBeDelegated","msg":"Destination stake must be delegated"},{"code":6056,"name":"DestinationStakeMustNotBeDeactivating","msg":"Destination stake must not be deactivating"},{"code":6057,"name":"DestinationStakeMustBeUpdated","msg":"Destination stake must be updated"},{"code":6058,"name":"InvalidDestinationStakeDelegation","msg":"Invalid destination stake delegation"},{"code":6059,"name":"SourceStakeMustBeDelegated","msg":"Source stake must be delegated"},{"code":6060,"name":"SourceStakeMustNotBeDeactivating","msg":"Source stake must not be deactivating"},{"code":6061,"name":"SourceStakeMustBeUpdated","msg":"Source stake must be updated"},{"code":6062,"name":"InvalidSourceStakeDelegation","msg":"Invalid source stake delegation"},{"code":6063,"name":"InvalidDelayedUnstakeTicket","msg":"Invalid delayed unstake ticket"},{"code":6064,"name":"ReusingDelayedUnstakeTicket","msg":"Reusing delayed unstake ticket"},{"code":6065,"name":"EmergencyUnstakingFromNonZeroScoredValidator","msg":"Emergency unstaking from non zero scored validator"},{"code":6066,"name":"WrongValidatorDuplicationFlag","msg":"Wrong validator duplication flag"},{"code":6067,"name":"RedepositingMarinadeStake","msg":"Redepositing marinade stake"},{"code":6068,"name":"RemovingValidatorWithBalance","msg":"Removing validator with balance"},{"code":6069,"name":"RedelegateOverTarget","msg":"Redelegate will put validator over stake target"},{"code":6070,"name":"SourceAndDestValidatorsAreTheSame","msg":"Source and Dest Validators are the same"},{"code":6071,"name":"UnregisteredMsolMinted","msg":"Some mSOL tokens was minted outside of marinade contract"},{"code":6072,"name":"UnregisteredLPMinted","msg":"Some LP tokens was minted outside of marinade contract"},{"code":6073,"name":"ListIndexOutOfBounds","msg":"List index out of bounds"},{"code":6074,"name":"ListOverflow","msg":"List overflow"},{"code":6075,"name":"AlreadyPaused","msg":"Requested pause and already Paused"},{"code":6076,"name":"NotPaused","msg":"Requested resume, but not Paused"},{"code":6077,"name":"ProgramIsPaused","msg":"Emergency Pause is Active"},{"code":6078,"name":"InvalidPauseAuthority","msg":"Invalid pause authority"},{"code":6079,"name":"SelectedStakeAccountHasNotEnoughFunds","msg":"Selected Stake account has not enough funds"},{"code":6080,"name":"BasisPointCentsOverflow","msg":"Basis point CENTS overflow"},{"code":6081,"name":"WithdrawStakeAccountIsNotEnabled","msg":"Withdraw stake account is not enabled"},{"code":6082,"name":"WithdrawStakeAccountFeeIsTooHigh","msg":"Withdraw stake account fee is too high"},{"code":6083,"name":"DelayedUnstakeFeeIsTooHigh","msg":"Delayed unstake fee is too high"},{"code":6084,"name":"WithdrawStakeLamportsIsTooLow","msg":"Withdraw stake account value is too low"},{"code":6085,"name":"StakeAccountRemainderTooLow","msg":"Stake account remainder too low"},{"code":6086,"name":"ShrinkingListWithDeletingContents","msg":"Capacity of the list must be not less than it's current size"}]} \ No newline at end of file diff --git a/idls/metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json b/idls/metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json new file mode 100644 index 0000000..1a3998f --- /dev/null +++ b/idls/metadao_amm_v0.5.AMMJdEiCCa8mdugg6JPF7gFirmmxisTfDJoSNSUi5zDJ.json @@ -0,0 +1 @@ +{"version":"0.5.0","name":"amm","instructions":[{"name":"createAmm","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"CreateAmmArgs"}}]},{"name":"addLiquidity","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"userLpAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"AddLiquidityArgs"}}]},{"name":"removeLiquidity","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"userLpAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"RemoveLiquidityArgs"}}]},{"name":"swap","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"amm","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"vaultAtaBase","isMut":true,"isSigner":false},{"name":"vaultAtaQuote","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SwapArgs"}}]},{"name":"crankThatTwap","accounts":[{"name":"amm","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"Amm","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"createdAtSlot","type":"u64"},{"name":"lpMint","type":"publicKey"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"baseMintDecimals","type":"u8"},{"name":"quoteMintDecimals","type":"u8"},{"name":"baseAmount","type":"u64"},{"name":"quoteAmount","type":"u64"},{"name":"oracle","type":{"defined":"TwapOracle"}},{"name":"seqNum","type":"u64"},{"name":"vaultAtaBase","type":"publicKey"},{"name":"vaultAtaQuote","type":"publicKey"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"user","type":"publicKey"},{"name":"amm","type":"publicKey"},{"name":"postBaseReserves","type":"u64"},{"name":"postQuoteReserves","type":"u64"},{"name":"oracleLastPrice","type":"u128"},{"name":"oracleLastObservation","type":"u128"},{"name":"oracleAggregator","type":"u128"},{"name":"seqNum","type":"u64"}]}},{"name":"AddLiquidityArgs","type":{"kind":"struct","fields":[{"name":"quoteAmount","docs":["How much quote token you will deposit to the pool"],"type":"u64"},{"name":"maxBaseAmount","docs":["The maximum base token you will deposit to the pool"],"type":"u64"},{"name":"minLpTokens","docs":["The minimum LP token you will get back"],"type":"u64"}]}},{"name":"CreateAmmArgs","type":{"kind":"struct","fields":[{"name":"twapInitialObservation","type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySlots","type":"u64"}]}},{"name":"RemoveLiquidityArgs","type":{"kind":"struct","fields":[{"name":"lpTokensToBurn","type":"u64"},{"name":"minQuoteAmount","type":"u64"},{"name":"minBaseAmount","type":"u64"}]}},{"name":"SwapArgs","type":{"kind":"struct","fields":[{"name":"swapType","type":{"defined":"SwapType"}},{"name":"inputAmount","type":"u64"},{"name":"outputAmountMin","type":"u64"}]}},{"name":"TwapOracle","type":{"kind":"struct","fields":[{"name":"lastUpdatedSlot","type":"u64"},{"name":"lastPrice","docs":["A price is the number of quote units per base unit multiplied by 1e12.","You cannot simply divide by 1e12 to get a price you can display in the UI","because the base and quote decimals may be different. Instead, do:","ui_price = (price * (10**(base_decimals - quote_decimals))) / 1e12"],"type":"u128"},{"name":"lastObservation","docs":["If we did a raw TWAP over prices, someone could push the TWAP heavily with","a few extremely large outliers. So we use observations, which can only move","by `max_observation_change_per_update` per update."],"type":"u128"},{"name":"aggregator","docs":["Running sum of slots_per_last_update * last_observation.","","Assuming latest observations are as big as possible (u64::MAX * 1e12),","we can store 18 million slots worth of observations, which turns out to","be ~85 days worth of slots.","","Assuming that latest observations are 100x smaller than they could theoretically","be, we can store 8500 days (23 years) worth of them. Even this is a very","very conservative assumption - META/USDC prices should be between 1e9 and","1e15, which would overflow after 1e15 years worth of slots.","","So in the case of an overflow, the aggregator rolls back to 0. It's the","client's responsibility to sanity check the assets or to handle an","aggregator at T2 being smaller than an aggregator at T1."],"type":"u128"},{"name":"maxObservationChangePerUpdate","docs":["The most that an observation can change per update."],"type":"u128"},{"name":"initialObservation","docs":["What the initial `latest_observation` is set to."],"type":"u128"},{"name":"startDelaySlots","docs":["Number of slots after amm.created_at_slot to start recording TWAP"],"type":"u64"}]}},{"name":"SwapType","type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}}],"events":[{"name":"SwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputAmount","type":"u64","index":false},{"name":"swapType","type":{"defined":"SwapType"},"index":false}]},{"name":"AddLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"quoteAmount","type":"u64","index":false},{"name":"maxBaseAmount","type":"u64","index":false},{"name":"minLpTokens","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"lpTokensMinted","type":"u64","index":false}]},{"name":"RemoveLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"lpTokensBurned","type":"u64","index":false},{"name":"minQuoteAmount","type":"u64","index":false},{"name":"minBaseAmount","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"quoteAmount","type":"u64","index":false}]},{"name":"CreateAmmEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"twapInitialObservation","type":"u128","index":false},{"name":"twapMaxObservationChangePerUpdate","type":"u128","index":false},{"name":"lpMint","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"vaultAtaBase","type":"publicKey","index":false},{"name":"vaultAtaQuote","type":"publicKey","index":false}]},{"name":"CrankThatTwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false}]}],"errors":[{"code":6000,"name":"AssertFailed","msg":"An assertion failed"},{"code":6001,"name":"NoSlotsPassed","msg":"Can't get a TWAP before some observations have been stored"},{"code":6002,"name":"NoReserves","msg":"Can't swap through a pool without token reserves on either side"},{"code":6003,"name":"InputAmountOverflow","msg":"Input token amount is too large for a swap, causes overflow"},{"code":6004,"name":"AddLiquidityCalculationError","msg":"Add liquidity calculation error"},{"code":6005,"name":"DecimalScaleError","msg":"Error in decimal scale conversion"},{"code":6006,"name":"SameTokenMints","msg":"You can't create an AMM pool where the token mints are the same"},{"code":6007,"name":"SwapSlippageExceeded","msg":"A user wouldn't have gotten back their `output_amount_min`, reverting"},{"code":6008,"name":"InsufficientBalance","msg":"The user had insufficient balance to do this"},{"code":6009,"name":"ZeroLiquidityRemove","msg":"Must remove a non-zero amount of liquidity"},{"code":6010,"name":"ZeroLiquidityToAdd","msg":"Cannot add liquidity with 0 tokens on either side"},{"code":6011,"name":"ZeroMinLpTokens","msg":"Must specify a non-zero `min_lp_tokens` when adding to an existing pool"},{"code":6012,"name":"AddLiquiditySlippageExceeded","msg":"LP wouldn't have gotten back `lp_token_min`"},{"code":6013,"name":"AddLiquidityMaxBaseExceeded","msg":"LP would have spent more than `max_base_amount`"},{"code":6014,"name":"InsufficientQuoteAmount","msg":"`quote_amount` must be greater than 100000000 when initializing a pool"},{"code":6015,"name":"ZeroSwapAmount","msg":"Users must swap a non-zero amount"},{"code":6016,"name":"ConstantProductInvariantFailed","msg":"K should always be increasing"},{"code":6017,"name":"CastingOverflow","msg":"Casting has caused an overflow"}]} \ No newline at end of file diff --git a/idls/metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json b/idls/metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json new file mode 100644 index 0000000..6d88d2c --- /dev/null +++ b/idls/metadao_futarchy.FUTARELBfJfQ8RDGhg1wdhddq1odMAJUePHFuBYfUxKq.json @@ -0,0 +1 @@ +{"version":"0.6.1","name":"futarchy","instructions":[{"name":"initializeDao","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"daoCreator","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"squadsProgramConfig","isMut":false,"isSigner":false},{"name":"squadsProgramConfigTreasury","isMut":true,"isSigner":false},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"futarchyAmmBaseVault","isMut":true,"isSigner":false},{"name":"futarchyAmmQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitializeDaoParams"}}]},{"name":"initializeProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":false,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"question","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":false,"isSigner":false},{"name":"baseVault","isMut":false,"isSigner":false},{"name":"proposer","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"stakeToProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"stakerBaseAccount","isMut":true,"isSigner":false},{"name":"proposalBaseAccount","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"staker","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"StakeToProposalParams"}}]},{"name":"unstakeFromProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"stakerBaseAccount","isMut":true,"isSigner":false},{"name":"proposalBaseAccount","isMut":true,"isSigner":false},{"name":"stakeAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"staker","isMut":true,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"UnstakeFromProposalParams"}}]},{"name":"launchProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"baseVault","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":false,"isSigner":false},{"name":"passBaseMint","isMut":false,"isSigner":false},{"name":"passQuoteMint","isMut":false,"isSigner":false},{"name":"failBaseMint","isMut":false,"isSigner":false},{"name":"failQuoteMint","isMut":false,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsProposal","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"finalizeProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"question","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false},{"name":"vaultEventAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"quoteVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"passQuoteMint","isMut":true,"isSigner":false},{"name":"failQuoteMint","isMut":true,"isSigner":false},{"name":"passBaseMint","isMut":true,"isSigner":false},{"name":"failBaseMint","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"baseVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"updateDao","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"daoParams","type":{"defined":"UpdateDaoParams"}}]},{"name":"resizeDao","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"spotSwap","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"SpotSwapParams"}}]},{"name":"conditionalSwap","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"proposal","isMut":false,"isSigner":false},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"trader","isMut":false,"isSigner":true},{"name":"userInputAccount","isMut":true,"isSigner":false},{"name":"userOutputAccount","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"baseVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"quoteVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"passBaseMint","isMut":true,"isSigner":false},{"name":"failBaseMint","isMut":true,"isSigner":false},{"name":"passQuoteMint","isMut":true,"isSigner":false},{"name":"failQuoteMint","isMut":true,"isSigner":false},{"name":"conditionalVaultProgram","isMut":false,"isSigner":false},{"name":"vaultEventAuthority","isMut":false,"isSigner":false},{"name":"question","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ConditionalSwapParams"}}]},{"name":"provideLiquidity","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"liquidityProvider","isMut":false,"isSigner":true},{"name":"liquidityProviderBaseAccount","isMut":true,"isSigner":false},{"name":"liquidityProviderQuoteAccount","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"ammPosition","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"ProvideLiquidityParams"}}]},{"name":"withdrawLiquidity","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"positionAuthority","isMut":false,"isSigner":true},{"name":"liquidityProviderBaseAccount","isMut":true,"isSigner":false},{"name":"liquidityProviderQuoteAccount","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"ammPosition","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"WithdrawLiquidityParams"}}]},{"name":"collectFees","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"baseTokenAccount","isMut":true,"isSigner":false},{"name":"quoteTokenAccount","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"executeSpendingLimitChange","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false},{"name":"vaultTransaction","isMut":false,"isSigner":false}],"args":[]},{"name":"sponsorProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"teamAddress","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"collectMeteoraDammFees","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":true,"isSigner":false},{"name":"squadsMultisigVaultTransaction","isMut":true,"isSigner":false},{"name":"squadsMultisigProposal","isMut":true,"isSigner":false},{"name":"squadsMultisigPermissionlessAccount","isMut":false,"isSigner":true},{"name":"meteoraClaimPositionFeesAccounts","accounts":[{"name":"dammV2Program","isMut":false,"isSigner":false},{"name":"dammV2EventAuthority","isMut":false,"isSigner":false},{"name":"poolAuthority","isMut":false,"isSigner":false},{"name":"pool","isMut":false,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"tokenAAccount","isMut":true,"isSigner":false,"docs":["Token account of base tokens recipient"]},{"name":"tokenBAccount","isMut":true,"isSigner":false,"docs":["Token account of quote tokens recipient"]},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"tokenAMint","isMut":false,"isSigner":false},{"name":"tokenBMint","isMut":false,"isSigner":false},{"name":"positionNftAccount","isMut":false,"isSigner":false},{"name":"owner","isMut":false,"isSigner":false},{"name":"tokenAProgram","isMut":false,"isSigner":false},{"name":"tokenBProgram","isMut":false,"isSigner":false}]},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"initiateVaultSpendOptimisticProposal","accounts":[{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"squadsSpendingLimit","isMut":false,"isSigner":false},{"name":"squadsProposal","isMut":false,"isSigner":false},{"name":"squadsVaultTransaction","isMut":false,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"daoQuoteVaultAccount","isMut":false,"isSigner":false},{"name":"proposer","isMut":false,"isSigner":true},{"name":"recipient","isMut":false,"isSigner":false},{"name":"recipientQuoteAccount","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"params","type":{"defined":"InitiateVaultSpendOptimisticProposalParams"}}]},{"name":"finalizeOptimisticProposal","accounts":[{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"adminEnqueueMultisigProposalApproval","accounts":[{"name":"dao","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProposal","isMut":false,"isSigner":false},{"name":"enqueuedApproval","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"AdminEnqueueMultisigProposalApprovalArgs"}}]},{"name":"executeMultisigProposalApproval","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"rentReceiver","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigProposal","isMut":true,"isSigner":false},{"name":"enqueuedApproval","isMut":true,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"adminExecuteMultisigProposal","accounts":[{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigProposal","isMut":true,"isSigner":false},{"name":"squadsMultisigVaultTransaction","isMut":true,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"adminCancelProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"question","isMut":true,"isSigner":false},{"name":"squadsProposal","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigProgram","isMut":false,"isSigner":false},{"name":"ammPassBaseVault","isMut":true,"isSigner":false},{"name":"ammPassQuoteVault","isMut":true,"isSigner":false},{"name":"ammFailBaseVault","isMut":true,"isSigner":false},{"name":"ammFailQuoteVault","isMut":true,"isSigner":false},{"name":"ammBaseVault","isMut":true,"isSigner":false},{"name":"ammQuoteVault","isMut":true,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false},{"name":"vaultEventAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"quoteVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"passQuoteMint","isMut":true,"isSigner":false},{"name":"failQuoteMint","isMut":true,"isSigner":false},{"name":"passBaseMint","isMut":true,"isSigner":false},{"name":"failBaseMint","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"baseVaultUnderlyingTokenAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"adminRemoveProposal","accounts":[{"name":"proposal","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"AmmPosition","type":{"kind":"struct","fields":[{"name":"dao","type":"publicKey"},{"name":"positionAuthority","type":"publicKey"},{"name":"liquidity","type":"u128"}]}},{"name":"Dao","type":{"kind":"struct","fields":[{"name":"amm","docs":["Embedded FutarchyAmm - 1:1 relationship"],"type":{"defined":"FutarchyAmm"}},{"name":"nonce","docs":["`nonce` + `dao_creator` are PDA seeds"],"type":"u64"},{"name":"daoCreator","type":"publicKey"},{"name":"pdaBump","type":"u8"},{"name":"squadsMultisig","type":"publicKey"},{"name":"squadsMultisigVault","type":"publicKey"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"proposalCount","type":"u32"},{"name":"passThresholdBps","type":"u16"},{"name":"secondsPerProposal","type":"u32"},{"name":"twapInitialObservation","docs":["For manipulation-resistance the TWAP is a time-weighted average observation,","where observation tries to approximate price but can only move by","`twap_max_observation_change_per_update` per update. Because it can only move","a little bit per update, you need to check that it has a good initial observation.","Otherwise, an attacker could create a very high initial observation in the pass","market and a very low one in the fail market to force the proposal to pass.","","We recommend setting an initial observation around the spot price of the token,","and max observation change per update around 2% the spot price of the token.","For example, if the spot price of META is $400, we'd recommend setting an initial","observation of 400 (converted into the AMM prices) and a max observation change per","update of 8 (also converted into the AMM prices). Observations can be updated once","a minute, so 2% allows the proposal market to reach double the spot price or 0","in 50 minutes."],"type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySeconds","docs":["Forces TWAP calculation to start after `twap_start_delay_seconds` seconds"],"type":"u32"},{"name":"minQuoteFutarchicLiquidity","docs":["As an anti-spam measure and to help liquidity, you need to lock up some liquidity","in both futarchic markets in order to create a proposal.","","For example, for META, we can use a `min_quote_futarchic_liquidity` of","5000 * 1_000_000 (5000 USDC) and a `min_base_futarchic_liquidity` of","10 * 1_000_000_000 (10 META)."],"type":"u64"},{"name":"minBaseFutarchicLiquidity","type":"u64"},{"name":"baseToStake","docs":["Minimum amount of base tokens that must be staked to launch a proposal"],"type":"u64"},{"name":"seqNum","type":"u64"},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}}},{"name":"teamSponsoredPassThresholdBps","docs":["The percentage, in basis points, the pass price needs to be above the","fail price in order for the proposal to pass for team-sponsored proposals.","","Can be negative to allow for team-sponsored proposals to pass by default."],"type":"i16"},{"name":"teamAddress","type":"publicKey"},{"name":"optimisticProposal","type":{"option":{"defined":"OptimisticProposal"}}},{"name":"isOptimisticGovernanceEnabled","type":"bool"}]}},{"name":"OldDao","type":{"kind":"struct","fields":[{"name":"amm","docs":["Embedded FutarchyAmm - 1:1 relationship"],"type":{"defined":"FutarchyAmm"}},{"name":"nonce","docs":["`nonce` + `dao_creator` are PDA seeds"],"type":"u64"},{"name":"daoCreator","type":"publicKey"},{"name":"pdaBump","type":"u8"},{"name":"squadsMultisig","type":"publicKey"},{"name":"squadsMultisigVault","type":"publicKey"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"proposalCount","type":"u32"},{"name":"passThresholdBps","type":"u16"},{"name":"secondsPerProposal","type":"u32"},{"name":"twapInitialObservation","docs":["For manipulation-resistance the TWAP is a time-weighted average observation,","where observation tries to approximate price but can only move by","`twap_max_observation_change_per_update` per update. Because it can only move","a little bit per update, you need to check that it has a good initial observation.","Otherwise, an attacker could create a very high initial observation in the pass","market and a very low one in the fail market to force the proposal to pass.","","We recommend setting an initial observation around the spot price of the token,","and max observation change per update around 2% the spot price of the token.","For example, if the spot price of META is $400, we'd recommend setting an initial","observation of 400 (converted into the AMM prices) and a max observation change per","update of 8 (also converted into the AMM prices). Observations can be updated once","a minute, so 2% allows the proposal market to reach double the spot price or 0","in 50 minutes."],"type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySeconds","docs":["Forces TWAP calculation to start after `twap_start_delay_seconds` seconds"],"type":"u32"},{"name":"minQuoteFutarchicLiquidity","docs":["As an anti-spam measure and to help liquidity, you need to lock up some liquidity","in both futarchic markets in order to create a proposal.","","For example, for META, we can use a `min_quote_futarchic_liquidity` of","5000 * 1_000_000 (5000 USDC) and a `min_base_futarchic_liquidity` of","10 * 1_000_000_000 (10 META)."],"type":"u64"},{"name":"minBaseFutarchicLiquidity","type":"u64"},{"name":"baseToStake","docs":["Minimum amount of base tokens that must be staked to launch a proposal"],"type":"u64"},{"name":"seqNum","type":"u64"},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}}},{"name":"teamSponsoredPassThresholdBps","docs":["The percentage, in basis points, the pass price needs to be above the","fail price in order for the proposal to pass for team-sponsored proposals.","","Can be negative to allow for team-sponsored proposals to pass by default."],"type":"i16"},{"name":"teamAddress","type":"publicKey"}]}},{"name":"EnqueuedMultisigProposalApproval","type":{"kind":"struct","fields":[{"name":"dao","type":"publicKey"},{"name":"transactionIndex","type":"u64"},{"name":"pdaBump","type":"u8"}]}},{"name":"Proposal","type":{"kind":"struct","fields":[{"name":"number","type":"u32"},{"name":"proposer","type":"publicKey"},{"name":"timestampEnqueued","type":"i64"},{"name":"state","type":{"defined":"ProposalState"}},{"name":"baseVault","type":"publicKey"},{"name":"quoteVault","type":"publicKey"},{"name":"dao","type":"publicKey"},{"name":"pdaBump","type":"u8"},{"name":"question","type":"publicKey"},{"name":"durationInSeconds","type":"u32"},{"name":"squadsProposal","type":"publicKey"},{"name":"passBaseMint","type":"publicKey"},{"name":"passQuoteMint","type":"publicKey"},{"name":"failBaseMint","type":"publicKey"},{"name":"failQuoteMint","type":"publicKey"},{"name":"isTeamSponsored","type":"bool"}]}},{"name":"StakeAccount","type":{"kind":"struct","fields":[{"name":"proposal","type":"publicKey"},{"name":"staker","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"bump","type":"u8"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"daoSeqNum","type":"u64"}]}},{"name":"AdminEnqueueMultisigProposalApprovalArgs","type":{"kind":"struct","fields":[{"name":"transactionIndex","type":"u64"}]}},{"name":"ConditionalSwapParams","type":{"kind":"struct","fields":[{"name":"market","type":{"defined":"Market"}},{"name":"swapType","type":{"defined":"SwapType"}},{"name":"inputAmount","type":"u64"},{"name":"minOutputAmount","type":"u64"}]}},{"name":"InitializeDaoParams","type":{"kind":"struct","fields":[{"name":"twapInitialObservation","type":"u128"},{"name":"twapMaxObservationChangePerUpdate","type":"u128"},{"name":"twapStartDelaySeconds","type":"u32"},{"name":"minQuoteFutarchicLiquidity","type":"u64"},{"name":"minBaseFutarchicLiquidity","type":"u64"},{"name":"baseToStake","type":"u64"},{"name":"passThresholdBps","type":"u16"},{"name":"secondsPerProposal","type":"u32"},{"name":"nonce","type":"u64"},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}}},{"name":"teamSponsoredPassThresholdBps","type":"i16"},{"name":"teamAddress","type":"publicKey"}]}},{"name":"InitiateVaultSpendOptimisticProposalParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"ProvideLiquidityParams","type":{"kind":"struct","fields":[{"name":"quoteAmount","docs":["How much quote token you will deposit to the pool"],"type":"u64"},{"name":"maxBaseAmount","docs":["The maximum base token you will deposit to the pool"],"type":"u64"},{"name":"minLiquidity","docs":["The minimum liquidity you will be assigned"],"type":"u128"},{"name":"positionAuthority","docs":["The account that will own the LP position, usually the same as the","liquidity provider"],"type":"publicKey"}]}},{"name":"SpotSwapParams","type":{"kind":"struct","fields":[{"name":"inputAmount","type":"u64"},{"name":"swapType","type":{"defined":"SwapType"}},{"name":"minOutputAmount","type":"u64"}]}},{"name":"StakeToProposalParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"UnstakeFromProposalParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"UpdateDaoParams","type":{"kind":"struct","fields":[{"name":"passThresholdBps","type":{"option":"u16"}},{"name":"secondsPerProposal","type":{"option":"u32"}},{"name":"twapInitialObservation","type":{"option":"u128"}},{"name":"twapMaxObservationChangePerUpdate","type":{"option":"u128"}},{"name":"twapStartDelaySeconds","type":{"option":"u32"}},{"name":"minQuoteFutarchicLiquidity","type":{"option":"u64"}},{"name":"minBaseFutarchicLiquidity","type":{"option":"u64"}},{"name":"baseToStake","type":{"option":"u64"}},{"name":"teamSponsoredPassThresholdBps","type":{"option":"i16"}},{"name":"teamAddress","type":{"option":"publicKey"}},{"name":"isOptimisticGovernanceEnabled","type":{"option":"bool"}}]}},{"name":"WithdrawLiquidityParams","type":{"kind":"struct","fields":[{"name":"liquidityToWithdraw","docs":["How much liquidity to withdraw"],"type":"u128"},{"name":"minBaseAmount","docs":["Minimum base tokens to receive"],"type":"u64"},{"name":"minQuoteAmount","docs":["Minimum quote tokens to receive"],"type":"u64"}]}},{"name":"OptimisticProposal","type":{"kind":"struct","fields":[{"name":"squadsProposal","docs":["The squads proposal currently enqueued for execution if not challenged by a new proposal."],"type":"publicKey"},{"name":"enqueuedTimestamp","docs":["The timestamp when the active optimistic squads proposal was enqueued."],"type":"i64"}]}},{"name":"InitialSpendingLimit","type":{"kind":"struct","fields":[{"name":"amountPerMonth","type":"u64"},{"name":"members","type":{"vec":"publicKey"}}]}},{"name":"FutarchyAmm","type":{"kind":"struct","fields":[{"name":"state","type":{"defined":"PoolState"}},{"name":"totalLiquidity","type":"u128"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"ammBaseVault","type":"publicKey"},{"name":"ammQuoteVault","type":"publicKey"}]}},{"name":"TwapOracle","type":{"kind":"struct","fields":[{"name":"aggregator","docs":["Running sum of seconds_since_last_update * last_observation.","","Assuming latest observations are as big as possible (u64::MAX * 1e12),","we can store 18 million seconds worth of observations, which turns out to","be ~213 days.","","Assuming that latest observations are 100x smaller than they could theoretically","be, we can store ~57 years worth of them. Even this is a very","very conservative assumption - META/USDC prices should be between 1e9 and","1e15, which would overflow after 1e15 years.","","So in the case of an overflow, the aggregator rolls back to 0. It's the","client's responsibility to sanity check the assets or to handle an","aggregator at T2 being smaller than an aggregator at T1."],"type":"u128"},{"name":"lastUpdatedTimestamp","type":"i64"},{"name":"createdAtTimestamp","type":"i64"},{"name":"lastPrice","docs":["A price is the number of quote units per base unit multiplied by 1e12.","You cannot simply divide by 1e12 to get a price you can display in the UI","because the base and quote decimals may be different. Instead, do:","ui_price = (price * (10**(base_decimals - quote_decimals))) / 1e12"],"type":"u128"},{"name":"lastObservation","docs":["If we did a raw TWAP over prices, someone could push the TWAP heavily with","a few extremely large outliers. So we use observations, which can only move","by `max_observation_change_per_update` per update."],"type":"u128"},{"name":"maxObservationChangePerUpdate","docs":["The most that an observation can change per update."],"type":"u128"},{"name":"initialObservation","docs":["What the initial `latest_observation` is set to."],"type":"u128"},{"name":"startDelaySeconds","docs":["Number of seconds after amm.created_at_slot to start recording TWAP"],"type":"u32"}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"oracle","type":{"defined":"TwapOracle"}},{"name":"quoteReserves","type":"u64"},{"name":"baseReserves","type":"u64"},{"name":"quoteProtocolFeeBalance","type":"u64"},{"name":"baseProtocolFeeBalance","type":"u64"}]}},{"name":"PoolState","type":{"kind":"enum","variants":[{"name":"Spot","fields":[{"name":"spot","type":{"defined":"Pool"}}]},{"name":"Futarchy","fields":[{"name":"spot","type":{"defined":"Pool"}},{"name":"pass","type":{"defined":"Pool"}},{"name":"fail","type":{"defined":"Pool"}}]}]}},{"name":"Market","type":{"kind":"enum","variants":[{"name":"Spot"},{"name":"Pass"},{"name":"Fail"}]}},{"name":"SwapType","type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}},{"name":"Token","type":{"kind":"enum","variants":[{"name":"Base"},{"name":"Quote"}]}},{"name":"ProposalState","type":{"kind":"enum","variants":[{"name":"Draft","fields":[{"name":"amountStaked","type":"u64"}]},{"name":"Pending"},{"name":"Passed"},{"name":"Failed"},{"name":"Removed"}]}}],"events":[{"name":"CollectFeesEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"baseTokenAccount","type":"publicKey","index":false},{"name":"quoteTokenAccount","type":"publicKey","index":false},{"name":"ammBaseVault","type":"publicKey","index":false},{"name":"ammQuoteVault","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteFeesCollected","type":"u64","index":false},{"name":"baseFeesCollected","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"InitializeDaoEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"passThresholdBps","type":"u16","index":false},{"name":"secondsPerProposal","type":"u32","index":false},{"name":"twapInitialObservation","type":"u128","index":false},{"name":"twapMaxObservationChangePerUpdate","type":"u128","index":false},{"name":"twapStartDelaySeconds","type":"u32","index":false},{"name":"minQuoteFutarchicLiquidity","type":"u64","index":false},{"name":"minBaseFutarchicLiquidity","type":"u64","index":false},{"name":"baseToStake","type":"u64","index":false},{"name":"initialSpendingLimit","type":{"option":{"defined":"InitialSpendingLimit"}},"index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"squadsMultisigVault","type":"publicKey","index":false},{"name":"teamSponsoredPassThresholdBps","type":"i16","index":false},{"name":"teamAddress","type":"publicKey","index":false}]},{"name":"UpdateDaoEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"passThresholdBps","type":"u16","index":false},{"name":"secondsPerProposal","type":"u32","index":false},{"name":"twapInitialObservation","type":"u128","index":false},{"name":"twapMaxObservationChangePerUpdate","type":"u128","index":false},{"name":"twapStartDelaySeconds","type":"u32","index":false},{"name":"minQuoteFutarchicLiquidity","type":"u64","index":false},{"name":"minBaseFutarchicLiquidity","type":"u64","index":false},{"name":"baseToStake","type":"u64","index":false},{"name":"teamSponsoredPassThresholdBps","type":"i16","index":false},{"name":"teamAddress","type":"publicKey","index":false},{"name":"isOptimisticGovernanceEnabled","type":"bool","index":false}]},{"name":"InitializeProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"question","type":"publicKey","index":false},{"name":"quoteVault","type":"publicKey","index":false},{"name":"baseVault","type":"publicKey","index":false},{"name":"proposer","type":"publicKey","index":false},{"name":"number","type":"u32","index":false},{"name":"pdaBump","type":"u8","index":false},{"name":"durationInSeconds","type":"u32","index":false},{"name":"squadsProposal","type":"publicKey","index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"squadsMultisigVault","type":"publicKey","index":false}]},{"name":"StakeToProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"staker","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"totalStaked","type":"u64","index":false}]},{"name":"UnstakeFromProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"staker","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"totalStaked","type":"u64","index":false}]},{"name":"LaunchProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"timestampEnqueued","type":"i64","index":false},{"name":"totalStaked","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"FinalizeProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"passMarketTwap","type":"u128","index":false},{"name":"failMarketTwap","type":"u128","index":false},{"name":"threshold","type":"u128","index":false},{"name":"state","type":{"defined":"ProposalState"},"index":false},{"name":"squadsProposal","type":"publicKey","index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false},{"name":"isTeamSponsored","type":"bool","index":false}]},{"name":"SpotSwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"swapType","type":{"defined":"SwapType"},"index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputAmount","type":"u64","index":false},{"name":"minOutputAmount","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"ConditionalSwapEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"trader","type":"publicKey","index":false},{"name":"market","type":{"defined":"Market"},"index":false},{"name":"swapType","type":{"defined":"SwapType"},"index":false},{"name":"inputAmount","type":"u64","index":false},{"name":"outputAmount","type":"u64","index":false},{"name":"minOutputAmount","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"ProvideLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"liquidityProvider","type":"publicKey","index":false},{"name":"positionAuthority","type":"publicKey","index":false},{"name":"quoteAmount","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"liquidityMinted","type":"u128","index":false},{"name":"minLiquidity","type":"u128","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"WithdrawLiquidityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"liquidityProvider","type":"publicKey","index":false},{"name":"liquidityWithdrawn","type":"u128","index":false},{"name":"minBaseAmount","type":"u64","index":false},{"name":"minQuoteAmount","type":"u64","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"quoteAmount","type":"u64","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"SponsorProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"teamAddress","type":"publicKey","index":false}]},{"name":"RemoveProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"admin","type":"publicKey","index":false}]},{"name":"AdminCancelProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"proposal","type":"publicKey","index":false},{"name":"dao","type":"publicKey","index":false},{"name":"admin","type":"publicKey","index":false},{"name":"postAmmState","type":{"defined":"FutarchyAmm"},"index":false}]},{"name":"CollectMeteoraDammFeesEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false},{"name":"baseTokenAccount","type":"publicKey","index":false},{"name":"quoteTokenAccount","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteFeesCollected","type":"u64","index":false},{"name":"baseFeesCollected","type":"u64","index":false}]},{"name":"AdminFixPositionAuthorityEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"admin","type":"publicKey","index":false},{"name":"ammPosition","type":"publicKey","index":false},{"name":"oldAuthority","type":"publicKey","index":false},{"name":"newAuthority","type":"publicKey","index":false}]},{"name":"InitiateVaultSpendOptimisticProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"proposer","type":"publicKey","index":false},{"name":"squadsProposal","type":"publicKey","index":false},{"name":"squadsMultisig","type":"publicKey","index":false},{"name":"squadsMultisigVault","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"recipient","type":"publicKey","index":false},{"name":"daoQuoteVaultAccount","type":"publicKey","index":false},{"name":"recipientQuoteAccount","type":"publicKey","index":false},{"name":"enqueuedTimestamp","type":"i64","index":false}]},{"name":"FinalizeOptimisticProposalEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"dao","type":"publicKey","index":false},{"name":"squadsProposal","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"AmmTooOld","msg":"Amms must have been created within 5 minutes (counted in slots) of proposal initialization"},{"code":6001,"name":"InvalidInitialObservation","msg":"An amm has an `initial_observation` that doesn't match the `dao`'s config"},{"code":6002,"name":"InvalidMaxObservationChange","msg":"An amm has a `max_observation_change_per_update` that doesn't match the `dao`'s config"},{"code":6003,"name":"InvalidStartDelaySlots","msg":"An amm has a `start_delay_slots` that doesn't match the `dao`'s config"},{"code":6004,"name":"InvalidSettlementAuthority","msg":"One of the vaults has an invalid `settlement_authority`"},{"code":6005,"name":"ProposalTooYoung","msg":"Proposal is too young to be executed or rejected"},{"code":6006,"name":"MarketsTooYoung","msg":"Markets too young for proposal to be finalized. TWAP might need to be cranked"},{"code":6007,"name":"ProposalAlreadyFinalized","msg":"This proposal has already been finalized"},{"code":6008,"name":"InvalidVaultNonce","msg":"A conditional vault has an invalid nonce. A nonce should encode the proposal number"},{"code":6009,"name":"ProposalNotPassed","msg":"This proposal can't be executed because it isn't in the passed state"},{"code":6010,"name":"InsufficientLiquidity","msg":"More liquidity needs to be in the AMM to launch this proposal"},{"code":6011,"name":"ProposalDurationTooShort","msg":"Proposal duration must be longer 1 day and longer than 2 times the TWAP start delay"},{"code":6012,"name":"PassThresholdTooHigh","msg":"Pass threshold must be less than 10%"},{"code":6013,"name":"QuestionMustBeBinary","msg":"Question must have exactly 2 outcomes for binary futarchy"},{"code":6014,"name":"InvalidSquadsProposalStatus","msg":"Squads proposal must be in Active status"},{"code":6015,"name":"CastingOverflow","msg":"Casting overflow. If you're seeing this, please report this"},{"code":6016,"name":"InsufficientBalance","msg":"Insufficient balance"},{"code":6017,"name":"ZeroLiquidityRemove","msg":"Cannot remove zero liquidity"},{"code":6018,"name":"SwapSlippageExceeded","msg":"Swap slippage exceeded"},{"code":6019,"name":"AssertFailed","msg":"Assert failed"},{"code":6020,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6021,"name":"ProposalNotInDraftState","msg":"Proposal is not in draft state"},{"code":6022,"name":"InsufficientTokenBalance","msg":"Insufficient token balance"},{"code":6023,"name":"InvalidAmount","msg":"Invalid amount"},{"code":6024,"name":"InsufficientStakeToLaunch","msg":"Insufficient stake to launch proposal"},{"code":6025,"name":"StakerNotFound","msg":"Staker not found in proposal"},{"code":6026,"name":"PoolNotInSpotState","msg":"Pool must be in spot state"},{"code":6027,"name":"InvalidDaoCreateLiquidity","msg":"If you're providing liquidity, you must provide both base and quote token accounts"},{"code":6028,"name":"InvalidStakeAccount","msg":"Invalid stake account"},{"code":6029,"name":"InvariantViolated","msg":"An invariant was violated. You should get in contact with the MetaDAO team if you see this"},{"code":6030,"name":"ProposalNotActive","msg":"Proposal needs to be active to perform a conditional swap"},{"code":6031,"name":"InvalidTransaction","msg":"This Squads transaction should only contain calls to update spending limits"},{"code":6032,"name":"ProposalAlreadySponsored","msg":"Proposal has already been sponsored"},{"code":6033,"name":"InvalidTeamSponsoredPassThreshold","msg":"Team sponsored pass threshold must be between -10% and 10%"},{"code":6034,"name":"InvalidTargetK","msg":"Target K must be greater than the current K"},{"code":6035,"name":"InvalidTransactionMessage","msg":"Failed to compile transaction message for Squads vault transaction"},{"code":6036,"name":"InvalidMint","msg":"Base mint and quote mint must be different"},{"code":6037,"name":"ProposalNotReadyToUnstake","msg":"Proposal is not ready to be unstaked"},{"code":6038,"name":"OptimisticGovernanceDisabled","msg":"Optimistic governance is disabled"},{"code":6039,"name":"ActiveOptimisticProposalAlreadyEnqueued","msg":"An active optimistic proposal is already enqueued"},{"code":6040,"name":"OptimisticProposalAlreadyPassed","msg":"Optimistic proposal has already passed"},{"code":6041,"name":"InvalidSpendingLimitMint","msg":"Invalid spending limit mint. Must be the same as the DAO's quote mint"},{"code":6042,"name":"NoActiveOptimisticProposal","msg":"No active optimistic proposal"}]} \ No newline at end of file diff --git a/idls/metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json b/idls/metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json new file mode 100644 index 0000000..0bf7c0c --- /dev/null +++ b/idls/metadao_launchpad.moontUzsdepotRGe5xsfip7vLPTJnVuafqdUWexVnPM.json @@ -0,0 +1 @@ +{"version":"0.7.0","name":"launchpad_v7","instructions":[{"name":"initializeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"tokenMetadata","isMut":true,"isSigner":false},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"quoteVault","isMut":true,"isSigner":false},{"name":"baseVault","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchAuthority","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"additionalTokensRecipient","isMut":false,"isSigner":false,"isOptional":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeLaunchArgs"}}]},{"name":"startLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"launchAuthority","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"fund","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchQuoteVault","isMut":true,"isSigner":false},{"name":"funder","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"funderQuoteAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"setFundingRecordApproval","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchAuthority","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"approvedAmount","type":"u64"}]},{"name":"completeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"launchAuthority","isMut":false,"isSigner":true,"isOptional":true},{"name":"tokenMetadata","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchSigner","isMut":true,"isSigner":false},{"name":"launchQuoteVault","isMut":true,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"treasuryQuoteAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"daoOwnedLpPosition","isMut":true,"isSigner":false},{"name":"futarchyAmmBaseVault","isMut":true,"isSigner":false},{"name":"futarchyAmmQuoteVault","isMut":true,"isSigner":false},{"name":"dao","isMut":true,"isSigner":false},{"name":"squadsMultisig","isMut":true,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"spendingLimit","isMut":true,"isSigner":false},{"name":"bidWall","isMut":true,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"staticAccounts","accounts":[{"name":"futarchyProgram","isMut":false,"isSigner":false},{"name":"tokenMetadataProgram","isMut":false,"isSigner":false},{"name":"futarchyEventAuthority","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"squadsProgramConfig","isMut":false,"isSigner":false},{"name":"squadsProgramConfigTreasury","isMut":true,"isSigner":false},{"name":"bidWallProgram","isMut":false,"isSigner":false},{"name":"bidWallEventAuthority","isMut":false,"isSigner":false}]},{"name":"meteoraAccounts","accounts":[{"name":"dammV2Program","isMut":false,"isSigner":false},{"name":"config","isMut":false,"isSigner":false},{"name":"token2022Program","isMut":false,"isSigner":false},{"name":"positionNftAccount","isMut":true,"isSigner":false},{"name":"pool","isMut":true,"isSigner":false},{"name":"position","isMut":true,"isSigner":false},{"name":"positionNftMint","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenAVault","isMut":true,"isSigner":false},{"name":"tokenBVault","isMut":true,"isSigner":false},{"name":"poolCreatorAuthority","isMut":false,"isSigner":false},{"name":"poolAuthority","isMut":false,"isSigner":false},{"name":"dammV2EventAuthority","isMut":false,"isSigner":false}]},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"refund","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchQuoteVault","isMut":true,"isSigner":false},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"funder","isMut":false,"isSigner":false},{"name":"funderQuoteAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"claim","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"funder","isMut":false,"isSigner":false},{"name":"funderTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"closeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"claimAdditionalTokenAllocation","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"additionalTokensRecipient","isMut":false,"isSigner":false},{"name":"additionalTokensRecipientTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"initializePerformancePackage","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"launchSigner","isMut":false,"isSigner":false},{"name":"launchBaseVault","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"dao","isMut":false,"isSigner":false},{"name":"squadsMultisig","isMut":false,"isSigner":false},{"name":"squadsMultisigVault","isMut":false,"isSigner":false},{"name":"performancePackage","isMut":true,"isSigner":false},{"name":"performancePackageTokenAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"squadsProgram","isMut":false,"isSigner":false},{"name":"priceBasedPerformancePackageProgram","isMut":false,"isSigner":false},{"name":"priceBasedPerformancePackageEventAuthority","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"resizeFundingRecord","accounts":[{"name":"fundingRecord","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"resizeLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"extendLaunch","accounts":[{"name":"launch","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"ExtendLaunchArgs"}}]}],"accounts":[{"name":"FundingRecord","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"funder","docs":["The funder."],"type":"publicKey"},{"name":"launch","docs":["The launch."],"type":"publicKey"},{"name":"committedAmount","docs":["The amount of USDC that has been committed by the funder."],"type":"u64"},{"name":"isTokensClaimed","docs":["Whether the tokens have been claimed."],"type":"bool"},{"name":"isUsdcRefunded","docs":["Whether the USDC has been refunded."],"type":"bool"},{"name":"approvedAmount","docs":["The amount of USDC that the launch authority has approved for the funder.","If zero, the funder has not been approved for any amount."],"type":"u64"},{"name":"committedAmountAccumulator","docs":["Running integral of committed_amount over time (committed_amount * seconds)."],"type":"u128"},{"name":"lastAccumulatorUpdate","docs":["Unix timestamp of the last accumulator update."],"type":"i64"}]}},{"name":"OldFundingRecord","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"funder","docs":["The funder."],"type":"publicKey"},{"name":"launch","docs":["The launch."],"type":"publicKey"},{"name":"committedAmount","docs":["The amount of USDC that has been committed by the funder."],"type":"u64"},{"name":"isTokensClaimed","docs":["Whether the tokens have been claimed."],"type":"bool"},{"name":"isUsdcRefunded","docs":["Whether the USDC has been refunded."],"type":"bool"},{"name":"approvedAmount","docs":["The amount of USDC that the launch authority has approved for the funder.","If zero, the funder has not been approved for any amount."],"type":"u64"}]}},{"name":"Launch","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"minimumRaiseAmount","docs":["The minimum amount of USDC that must be raised, otherwise","everyone can get their USDC back."],"type":"u64"},{"name":"monthlySpendingLimitAmount","docs":["The monthly spending limit the DAO allocates to the team. Must be","less than 1/6th of the minimum raise amount (so 6 months of burn)."],"type":"u64"},{"name":"monthlySpendingLimitMembers","docs":["The wallets that have access to the monthly spending limit."],"type":{"vec":"publicKey"}},{"name":"launchAuthority","docs":["The account that can start the launch."],"type":"publicKey"},{"name":"launchSigner","docs":["The launch signer address. Needed because Raydium pools need a SOL payer and this PDA can't hold SOL."],"type":"publicKey"},{"name":"launchSignerPdaBump","docs":["The PDA bump for the launch signer."],"type":"u8"},{"name":"launchQuoteVault","docs":["The USDC vault that will hold the USDC raised until the launch is over."],"type":"publicKey"},{"name":"launchBaseVault","docs":["The token vault, used to send tokens to Raydium."],"type":"publicKey"},{"name":"baseMint","docs":["The token that will be minted to funders and that will control the DAO."],"type":"publicKey"},{"name":"quoteMint","docs":["The USDC mint."],"type":"publicKey"},{"name":"unixTimestampStarted","docs":["The unix timestamp when the launch was started."],"type":{"option":"i64"}},{"name":"unixTimestampClosed","docs":["The unix timestamp when the launch stopped taking new contributions."],"type":{"option":"i64"}},{"name":"totalCommittedAmount","docs":["The amount of USDC that has been committed by the users."],"type":"u64"},{"name":"state","docs":["The state of the launch."],"type":{"defined":"LaunchState"}},{"name":"seqNum","docs":["The sequence number of this launch. Useful for sorting events."],"type":"u64"},{"name":"secondsForLaunch","docs":["The number of seconds that the launch will be live for."],"type":"u32"},{"name":"dao","docs":["The DAO, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"daoVault","docs":["The DAO treasury that USDC / LP is sent to, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"performancePackageGrantee","docs":["The address that will receive the performance package tokens."],"type":"publicKey"},{"name":"performancePackageTokenAmount","docs":["The amount of tokens to be granted to the performance package grantee."],"type":"u64"},{"name":"monthsUntilInsidersCanUnlock","docs":["The number of months that insiders must wait before unlocking their tokens."],"type":"u8"},{"name":"teamAddress","docs":["The initial address used to sponsor team proposals."],"type":"publicKey"},{"name":"totalApprovedAmount","docs":["The amount of USDC that the launch authority has approved across all funders."],"type":"u64"},{"name":"additionalTokensAmount","docs":["The amount of additional tokens to be minted on a successful launch."],"type":"u64"},{"name":"additionalTokensRecipient","docs":["The token account that will receive the additional tokens."],"type":{"option":"publicKey"}},{"name":"additionalTokensClaimed","docs":["Are the additional tokens claimed"],"type":"bool"},{"name":"unixTimestampCompleted","docs":["The unix timestamp when the launch was completed."],"type":{"option":"i64"}},{"name":"isPerformancePackageInitialized","docs":["Whether the performance package has been initialized."],"type":"bool"},{"name":"accumulatorActivationDelaySeconds","docs":["Number of seconds after launch start before the funding accumulator","begins tracking."],"type":"u32"},{"name":"hasBidWall","docs":["Whether the launch has a bid wall."],"type":"bool"}]}},{"name":"OldLaunch","type":{"kind":"struct","fields":[{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"},{"name":"minimumRaiseAmount","docs":["The minimum amount of USDC that must be raised, otherwise","everyone can get their USDC back."],"type":"u64"},{"name":"monthlySpendingLimitAmount","docs":["The monthly spending limit the DAO allocates to the team. Must be","less than 1/6th of the minimum raise amount (so 6 months of burn)."],"type":"u64"},{"name":"monthlySpendingLimitMembers","docs":["The wallets that have access to the monthly spending limit."],"type":{"vec":"publicKey"}},{"name":"launchAuthority","docs":["The account that can start the launch."],"type":"publicKey"},{"name":"launchSigner","docs":["The launch signer address. Needed because Raydium pools need a SOL payer and this PDA can't hold SOL."],"type":"publicKey"},{"name":"launchSignerPdaBump","docs":["The PDA bump for the launch signer."],"type":"u8"},{"name":"launchQuoteVault","docs":["The USDC vault that will hold the USDC raised until the launch is over."],"type":"publicKey"},{"name":"launchBaseVault","docs":["The token vault, used to send tokens to Raydium."],"type":"publicKey"},{"name":"baseMint","docs":["The token that will be minted to funders and that will control the DAO."],"type":"publicKey"},{"name":"quoteMint","docs":["The USDC mint."],"type":"publicKey"},{"name":"unixTimestampStarted","docs":["The unix timestamp when the launch was started."],"type":{"option":"i64"}},{"name":"unixTimestampClosed","docs":["The unix timestamp when the launch stopped taking new contributions."],"type":{"option":"i64"}},{"name":"totalCommittedAmount","docs":["The amount of USDC that has been committed by the users."],"type":"u64"},{"name":"state","docs":["The state of the launch."],"type":{"defined":"LaunchState"}},{"name":"seqNum","docs":["The sequence number of this launch. Useful for sorting events."],"type":"u64"},{"name":"secondsForLaunch","docs":["The number of seconds that the launch will be live for."],"type":"u32"},{"name":"dao","docs":["The DAO, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"daoVault","docs":["The DAO treasury that USDC / LP is sent to, if the launch is complete."],"type":{"option":"publicKey"}},{"name":"performancePackageGrantee","docs":["The address that will receive the performance package tokens."],"type":"publicKey"},{"name":"performancePackageTokenAmount","docs":["The amount of tokens to be granted to the performance package grantee."],"type":"u64"},{"name":"monthsUntilInsidersCanUnlock","docs":["The number of months that insiders must wait before unlocking their tokens."],"type":"u8"},{"name":"teamAddress","docs":["The initial address used to sponsor team proposals."],"type":"publicKey"},{"name":"totalApprovedAmount","docs":["The amount of USDC that the launch authority has approved across all funders."],"type":"u64"},{"name":"additionalTokensAmount","docs":["The amount of additional tokens to be minted on a successful launch."],"type":"u64"},{"name":"additionalTokensRecipient","docs":["The token account that will receive the additional tokens."],"type":{"option":"publicKey"}},{"name":"additionalTokensClaimed","docs":["Are the additional tokens claimed"],"type":"bool"},{"name":"unixTimestampCompleted","docs":["The unix timestamp when the launch was completed."],"type":{"option":"i64"}},{"name":"isPerformancePackageInitialized","type":"bool"},{"name":"accumulatorActivationDelaySeconds","docs":["Number of seconds after launch start before the funding accumulator","begins tracking."],"type":"u32"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"launchSeqNum","type":"u64"}]}},{"name":"ExtendLaunchArgs","type":{"kind":"struct","fields":[{"name":"durationSeconds","type":"u32"}]}},{"name":"InitializeLaunchArgs","type":{"kind":"struct","fields":[{"name":"minimumRaiseAmount","type":"u64"},{"name":"monthlySpendingLimitAmount","type":"u64"},{"name":"monthlySpendingLimitMembers","type":{"vec":"publicKey"}},{"name":"secondsForLaunch","type":"u32"},{"name":"tokenName","type":"string"},{"name":"tokenSymbol","type":"string"},{"name":"tokenUri","type":"string"},{"name":"performancePackageGrantee","type":"publicKey"},{"name":"performancePackageTokenAmount","type":"u64"},{"name":"monthsUntilInsidersCanUnlock","type":"u8"},{"name":"teamAddress","type":"publicKey"},{"name":"additionalTokensAmount","type":"u64"},{"name":"accumulatorActivationDelaySeconds","type":"u32"},{"name":"hasBidWall","type":"bool"}]}},{"name":"LaunchState","type":{"kind":"enum","variants":[{"name":"Initialized"},{"name":"Live"},{"name":"Closed"},{"name":"Complete"},{"name":"Refunding"}]}}],"events":[{"name":"LaunchInitializedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"minimumRaiseAmount","type":"u64","index":false},{"name":"launchAuthority","type":"publicKey","index":false},{"name":"launchSigner","type":"publicKey","index":false},{"name":"launchSignerPdaBump","type":"u8","index":false},{"name":"launchUsdcVault","type":"publicKey","index":false},{"name":"launchTokenVault","type":"publicKey","index":false},{"name":"performancePackageGrantee","type":"publicKey","index":false},{"name":"performancePackageTokenAmount","type":"u64","index":false},{"name":"monthsUntilInsidersCanUnlock","type":"u8","index":false},{"name":"monthlySpendingLimitAmount","type":"u64","index":false},{"name":"monthlySpendingLimitMembers","type":{"vec":"publicKey"},"index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"pdaBump","type":"u8","index":false},{"name":"secondsForLaunch","type":"u32","index":false},{"name":"additionalTokensAmount","type":"u64","index":false},{"name":"additionalTokensRecipient","type":{"option":"publicKey"},"index":false},{"name":"accumulatorActivationDelaySeconds","type":"u32","index":false},{"name":"hasBidWall","type":"bool","index":false}]},{"name":"LaunchStartedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"launchAuthority","type":"publicKey","index":false},{"name":"slotStarted","type":"u64","index":false}]},{"name":"LaunchFundedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"fundingRecord","type":"publicKey","index":false},{"name":"launch","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"totalCommittedByFunder","type":"u64","index":false},{"name":"totalCommitted","type":"u64","index":false},{"name":"committedAmountAccumulator","type":"u128","index":false}]},{"name":"FundingRecordApprovalSetEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"fundingRecord","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"approvedAmount","type":"u64","index":false},{"name":"totalApproved","type":"u64","index":false}]},{"name":"LaunchCompletedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"finalState","type":{"defined":"LaunchState"},"index":false},{"name":"totalCommitted","type":"u64","index":false},{"name":"dao","type":{"option":"publicKey"},"index":false},{"name":"daoTreasury","type":{"option":"publicKey"},"index":false},{"name":"totalApprovedAmount","type":"u64","index":false},{"name":"bidWall","type":{"option":"publicKey"},"index":false},{"name":"bidWallAmount","type":"u64","index":false}]},{"name":"LaunchRefundedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"usdcRefunded","type":"u64","index":false},{"name":"fundingRecord","type":"publicKey","index":false}]},{"name":"LaunchClaimEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"funder","type":"publicKey","index":false},{"name":"tokensClaimed","type":"u64","index":false},{"name":"fundingRecord","type":"publicKey","index":false}]},{"name":"LaunchCloseEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"newState","type":{"defined":"LaunchState"},"index":false}]},{"name":"LaunchClaimAdditionalTokenAllocationEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"additionalTokensAmount","type":"u64","index":false},{"name":"additionalTokensRecipient","type":"publicKey","index":false}]},{"name":"LaunchPerformancePackageInitializedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"performancePackage","type":"publicKey","index":false}]},{"name":"LaunchExtendedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"launch","type":"publicKey","index":false},{"name":"oldSecondsForLaunch","type":"u32","index":false},{"name":"newSecondsForLaunch","type":"u32","index":false}]}],"errors":[{"code":6000,"name":"InvalidAmount","msg":"Invalid amount"},{"code":6001,"name":"SupplyNonZero","msg":"Supply must be zero"},{"code":6002,"name":"InvalidSecondsForLaunch","msg":"Launch period must be between 1 hour and 2 weeks"},{"code":6003,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6004,"name":"InvalidTokenKey","msg":"Token mint key must end in 'meta'"},{"code":6005,"name":"InvalidLaunchState","msg":"Invalid launch state"},{"code":6006,"name":"LaunchPeriodNotOver","msg":"Launch period not over"},{"code":6007,"name":"LaunchExpired","msg":"Launch is complete, no more funding allowed"},{"code":6008,"name":"LaunchNotRefunding","msg":"For you to get a refund, either the launch needs to be in a refunding state or the launch must have been over-committed"},{"code":6009,"name":"LaunchNotInitialized","msg":"Launch must be initialized to be started"},{"code":6010,"name":"FreezeAuthoritySet","msg":"Freeze authority can't be set on launchpad tokens"},{"code":6011,"name":"InvalidMonthlySpendingLimit","msg":"Monthly spending limit must be less than 1/6th of the minimum raise amount and cannot be 0"},{"code":6012,"name":"InvalidMonthlySpendingLimitMembers","msg":"There can only be at most 10 monthly spending limit members"},{"code":6013,"name":"InvalidPriceBasedPremineAmount","msg":"Cannot do more than a 50% premine, minimum is 10 atoms of token"},{"code":6014,"name":"InvalidPerformancePackageMinUnlockTime","msg":"Insiders must be forced to wait at least 18 months before unlocking their tokens"},{"code":6015,"name":"LaunchAuthorityNotSet","msg":"Launch authority must be set to complete the launch until 2 days after closing"},{"code":6016,"name":"FinalRaiseAmountTooLow","msg":"The final amount raised must be greater than or equal to the minimum raise amount"},{"code":6017,"name":"TokensAlreadyClaimed","msg":"Tokens already claimed"},{"code":6018,"name":"MoneyAlreadyRefunded","msg":"Money already refunded"},{"code":6019,"name":"InvariantViolated","msg":"An invariant was violated. You should get in contact with the MetaDAO team if you see this"},{"code":6020,"name":"LaunchNotLive","msg":"Launch must be live to be closed"},{"code":6021,"name":"InvalidMinimumRaiseAmount","msg":"Minimum raise amount must be greater than or equal to $0.5 so that there's enough liquidity for the launch"},{"code":6022,"name":"FinalRaiseAmountAlreadySet","msg":"The final raise amount has already been set"},{"code":6023,"name":"TotalApprovedAmountTooLow","msg":"Total approved amount must be greater than or equal to the minimum raise amount"},{"code":6024,"name":"InvalidAdditionalTokensRecipient","msg":"Invalid additional tokens recipient - should be set if additional tokens amount is greater than 0"},{"code":6025,"name":"NoAdditionalTokensRecipientSet","msg":"No additional tokens recipient set"},{"code":6026,"name":"AdditionalTokensAlreadyClaimed","msg":"Additional tokens already claimed"},{"code":6027,"name":"FundingRecordApprovalPeriodOver","msg":"Funding record approval period is over"},{"code":6028,"name":"PerformancePackageAlreadyInitialized","msg":"Performance package already initialized"},{"code":6029,"name":"InvalidDao","msg":"Invalid DAO"},{"code":6030,"name":"InvalidAccumulatorActivationDelaySeconds","msg":"Accumulator activation delay must be less than the launch duration"},{"code":6031,"name":"ExtendDurationExceedsMax","msg":"The extend duration would exceed the maximum allowed launch duration"}]} \ No newline at end of file diff --git a/idls/metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json b/idls/metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json new file mode 100644 index 0000000..45aa0a6 --- /dev/null +++ b/idls/metdao_bid_wall.WALL8ucBuUyL46QYxwYJjidaFYhdvxUFrgvBxPshERx.json @@ -0,0 +1 @@ +{"version":"0.7.0","name":"bid_wall","instructions":[{"name":"initializeBidWall","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"creator","isMut":false,"isSigner":true},{"name":"authority","isMut":false,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"creatorQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"daoTreasury","isMut":false,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeBidWallArgs"}}]},{"name":"closeBidWall","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":false},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"authorityQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipientQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"sellTokens","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"user","isMut":false,"isSigner":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"userQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"daoTreasury","isMut":false,"isSigner":false},{"name":"daoTreasuryQuoteTokenAccount","isMut":false,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"SellTokensArgs"}}]},{"name":"collectFees","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"cranker","isMut":false,"isSigner":true},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipientQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]},{"name":"cancelBidWall","accounts":[{"name":"bidWall","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"authority","isMut":false,"isSigner":true},{"name":"feeRecipient","isMut":false,"isSigner":false},{"name":"bidWallQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"authorityQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"feeRecipientQuoteTokenAccount","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[]}],"accounts":[{"name":"BidWall","type":{"kind":"struct","fields":[{"name":"nonce","docs":["The nonce of the bid wall."],"type":"u64"},{"name":"createdTimestamp","docs":["When the bid wall was created."],"type":"i64"},{"name":"initialAmmQuoteReserves","docs":["The initial quote (USDC) reserves of the Futarchy AMM."],"type":"u64"},{"name":"quoteAmount","docs":["The current amount of quote tokens assigned to the bid wall.","This is different from the amount in the bid wall quote token account,","because anyone can transfer quote tokens to the bid wall, and we don't want that to affect the bid wall's NAV calculation."],"type":"u64"},{"name":"feesCollected","docs":["The fees collected by the bid wall."],"type":"u64"},{"name":"baseBoughtAmount","docs":["The amount of base tokens bought up by the bid wall."],"type":"u64"},{"name":"seqNum","docs":["The event sequence number of the bid wall."],"type":"u64"},{"name":"creator","docs":["The authority of the bid wall."],"type":"publicKey"},{"name":"authority","docs":["The authority of the bid wall."],"type":"publicKey"},{"name":"daoTreasury","docs":["The DAO treasury address."],"type":"publicKey"},{"name":"baseMint","docs":["The mint of the token being sold into the bid wall."],"type":"publicKey"},{"name":"feeRecipient","docs":["The recipient of the fees collected by the bid wall."],"type":"publicKey"},{"name":"durationSeconds","docs":["The minimum duration in seconds before the bid wall can be closed."],"type":"u32"},{"name":"pdaBump","docs":["The PDA bump."],"type":"u8"}]}}],"types":[{"name":"CommonFields","type":{"kind":"struct","fields":[{"name":"slot","type":"u64"},{"name":"unixTimestamp","type":"i64"},{"name":"bidWallSeqNum","type":"u64"}]}},{"name":"InitializeBidWallArgs","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"nonce","type":"u64"},{"name":"initialAmmQuoteReserves","type":"u64"},{"name":"durationSeconds","type":"u32"}]}},{"name":"SellTokensArgs","type":{"kind":"struct","fields":[{"name":"amountIn","type":"u64"},{"name":"minAmountOut","type":"u64"}]}}],"events":[{"name":"BidWallInitializedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false},{"name":"nonce","type":"u64","index":false},{"name":"initialAmmQuoteReserves","type":"u64","index":false},{"name":"amount","type":"u64","index":false},{"name":"creator","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"daoTreasury","type":"publicKey","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"feeRecipient","type":"publicKey","index":false},{"name":"durationSeconds","type":"u32","index":false},{"name":"pdaBump","type":"u8","index":false}]},{"name":"BidWallTokensSoldEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false},{"name":"amountIn","type":"u64","index":false},{"name":"amountOut","type":"u64","index":false},{"name":"fee","type":"u64","index":false},{"name":"postBidWallQuoteTokenAccountAmount","type":"u64","index":false},{"name":"postBidWallBaseBoughtAmount","type":"u64","index":false},{"name":"user","type":"publicKey","index":false}]},{"name":"BidWallFeesCollectedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false},{"name":"feesCollected","type":"u64","index":false},{"name":"postBidWallQuoteTokenAccountAmount","type":"u64","index":false}]},{"name":"BidWallClosedEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false}]},{"name":"BidWallCanceledEvent","fields":[{"name":"common","type":{"defined":"CommonFields"},"index":false},{"name":"bidWall","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"BidWallExpired","msg":"Bid wall expired"},{"code":6001,"name":"BidWallNotExpired","msg":"Bid wall not expired"},{"code":6002,"name":"FeeRecipientMismatch","msg":"Fee recipient mismatch"},{"code":6003,"name":"InsufficientQuoteReserves","msg":"Insufficient quote reserves"},{"code":6004,"name":"BidWallDepleted","msg":"Bid wall depleted"},{"code":6005,"name":"InvalidInputAmount","msg":"Invalid input amount"},{"code":6006,"name":"InvalidCrankAddress","msg":"Invalid crank address"},{"code":6007,"name":"InsufficientOutputAmount","msg":"Insufficient output amount"}]} \ No newline at end of file diff --git a/idls/meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json b/idls/meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json new file mode 100644 index 0000000..cef0305 --- /dev/null +++ b/idls/meteora_damm_v2.cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG.json @@ -0,0 +1 @@ +{"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG","metadata":{"name":"cp_amm","version":"0.2.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"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":"params","type":{"defined":{"name":"AddLiquidityParameters"}}}]},{"name":"claim_position_fee","discriminator":[180,38,154,17,133,33,162,211],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"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":"claim_protocol_fee","discriminator":[165,228,133,48,99,249,255,33],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"token_a_account","writable":true},{"name":"token_b_account","writable":true},{"name":"operator","docs":["Claim fee operator"]},{"name":"signer","docs":["Operator"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"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":"max_amount_a","type":"u64"},{"name":"max_amount_b","type":"u64"}]},{"name":"claim_reward","discriminator":[149,95,181,242,94,90,158,162],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"reward_vault","docs":["The vault token account for reward token"],"writable":true},{"name":"reward_mint"},{"name":"user_token_account","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_program"},{"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":"reward_index","type":"u8"},{"name":"skip_reward","type":"u8"}]},{"name":"close_config","discriminator":[145,9,72,157,95,125,61,85],"accounts":[{"name":"config","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","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":"close_operator_account","discriminator":[171,9,213,74,120,23,3,29],"accounts":[{"name":"operator","writable":true},{"name":"signer","signer":true},{"name":"rent_receiver","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":"close_position","discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true},{"name":"position_nft_account","docs":["The token account for nft"],"writable":true},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"rent_receiver","writable":true},{"name":"owner","docs":["Owner of position"],"signer":true},{"name":"token_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"close_token_badge","discriminator":[108,146,86,110,179,254,10,104],"accounts":[{"name":"token_badge","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","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":"create_config","docs":["OPERATOR FUNCTIONS /////"],"discriminator":[201,207,243,114,75,111,47,189],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"index","type":"u64"},{"name":"config_parameters","type":{"defined":{"name":"StaticConfigParameters"}}}]},{"name":"create_dynamic_config","discriminator":[81,251,122,78,66,57,208,82],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"index","type":"u64"},{"name":"config_parameters","type":{"defined":{"name":"DynamicConfigParameters"}}}]},{"name":"create_operator_account","docs":["ADMIN FUNCTIONS /////"],"discriminator":[221,64,246,149,240,153,229,163],"accounts":[{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"whitelisted_address"}]}},{"name":"whitelisted_address"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"permission","type":"u128"}]},{"name":"create_position","discriminator":[48,215,197,153,96,203,180,133],"accounts":[{"name":"owner"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"pool","writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"payer","docs":["Address paying to create the position. Can be anyone"],"writable":true,"signer":true},{"name":"token_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"create_token_badge","discriminator":[88,206,0,91,60,175,151,118],"accounts":[{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"token_mint"}]}},{"name":"token_mint"},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"dummy_ix","discriminator":[234,95,176,185,7,42,35,159],"accounts":[{"name":"pod_aligned_fee_time_scheduler"},{"name":"pod_aligned_fee_rate_limiter"},{"name":"pod_aligned_fee_market_cap_scheduler"}],"args":[{"name":"_ixs","type":{"defined":{"name":"DummyParams"}}}]},{"name":"fix_config_fee_params","discriminator":[38,30,216,81,250,177,243,254],"accounts":[{"name":"config","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[{"name":"params","type":{"defined":{"name":"BaseFeeParameters"}}}]},{"name":"fix_pool_fee_params","discriminator":[132,98,81,196,44,58,120,193],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[{"name":"params","type":{"defined":{"name":"BaseFeeParameters"}}}]},{"name":"fix_pool_layout_version","discriminator":[166,158,69,35,81,167,200,215],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[]},{"name":"fund_reward","discriminator":[188,50,249,165,93,151,38,63],"accounts":[{"name":"pool","writable":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"name":"token_program"},{"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":"reward_index","type":"u8"},{"name":"amount","type":"u64"},{"name":"carry_forward","type":"bool"}]},{"name":"initialize_customizable_pool","discriminator":[20,161,241,24,189,221,180,2],"accounts":[{"name":"creator"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_a_mint","docs":["Token a mint"]},{"name":"token_b_mint","docs":["Token b mint"]},{"name":"token_a_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"pool"}]}},{"name":"token_b_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_b_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer_token_a","docs":["payer token a account"],"writable":true},{"name":"payer_token_b","docs":["creator token b account"],"writable":true},{"name":"token_a_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_b_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_2022_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"InitializeCustomizablePoolParameters"}}}]},{"name":"initialize_pool","docs":["USER FUNCTIONS ////"],"discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"creator"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_a_mint","docs":["Token a mint"]},{"name":"token_b_mint","docs":["Token b mint"]},{"name":"token_a_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"pool"}]}},{"name":"token_b_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_b_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer_token_a","docs":["payer token a account"],"writable":true},{"name":"payer_token_b","docs":["creator token b account"],"writable":true},{"name":"token_a_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_b_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_2022_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"InitializePoolParameters"}}}]},{"name":"initialize_pool_with_dynamic_config","discriminator":[149,82,72,197,253,252,68,15],"accounts":[{"name":"creator"},{"name":"position_nft_mint","docs":["position_nft_mint"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["position nft account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,110,102,116,95,97,99,99,111,117,110,116]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"pool_creator_authority","signer":true,"relations":["config"]},{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_a_mint","docs":["Token a mint"]},{"name":"token_b_mint","docs":["Token b mint"]},{"name":"token_a_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"pool"}]}},{"name":"token_b_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"token_b_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer_token_a","docs":["payer token a account"],"writable":true},{"name":"payer_token_b","docs":["creator token b account"],"writable":true},{"name":"token_a_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_b_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_2022_program","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"InitializeCustomizablePoolParameters"}}}]},{"name":"initialize_reward","discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"reward_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"arg","path":"reward_index"}]}},{"name":"reward_mint"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"reward_index","type":"u8"},{"name":"reward_duration","type":"u64"},{"name":"funder","type":"pubkey"}]},{"name":"lock_inner_position","discriminator":[72,19,49,204,18,122,23,90],"accounts":[{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":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":"params","type":{"defined":{"name":"VestingParameters"}}}]},{"name":"lock_position","discriminator":[227,62,2,252,247,10,171,185],"accounts":[{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"vesting","writable":true,"signer":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"VestingParameters"}}}]},{"name":"permanent_lock_position","discriminator":[165,176,125,6,231,171,186,213],"accounts":[{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":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":"permanent_lock_liquidity","type":"u128"}]},{"name":"refresh_vesting","discriminator":[9,94,216,14,116,204,247,0],"accounts":[{"name":"pool","relations":["position"]},{"name":"position","writable":true},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner"}],"args":[]},{"name":"remove_all_liquidity","discriminator":[10,51,61,35,112,105,24,85],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"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":"token_a_amount_threshold","type":"u64"},{"name":"token_b_amount_threshold","type":"u64"}]},{"name":"remove_liquidity","discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"token_a_account","docs":["The user token a account"],"writable":true},{"name":"token_b_account","docs":["The user token b account"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"token_b_mint","docs":["The mint of token b"],"relations":["pool"]},{"name":"position_nft_account","docs":["The token account for nft"]},{"name":"owner","docs":["owner of position"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"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":"params","type":{"defined":{"name":"RemoveLiquidityParameters"}}}]},{"name":"set_pool_status","discriminator":[112,87,135,223,83,204,132,53],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":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":"status","type":"u8"}]},{"name":"split_position","discriminator":[172,241,221,138,161,29,253,42],"accounts":[{"name":"pool","writable":true,"relations":["first_position","second_position"]},{"name":"first_position","docs":["The first position"],"writable":true},{"name":"first_position_nft_account","docs":["The token account for position nft"]},{"name":"second_position","docs":["The second position"],"writable":true},{"name":"second_position_nft_account","docs":["The token account for position nft"]},{"name":"first_owner","docs":["Owner of first position"],"signer":true},{"name":"second_owner","docs":["Owner of second position"],"signer":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":"params","type":{"defined":{"name":"SplitPositionParameters"}}}]},{"name":"split_position2","discriminator":[221,147,228,207,140,212,17,119],"accounts":[{"name":"pool","writable":true,"relations":["first_position","second_position"]},{"name":"first_position","docs":["The first position"],"writable":true},{"name":"first_position_nft_account","docs":["The token account for position nft"]},{"name":"second_position","docs":["The second position"],"writable":true},{"name":"second_position_nft_account","docs":["The token account for position nft"]},{"name":"first_owner","docs":["Owner of first position"],"signer":true},{"name":"second_owner","docs":["Owner of second position"],"signer":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":"numerator","type":"u32"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"]},{"name":"token_b_mint","docs":["The mint of token b"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"_params","type":{"defined":{"name":"SwapParameters"}}}]},{"name":"swap2","discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"token_a_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"token_b_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"token_a_mint","docs":["The mint of token a"]},{"name":"token_b_mint","docs":["The mint of token b"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_a_program","docs":["Token a program"]},{"name":"token_b_program","docs":["Token b program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"_params","type":{"defined":{"name":"SwapParameters2"}}}]},{"name":"update_pool_fees","discriminator":[118,217,203,179,60,8,70,89],"accounts":[{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","signer":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":"params","type":{"defined":{"name":"UpdatePoolFeesParameters"}}}]},{"name":"update_reward_duration","discriminator":[138,174,196,169,213,235,254,107],"accounts":[{"name":"pool","writable":true},{"name":"signer","signer":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":"reward_index","type":"u8"},{"name":"new_duration","type":"u64"}]},{"name":"update_reward_funder","discriminator":[211,28,48,32,215,160,35,23],"accounts":[{"name":"pool","writable":true},{"name":"signer","signer":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":"reward_index","type":"u8"},{"name":"new_funder","type":"pubkey"}]},{"name":"withdraw_ineligible_reward","discriminator":[148,206,42,195,247,49,103,8],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"name":"token_program"},{"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":"reward_index","type":"u8"}]},{"name":"zap_protocol_fee","discriminator":[213,155,187,34,56,182,91,240],"accounts":[{"name":"pool_authority","address":"HLnpSz9h2S4hiLQ43rnSD9XkcUThA7B8hQMKmDaiTLcC"},{"name":"pool","writable":true},{"name":"token_vault","writable":true},{"name":"token_mint"},{"name":"receiver_token","writable":true},{"name":"operator","docs":["zap claim fee operator"]},{"name":"signer","docs":["Operator"],"signer":true},{"name":"token_program","docs":["Token program"]},{"name":"sysvar_instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"max_amount","type":"u64"}]}],"accounts":[{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"PodAlignedFeeMarketCapScheduler","discriminator":[251,130,208,253,245,27,145,203]},{"name":"PodAlignedFeeRateLimiter","discriminator":[160,219,8,251,179,7,16,117]},{"name":"PodAlignedFeeTimeScheduler","discriminator":[239,132,138,213,67,154,130,70]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"Position","discriminator":[170,188,143,228,122,64,247,208]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]},{"name":"Vesting","discriminator":[100,149,66,138,95,200,128,241]}],"events":[{"name":"EvtClaimPositionFee","discriminator":[198,182,183,52,97,12,49,56]},{"name":"EvtClaimProtocolFee","discriminator":[186,244,75,251,188,13,25,33]},{"name":"EvtClaimReward","discriminator":[218,86,147,200,235,188,215,231]},{"name":"EvtCloseConfig","discriminator":[36,30,239,45,58,132,14,5]},{"name":"EvtClosePosition","discriminator":[20,145,144,68,143,142,214,178]},{"name":"EvtCreateConfig","discriminator":[131,207,180,174,180,73,165,54]},{"name":"EvtCreateDynamicConfig","discriminator":[231,197,13,164,248,213,133,152]},{"name":"EvtCreatePosition","discriminator":[156,15,119,198,29,181,221,55]},{"name":"EvtCreateTokenBadge","discriminator":[141,120,134,116,34,28,114,160]},{"name":"EvtFundReward","discriminator":[104,233,237,122,199,191,121,85]},{"name":"EvtInitializePool","discriminator":[228,50,246,85,203,66,134,37]},{"name":"EvtInitializeReward","discriminator":[129,91,188,3,246,52,185,249]},{"name":"EvtLiquidityChange","discriminator":[197,171,78,127,224,211,87,13]},{"name":"EvtLockPosition","discriminator":[168,63,108,83,219,82,2,200]},{"name":"EvtPermanentLockPosition","discriminator":[145,143,162,218,218,80,67,11]},{"name":"EvtSetPoolStatus","discriminator":[100,213,74,3,95,91,228,146]},{"name":"EvtSplitPosition2","discriminator":[165,32,203,174,72,100,233,103]},{"name":"EvtSplitPosition3","discriminator":[232,117,190,218,85,162,207,78]},{"name":"EvtSwap2","discriminator":[189,66,51,168,38,80,117,153]},{"name":"EvtUpdatePoolFees","discriminator":[76,165,246,102,102,217,156,44]},{"name":"EvtUpdateRewardDuration","discriminator":[149,135,65,231,129,153,65,57]},{"name":"EvtUpdateRewardFunder","discriminator":[76,154,208,13,40,115,246,146]},{"name":"EvtWithdrawIneligibleReward","discriminator":[248,215,184,78,31,180,179,168]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"InvalidFee","msg":"Invalid fee setup"},{"code":6002,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6003,"name":"PoolDisabled","msg":"Pool disabled"},{"code":6004,"name":"ExceedMaxFeeBps","msg":"Exceeded max fee bps"},{"code":6005,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6006,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6007,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6008,"name":"UnableToModifyActivationPoint","msg":"Unable to modify activation point"},{"code":6009,"name":"InvalidAuthorityToCreateThePool","msg":"Invalid authority to create the pool"},{"code":6010,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6011,"name":"InvalidActivationPoint","msg":"Invalid activation point"},{"code":6012,"name":"InvalidQuoteMint","msg":"Quote token must be SOL,USDC"},{"code":6013,"name":"InvalidFeeCurve","msg":"Invalid fee curve"},{"code":6014,"name":"InvalidPriceRange","msg":"Invalid Price Range"},{"code":6015,"name":"PriceRangeViolation","msg":"Trade is over price range"},{"code":6016,"name":"InvalidParameters","msg":"Invalid parameters"},{"code":6017,"name":"InvalidCollectFeeMode","msg":"Invalid collect fee mode"},{"code":6018,"name":"InvalidInput","msg":"Invalid input"},{"code":6019,"name":"CannotCreateTokenBadgeOnSupportedMint","msg":"Cannot create token badge on supported mint"},{"code":6020,"name":"InvalidTokenBadge","msg":"Invalid token badge"},{"code":6021,"name":"InvalidMinimumLiquidity","msg":"Invalid minimum liquidity"},{"code":6022,"name":"InvalidVestingInfo","msg":"Invalid vesting information"},{"code":6023,"name":"InsufficientLiquidity","msg":"Insufficient liquidity"},{"code":6024,"name":"InvalidVestingAccount","msg":"Invalid vesting account"},{"code":6025,"name":"InvalidPoolStatus","msg":"Invalid pool status"},{"code":6026,"name":"UnsupportNativeMintToken2022","msg":"Unsupported native mint token2022"},{"code":6027,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6028,"name":"InvalidRewardDuration","msg":"Invalid reward duration"},{"code":6029,"name":"RewardInitialized","msg":"Reward already initialized"},{"code":6030,"name":"RewardUninitialized","msg":"Reward not initialized"},{"code":6031,"name":"InvalidRewardVault","msg":"Invalid reward vault"},{"code":6032,"name":"MustWithdrawnIneligibleReward","msg":"Must withdraw ineligible reward"},{"code":6033,"name":"IdenticalRewardDuration","msg":"Reward duration is the same"},{"code":6034,"name":"RewardCampaignInProgress","msg":"Reward campaign in progress"},{"code":6035,"name":"IdenticalFunder","msg":"Identical funder"},{"code":6036,"name":"InvalidFunder","msg":"Invalid funder"},{"code":6037,"name":"RewardNotEnded","msg":"Reward not ended"},{"code":6038,"name":"FeeInverseIsIncorrect","msg":"Fee inverse is incorrect"},{"code":6039,"name":"PositionIsNotEmpty","msg":"Position is not empty"},{"code":6040,"name":"InvalidPoolCreatorAuthority","msg":"Invalid pool creator authority"},{"code":6041,"name":"InvalidConfigType","msg":"Invalid config type"},{"code":6042,"name":"InvalidPoolCreator","msg":"Invalid pool creator"},{"code":6043,"name":"RewardVaultFrozenSkipRequired","msg":"Reward vault is frozen, must skip reward to proceed"},{"code":6044,"name":"InvalidSplitPositionParameters","msg":"Invalid parameters for split position"},{"code":6045,"name":"UnsupportPositionHasVestingLock","msg":"Unsupported split position has vesting lock"},{"code":6046,"name":"SamePosition","msg":"Same position"},{"code":6047,"name":"InvalidBaseFeeMode","msg":"Invalid base fee mode"},{"code":6048,"name":"InvalidFeeRateLimiter","msg":"Invalid fee rate limiter"},{"code":6049,"name":"FailToValidateSingleSwapInstruction","msg":"Fail to validate single swap instruction in rate limiter"},{"code":6050,"name":"InvalidFeeTimeScheduler","msg":"Invalid fee scheduler"},{"code":6051,"name":"UndeterminedError","msg":"Undetermined error"},{"code":6052,"name":"InvalidPoolVersion","msg":"Invalid pool version"},{"code":6053,"name":"InvalidAuthority","msg":"Invalid authority to do that action"},{"code":6054,"name":"InvalidPermission","msg":"Invalid permission"},{"code":6055,"name":"InvalidFeeMarketCapScheduler","msg":"Invalid fee market cap scheduler"},{"code":6056,"name":"CannotUpdateBaseFee","msg":"Cannot update base fee"},{"code":6057,"name":"InvalidDynamicFeeParameters","msg":"Invalid dynamic fee parameters"},{"code":6058,"name":"InvalidUpdatePoolFeesParameters","msg":"Invalid update pool fees parameters"},{"code":6059,"name":"MissingOperatorAccount","msg":"Missing operator account"},{"code":6060,"name":"IncorrectATA","msg":"Incorrect ATA"},{"code":6061,"name":"InvalidZapOutParameters","msg":"Invalid zap out parameters"},{"code":6062,"name":"InvalidWithdrawProtocolFeeZapAccounts","msg":"Invalid withdraw protocol fee zap accounts"},{"code":6063,"name":"MintRestrictedFromZap","msg":"SOL,USDC protocol fee cannot be withdrawn via zap"},{"code":6064,"name":"CpiDisabled","msg":"CPI disabled"},{"code":6065,"name":"MissingZapOutInstruction","msg":"Missing zap out instruction"},{"code":6066,"name":"InvalidZapAccounts","msg":"Invalid zap accounts"},{"code":6067,"name":"InvalidCompoundingFeeBps","msg":"Invalid compounding fee bps"}],"types":[{"name":"AddLiquidityParameters","type":{"kind":"struct","fields":[{"name":"liquidity_delta","docs":["delta liquidity"],"type":"u128"},{"name":"token_a_amount_threshold","docs":["maximum token a amount"],"type":"u64"},{"name":"token_b_amount_threshold","docs":["maximum token b amount"],"type":"u64"}]}},{"name":"BaseFeeInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"data","type":{"array":["u8",32]}}]}},{"name":"BaseFeeParameters","type":{"kind":"struct","fields":[{"name":"data","type":{"array":["u8",27]}}]}},{"name":"BaseFeeStruct","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee_info","type":{"defined":{"name":"BaseFeeInfo"}}},{"name":"padding_1","type":"u64"}]}},{"name":"BorshFeeMarketCapScheduler","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"number_of_period","type":"u16"},{"name":"sqrt_price_step_bps","type":"u32"},{"name":"scheduler_expiration_duration","type":"u32"},{"name":"reduction_factor","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"BorshFeeRateLimiter","docs":["we denote reference_amount = x0, cliff_fee_numerator = c, fee_increment = i","if input_amount <= x0, then fee = input_amount * c","","if input_amount > x0, then input_amount = x0 + (a * x0 + b)","if a < max_index","then fee = x0 * c + x0 * (c + i) + .... + x0 * (c + i*a) + b * (c + i * (a+1))","then fee = x0 * (c + c*a + i*a*(a+1)/2) + b * (c + i * (a+1))","","if a >= max_index","if a = max_index + d, input_amount = x0 + max_index * x0 + (d * x0 + b)","then fee = x0 * (c + c*max_index + i*max_index*(max_index+1)/2) + (d * x0 + b) * MAX_FEE"],"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"fee_increment_bps","type":"u16"},{"name":"max_limiter_duration","type":"u32"},{"name":"max_fee_bps","type":"u32"},{"name":"reference_amount","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"BorshFeeTimeScheduler","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"number_of_period","type":"u16"},{"name":"period_frequency","type":"u64"},{"name":"reduction_factor","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"Config","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"vault_config_key","docs":["Vault config key"],"type":"pubkey"},{"name":"pool_creator_authority","docs":["Only pool_creator_authority can use the current config to initialize new pool. When it's Pubkey::default, it's a public config."],"type":"pubkey"},{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesConfig"}}},{"name":"activation_type","docs":["Activation type"],"type":"u8"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"config_type","docs":["Config type mode, 0 for static, 1 for dynamic"],"type":"u8"},{"name":"_padding_0","docs":["padding 0"],"type":{"array":["u8",5]}},{"name":"index","docs":["config index"],"type":"u64"},{"name":"sqrt_min_price","docs":["sqrt min price"],"type":"u128"},{"name":"sqrt_max_price","docs":["sqrt max price"],"type":"u128"},{"name":"_padding_1","docs":["Fee curve point","Padding for further use"],"type":{"array":["u64",10]}}]}},{"name":"DummyParams","type":{"kind":"struct","fields":[{"name":"borsh_fee_time_scheduler_params","type":{"defined":{"name":"BorshFeeTimeScheduler"}}},{"name":"borsh_fee_rate_limiter_params","type":{"defined":{"name":"BorshFeeRateLimiter"}}},{"name":"borsh_fee_market_cap_scheduler_params","type":{"defined":{"name":"BorshFeeMarketCapScheduler"}}}]}},{"name":"DynamicConfigParameters","type":{"kind":"struct","fields":[{"name":"pool_creator_authority","type":"pubkey"}]}},{"name":"DynamicFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"padding_1","type":{"array":["u8",8]}},{"name":"bin_step_u128","type":"u128"}]}},{"name":"DynamicFeeParameters","type":{"kind":"struct","fields":[{"name":"bin_step","type":"u16"},{"name":"bin_step_u128","type":"u128"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"}]}},{"name":"DynamicFeeStruct","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"last_update_timestamp","type":"u64"},{"name":"bin_step_u128","type":"u128"},{"name":"sqrt_price_reference","type":"u128"},{"name":"volatility_accumulator","type":"u128"},{"name":"volatility_reference","type":"u128"}]}},{"name":"EvtClaimPositionFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"fee_a_claimed","type":"u64"},{"name":"fee_b_claimed","type":"u64"}]}},{"name":"EvtClaimProtocolFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"}]}},{"name":"EvtClaimReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"mint_reward","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"total_reward","type":"u64"}]}},{"name":"EvtCloseConfig","docs":["Close config"],"type":{"kind":"struct","fields":[{"name":"config","docs":["Config pubkey"],"type":"pubkey"},{"name":"admin","docs":["admin pk"],"type":"pubkey"}]}},{"name":"EvtClosePosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"position_nft_mint","type":"pubkey"}]}},{"name":"EvtCreateConfig","docs":["Create static config"],"type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"vault_config_key","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"activation_type","type":"u8"},{"name":"sqrt_min_price","type":"u128"},{"name":"sqrt_max_price","type":"u128"},{"name":"collect_fee_mode","type":"u8"},{"name":"index","type":"u64"},{"name":"config","type":"pubkey"}]}},{"name":"EvtCreateDynamicConfig","docs":["Create dynamic config"],"type":{"kind":"struct","fields":[{"name":"config","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"index","type":"u64"}]}},{"name":"EvtCreatePosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"position_nft_mint","type":"pubkey"}]}},{"name":"EvtCreateTokenBadge","docs":["Create token badge"],"type":{"kind":"struct","fields":[{"name":"token_mint","type":"pubkey"}]}},{"name":"EvtFundReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"mint_reward","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"amount","type":"u64"},{"name":"transfer_fee_excluded_amount_in","type":"u64"},{"name":"reward_duration_end","type":"u64"},{"name":"pre_reward_rate","type":"u128"},{"name":"post_reward_rate","type":"u128"}]}},{"name":"EvtInitializePool","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_a_mint","type":"pubkey"},{"name":"token_b_mint","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"payer","type":"pubkey"},{"name":"alpha_vault","type":"pubkey"},{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"sqrt_min_price","type":"u128"},{"name":"sqrt_max_price","type":"u128"},{"name":"activation_type","type":"u8"},{"name":"collect_fee_mode","type":"u8"},{"name":"liquidity","type":"u128"},{"name":"sqrt_price","type":"u128"},{"name":"activation_point","type":"u64"},{"name":"token_a_flag","type":"u8"},{"name":"token_b_flag","type":"u8"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"total_amount_a","type":"u64"},{"name":"total_amount_b","type":"u64"},{"name":"pool_type","type":"u8"}]}},{"name":"EvtInitializeReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"reward_duration","type":"u64"}]}},{"name":"EvtLiquidityChange","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"transfer_fee_included_token_a_amount","type":"u64"},{"name":"transfer_fee_included_token_b_amount","type":"u64"},{"name":"reserve_a_amount","type":"u64"},{"name":"reserve_b_amount","type":"u64"},{"name":"liquidity_delta","type":"u128"},{"name":"token_a_amount_threshold","type":"u64"},{"name":"token_b_amount_threshold","type":"u64"},{"name":"change_type","type":"u8"}]}},{"name":"EvtLockPosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"vesting","type":"pubkey"},{"name":"cliff_point","type":"u64"},{"name":"period_frequency","type":"u64"},{"name":"cliff_unlock_liquidity","type":"u128"},{"name":"liquidity_per_period","type":"u128"},{"name":"number_of_period","type":"u16"}]}},{"name":"EvtPermanentLockPosition","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"lock_liquidity_amount","type":"u128"},{"name":"total_permanent_locked_liquidity","type":"u128"}]}},{"name":"EvtSetPoolStatus","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"status","type":"u8"}]}},{"name":"EvtSplitPosition2","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"first_owner","type":"pubkey"},{"name":"second_owner","type":"pubkey"},{"name":"first_position","type":"pubkey"},{"name":"second_position","type":"pubkey"},{"name":"current_sqrt_price","type":"u128"},{"name":"amount_splits","type":{"defined":{"name":"SplitAmountInfo"}}},{"name":"first_position_info","type":{"defined":{"name":"SplitPositionInfo"}}},{"name":"second_position_info","type":{"defined":{"name":"SplitPositionInfo"}}},{"name":"split_position_parameters","type":{"defined":{"name":"SplitPositionParameters2"}}}]}},{"name":"EvtSplitPosition3","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"first_owner","type":"pubkey"},{"name":"second_owner","type":"pubkey"},{"name":"first_position","type":"pubkey"},{"name":"second_position","type":"pubkey"},{"name":"current_sqrt_price","type":"u128"},{"name":"amount_splits","type":{"defined":{"name":"SplitAmountInfo2"}}},{"name":"first_position_info","type":{"defined":{"name":"SplitPositionInfo2"}}},{"name":"second_position_info","type":{"defined":{"name":"SplitPositionInfo2"}}},{"name":"split_position_parameters","type":{"defined":{"name":"SplitPositionParameters3"}}}]}},{"name":"EvtSwap2","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"trade_direction","type":"u8"},{"name":"collect_fee_mode","type":"u8"},{"name":"has_referral","type":"bool"},{"name":"params","type":{"defined":{"name":"SwapParameters2"}}},{"name":"swap_result","type":{"defined":{"name":"SwapResult2"}}},{"name":"included_transfer_fee_amount_in","type":"u64"},{"name":"included_transfer_fee_amount_out","type":"u64"},{"name":"excluded_transfer_fee_amount_out","type":"u64"},{"name":"current_timestamp","type":"u64"},{"name":"reserve_a_amount","type":"u64"},{"name":"reserve_b_amount","type":"u64"}]}},{"name":"EvtUpdatePoolFees","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"operator","type":"pubkey"},{"name":"params","type":{"defined":{"name":"UpdatePoolFeesParameters"}}}]}},{"name":"EvtUpdateRewardDuration","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"old_reward_duration","type":"u64"},{"name":"new_reward_duration","type":"u64"}]}},{"name":"EvtUpdateRewardFunder","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_index","type":"u8"},{"name":"old_funder","type":"pubkey"},{"name":"new_funder","type":"pubkey"}]}},{"name":"EvtWithdrawIneligibleReward","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"InitializeCustomizablePoolParameters","type":{"kind":"struct","fields":[{"name":"pool_fees","docs":["pool fees"],"type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"sqrt_min_price","docs":["sqrt min price"],"type":"u128"},{"name":"sqrt_max_price","docs":["sqrt max price"],"type":"u128"},{"name":"has_alpha_vault","docs":["has alpha vault"],"type":"bool"},{"name":"liquidity","docs":["initialize liquidity"],"type":"u128"},{"name":"sqrt_price","docs":["The init price of the pool as a sqrt(token_b/token_a) Q64.64 value. Market cap fee scheduler minimum price will be derived from this value"],"type":"u128"},{"name":"activation_type","docs":["activation type"],"type":"u8"},{"name":"collect_fee_mode","docs":["collect fee mode"],"type":"u8"},{"name":"activation_point","docs":["activation point"],"type":{"option":"u64"}}]}},{"name":"InitializePoolParameters","type":{"kind":"struct","fields":[{"name":"liquidity","docs":["initialize liquidity"],"type":"u128"},{"name":"sqrt_price","docs":["The init price of the pool as a sqrt(token_b/token_a) Q64.64 value"],"type":"u128"},{"name":"activation_point","docs":["activation point"],"type":{"option":"u64"}}]}},{"name":"InnerVesting","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_point","type":"u64"},{"name":"period_frequency","type":"u64"},{"name":"cliff_unlock_liquidity","type":"u128"},{"name":"liquidity_per_period","type":"u128"},{"name":"total_released_liquidity","type":"u128"},{"name":"number_of_period","type":"u16"},{"name":"padding","type":{"array":["u8",14]}}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"whitelisted_address","type":"pubkey"},{"name":"permission","type":"u128"},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"PodAlignedFeeMarketCapScheduler","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"base_fee_mode","type":"u8"},{"name":"padding","type":{"array":["u8",5]}},{"name":"number_of_period","type":"u16"},{"name":"sqrt_price_step_bps","type":"u32"},{"name":"scheduler_expiration_duration","type":"u32"},{"name":"reduction_factor","type":"u64"}]}},{"name":"PodAlignedFeeRateLimiter","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"base_fee_mode","type":"u8"},{"name":"padding","type":{"array":["u8",5]}},{"name":"fee_increment_bps","type":"u16"},{"name":"max_limiter_duration","type":"u32"},{"name":"max_fee_bps","type":"u32"},{"name":"reference_amount","type":"u64"}]}},{"name":"PodAlignedFeeTimeScheduler","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"base_fee_mode","type":"u8"},{"name":"padding","type":{"array":["u8",5]}},{"name":"number_of_period","type":"u16"},{"name":"period_frequency","type":"u64"},{"name":"reduction_factor","type":"u64"}]}},{"name":"Pool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesStruct"}}},{"name":"token_a_mint","docs":["token a mint"],"type":"pubkey"},{"name":"token_b_mint","docs":["token b mint"],"type":"pubkey"},{"name":"token_a_vault","docs":["token a vault"],"type":"pubkey"},{"name":"token_b_vault","docs":["token b vault"],"type":"pubkey"},{"name":"whitelisted_vault","docs":["Whitelisted vault to be able to buy pool before activation_point"],"type":"pubkey"},{"name":"padding_0","docs":["padding, previously partner pubkey, be careful when using this field"],"type":{"array":["u8",32]}},{"name":"liquidity","docs":["liquidity share"],"type":"u128"},{"name":"padding_1","docs":["padding, previous reserve amount, be careful to use that field"],"type":"u128"},{"name":"protocol_a_fee","docs":["protocol a fee"],"type":"u64"},{"name":"protocol_b_fee","docs":["protocol b fee"],"type":"u64"},{"name":"padding_2","type":"u128"},{"name":"sqrt_min_price","docs":["min price"],"type":"u128"},{"name":"sqrt_max_price","docs":["max price"],"type":"u128"},{"name":"sqrt_price","docs":["current price"],"type":"u128"},{"name":"activation_point","docs":["Activation point, can be slot or timestamp"],"type":"u64"},{"name":"activation_type","docs":["Activation type, 0 means by slot, 1 means by timestamp"],"type":"u8"},{"name":"pool_status","docs":["pool status, 0: enable, 1 disable"],"type":"u8"},{"name":"token_a_flag","docs":["token a flag"],"type":"u8"},{"name":"token_b_flag","docs":["token b flag"],"type":"u8"},{"name":"collect_fee_mode","docs":["0 is collect fee in both token, 1 only collect fee only in token b"],"type":"u8"},{"name":"pool_type","docs":["pool type"],"type":"u8"},{"name":"fee_version","docs":["pool fee version, 0: max_fee is still capped at 50%, 1: max_fee is capped at 99%"],"type":"u8"},{"name":"padding_3","docs":["padding"],"type":"u8"},{"name":"fee_a_per_liquidity","docs":["cumulative"],"type":{"array":["u8",32]}},{"name":"fee_b_per_liquidity","docs":["cumulative"],"type":{"array":["u8",32]}},{"name":"permanent_lock_liquidity","type":"u128"},{"name":"metrics","docs":["metrics"],"type":{"defined":{"name":"PoolMetrics"}}},{"name":"creator","docs":["pool creator"],"type":"pubkey"},{"name":"token_a_amount","docs":["token a amount"],"type":"u64"},{"name":"token_b_amount","docs":["token b amount"],"type":"u64"},{"name":"layout_version","docs":["layout version: version 0: haven't track token_a_amount and token_b_amount, version 1: track token_a_amount and token_b_amount"],"type":"u8"},{"name":"padding_4","docs":["Padding for further use"],"type":{"array":["u8",7]}},{"name":"padding_5","docs":["Padding for further use"],"type":{"array":["u64",3]}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"RewardInfo"}},2]}}]}},{"name":"PoolFeeParameters","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"base_fee","docs":["Base fee"],"type":{"defined":{"name":"BaseFeeParameters"}}},{"name":"compounding_fee_bps","docs":["compounding fee bps, only have value if CollectFeeMode::Compounding"],"type":"u16"},{"name":"padding","docs":["padding for future use"],"type":"u8"},{"name":"dynamic_fee","docs":["dynamic fee"],"type":{"option":{"defined":{"name":"DynamicFeeParameters"}}}}]}},{"name":"PoolFeesConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","type":{"defined":{"name":"BaseFeeInfo"}}},{"name":"dynamic_fee","type":{"defined":{"name":"DynamicFeeConfig"}}},{"name":"protocol_fee_percent","type":"u8"},{"name":"padding_0","type":"u8"},{"name":"referral_fee_percent","type":"u8"},{"name":"padding_1","type":{"array":["u8",3]}},{"name":"compounding_fee_bps","docs":["Compounding fee bps, only non-zero if collect_fee_mode is compounding"],"type":"u16"},{"name":"padding_2","type":{"array":["u64",5]}}]}},{"name":"PoolFeesStruct","docs":["Information regarding fee charges","trading_fee = amount * trade_fee_numerator / denominator","protocol_fee = trading_fee * protocol_fee_percentage / 100","referral_fee = protocol_fee * referral_percentage / 100"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","docs":["Trade fees are extra token amounts that are held inside the token","accounts during a trade, making the value of liquidity tokens rise.","Trade fee numerator"],"type":{"defined":{"name":"BaseFeeStruct"}}},{"name":"protocol_fee_percent","docs":["Protocol trading fees are extra token amounts that are held inside the token","accounts during a trade, with the equivalent in pool tokens minted to","the protocol of the program.","Protocol trade fee numerator"],"type":"u8"},{"name":"padding_0","docs":["padding for future use"],"type":"u8"},{"name":"referral_fee_percent","docs":["referral fee"],"type":"u8"},{"name":"padding_1","docs":["padding"],"type":{"array":["u8",3]}},{"name":"compounding_fee_bps","docs":["compounding fee bps, only non-zero in CollectFeeMode::Compounding"],"type":"u16"},{"name":"dynamic_fee","docs":["dynamic fee"],"type":{"defined":{"name":"DynamicFeeStruct"}}},{"name":"init_sqrt_price","type":"u128"}]}},{"name":"PoolMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_lp_a_fee","type":"u128"},{"name":"total_lp_b_fee","type":"u128"},{"name":"total_protocol_a_fee","type":"u64"},{"name":"total_protocol_b_fee","type":"u64"},{"name":"padding_0","type":{"array":["u64",2]}},{"name":"total_position","type":"u64"},{"name":"padding","type":"u64"}]}},{"name":"Position","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"nft_mint","docs":["nft mint"],"type":"pubkey"},{"name":"fee_a_per_token_checkpoint","docs":["fee a checkpoint"],"type":{"array":["u8",32]}},{"name":"fee_b_per_token_checkpoint","docs":["fee b checkpoint"],"type":{"array":["u8",32]}},{"name":"fee_a_pending","docs":["fee a pending"],"type":"u64"},{"name":"fee_b_pending","docs":["fee b pending"],"type":"u64"},{"name":"unlocked_liquidity","docs":["unlock liquidity"],"type":"u128"},{"name":"vested_liquidity","docs":["vesting liquidity"],"type":"u128"},{"name":"permanent_locked_liquidity","docs":["permanent locked liquidity"],"type":"u128"},{"name":"metrics","docs":["metrics"],"type":{"defined":{"name":"PositionMetrics"}}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"UserRewardInfo"}},2]}},{"name":"inner_vesting","docs":["inner vesting info"],"type":{"defined":{"name":"InnerVesting"}}},{"name":"padding","docs":["padding for future usage"],"type":"u128"}]}},{"name":"PositionMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_claimed_a_fee","type":"u64"},{"name":"total_claimed_b_fee","type":"u64"}]}},{"name":"RemoveLiquidityParameters","type":{"kind":"struct","fields":[{"name":"liquidity_delta","docs":["delta liquidity"],"type":"u128"},{"name":"token_a_amount_threshold","docs":["minimum token a amount"],"type":"u64"},{"name":"token_b_amount_threshold","docs":["minimum token b amount"],"type":"u64"}]}},{"name":"RewardInfo","docs":["Stores the state relevant for tracking liquidity mining rewards"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Indicates if the reward has been initialized"],"type":"u8"},{"name":"reward_token_flag","docs":["reward token flag"],"type":"u8"},{"name":"_padding_0","docs":["padding"],"type":{"array":["u8",6]}},{"name":"_padding_1","docs":["Padding to ensure `reward_rate: u128` is 16-byte aligned"],"type":{"array":["u8",8]}},{"name":"mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"funder","docs":["Authority account that allows to fund rewards"],"type":"pubkey"},{"name":"reward_duration","docs":["reward duration"],"type":"u64"},{"name":"reward_duration_end","docs":["reward duration end"],"type":"u64"},{"name":"reward_rate","docs":["reward rate"],"type":"u128"},{"name":"reward_per_token_stored","docs":["Reward per token stored"],"type":{"array":["u8",32]}},{"name":"last_update_time","docs":["The last time reward states were updated."],"type":"u64"},{"name":"cumulative_seconds_with_empty_liquidity_reward","docs":["Accumulated seconds when the farm distributed rewards but the bin was empty.","These rewards will be carried over to the next reward time window."],"type":"u64"}]}},{"name":"SplitAmountInfo","type":{"kind":"struct","fields":[{"name":"permanent_locked_liquidity","type":"u128"},{"name":"unlocked_liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitAmountInfo2","type":{"kind":"struct","fields":[{"name":"permanent_locked_liquidity","type":"u128"},{"name":"unlocked_liquidity","type":"u128"},{"name":"vested_liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitPositionInfo","type":{"kind":"struct","fields":[{"name":"liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitPositionInfo2","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity","type":"u128"},{"name":"permanent_locked_liquidity","type":"u128"},{"name":"vested_liquidity","type":"u128"},{"name":"fee_a","type":"u64"},{"name":"fee_b","type":"u64"},{"name":"reward_0","type":"u64"},{"name":"reward_1","type":"u64"}]}},{"name":"SplitPositionParameters","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity_percentage","docs":["Percentage of unlocked liquidity to split to the second position"],"type":"u8"},{"name":"permanent_locked_liquidity_percentage","docs":["Percentage of permanent locked liquidity to split to the second position"],"type":"u8"},{"name":"fee_a_percentage","docs":["Percentage of fee A pending to split to the second position"],"type":"u8"},{"name":"fee_b_percentage","docs":["Percentage of fee B pending to split to the second position"],"type":"u8"},{"name":"reward_0_percentage","docs":["Percentage of reward 0 pending to split to the second position"],"type":"u8"},{"name":"reward_1_percentage","docs":["Percentage of reward 1 pending to split to the second position"],"type":"u8"},{"name":"inner_vesting_liquidity_percentage","docs":["Percentage of inner vesting liquidity"],"type":"u8"},{"name":"padding","docs":["padding for future"],"type":{"array":["u8",15]}}]}},{"name":"SplitPositionParameters2","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity_numerator","type":"u32"},{"name":"permanent_locked_liquidity_numerator","type":"u32"},{"name":"fee_a_numerator","type":"u32"},{"name":"fee_b_numerator","type":"u32"},{"name":"reward_0_numerator","type":"u32"},{"name":"reward_1_numerator","type":"u32"}]}},{"name":"SplitPositionParameters3","type":{"kind":"struct","fields":[{"name":"unlocked_liquidity_numerator","type":"u32"},{"name":"permanent_locked_liquidity_numerator","type":"u32"},{"name":"fee_a_numerator","type":"u32"},{"name":"fee_b_numerator","type":"u32"},{"name":"reward_0_numerator","type":"u32"},{"name":"reward_1_numerator","type":"u32"},{"name":"inner_vesting_liquidity_numerator","type":"u32"}]}},{"name":"StaticConfigParameters","type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"sqrt_min_price","type":"u128"},{"name":"sqrt_max_price","type":"u128"},{"name":"vault_config_key","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"activation_type","type":"u8"},{"name":"collect_fee_mode","type":"u8"}]}},{"name":"SwapParameters","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]}},{"name":"SwapParameters2","type":{"kind":"struct","fields":[{"name":"amount_0","docs":["When it's exact in, partial fill, this will be amount_in. When it's exact out, this will be amount_out"],"type":"u64"},{"name":"amount_1","docs":["When it's exact in, partial fill, this will be minimum_amount_out. When it's exact out, this will be maximum_amount_in"],"type":"u64"},{"name":"swap_mode","docs":["Swap mode, refer [SwapMode]"],"type":"u8"}]}},{"name":"SwapResult2","type":{"kind":"struct","fields":[{"name":"included_fee_input_amount","type":"u64"},{"name":"excluded_fee_input_amount","type":"u64"},{"name":"amount_left","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"next_sqrt_price","type":"u128"},{"name":"claiming_fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"compounding_fee","type":"u64"},{"name":"referral_fee","type":"u64"}]}},{"name":"TokenBadge","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"UpdatePoolFeesParameters","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","docs":["Base fee update mode:","- None: skip base fee update","- Some: update new cliff_fee_numerator if base fee is static"],"type":{"option":"u64"}},{"name":"dynamic_fee","docs":["Dynamic fee update mode:","- None: skip dynamic fee update","- Some(with default value): disable dynamic fee","- Some(with non default value): enable dynamic fee if disabled or update dynamic fee if enabled"],"type":{"option":{"defined":{"name":"DynamicFeeParameters"}}}}]}},{"name":"UserRewardInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"reward_per_token_checkpoint","docs":["The latest update reward checkpoint"],"type":{"array":["u8",32]}},{"name":"reward_pendings","docs":["Current pending rewards"],"type":"u64"},{"name":"total_claimed_rewards","docs":["Total claimed rewards"],"type":"u64"}]}},{"name":"Vesting","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"inner_vesting","type":{"defined":{"name":"InnerVesting"}}},{"name":"padding2","type":{"array":["u128",4]}}]}},{"name":"VestingParameters","type":{"kind":"struct","fields":[{"name":"cliff_point","type":{"option":"u64"}},{"name":"period_frequency","type":"u64"},{"name":"cliff_unlock_liquidity","type":"u128"},{"name":"liquidity_per_period","type":"u128"},{"name":"number_of_period","type":"u16"}]}}],"constants":[{"name":"BIN_STEP_BPS_DEFAULT","type":"u16","value":"1"},{"name":"BIN_STEP_U128_DEFAULT_LE_BYTES","type":{"array":["u8",16]},"value":"[203, 16, 199, 186, 184, 141, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0]"},{"name":"CURRENT_POOL_VERSION","type":"u8","value":"1"},{"name":"CUSTOMIZABLE_POOL_PREFIX","type":"bytes","value":"[99, 112, 111, 111, 108]"},{"name":"FEE_DENOMINATOR","docs":["Default fee denominator. DO NOT simply update it as it will break logic that depends on it as default value."],"type":"u64","value":"1000000000"},{"name":"MAX_BASIS_POINT","docs":["Max basis point. 100% in pct"],"type":"u16","value":"10000"},{"name":"MAX_FEE_NUMERATOR_V0","type":"u64","value":"500000000"},{"name":"MAX_FEE_NUMERATOR_V1","type":"u64","value":"990000000"},{"name":"MAX_SQRT_PRICE_LE_BYTES","type":{"array":["u8",16]},"value":"[155, 87, 105, 78, 169, 26, 92, 132, 177, 196, 254, 255, 0, 0, 0, 0]"},{"name":"MIN_FEE_NUMERATOR","type":"u64","value":"100000"},{"name":"MIN_SQRT_PRICE_LE_BYTES","type":{"array":["u8",16]},"value":"[80, 59, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]"},{"name":"POOL_AUTHORITY_PREFIX","type":"bytes","value":"[112, 111, 111, 108, 95, 97, 117, 116, 104, 111, 114, 105, 116, 121]"},{"name":"POOL_PREFIX","type":"bytes","value":"[112, 111, 111, 108]"},{"name":"POSITION_NFT_ACCOUNT_PREFIX","type":"bytes","value":"[112, 111, 115, 105, 116, 105, 111, 110, 95, 110, 102, 116, 95, 97, 99, 99, 111, 117, 110, 116]"},{"name":"POSITION_PREFIX","type":"bytes","value":"[112, 111, 115, 105, 116, 105, 111, 110]"},{"name":"SPLIT_POSITION_DENOMINATOR","type":"u32","value":"1000000000"},{"name":"TOKEN_VAULT_PREFIX","type":"bytes","value":"[116, 111, 107, 101, 110, 95, 118, 97, 117, 108, 116]"}]} \ No newline at end of file diff --git a/idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json b/idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json new file mode 100644 index 0000000..98ed38b --- /dev/null +++ b/idls/meteora_dbc.dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN.json @@ -0,0 +1 @@ +{"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN","metadata":{"name":"dynamic_bonding_curve","version":"0.1.10","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim_creator_trading_fee","discriminator":[82,220,250,189,3,85,107,45],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true},{"name":"token_a_account","docs":["The treasury token a account"],"writable":true},{"name":"token_b_account","docs":["The treasury token b account"],"writable":true},{"name":"base_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"quote_mint","docs":["The mint of token b"]},{"name":"creator","signer":true},{"name":"token_base_program","docs":["Token a program"]},{"name":"token_quote_program","docs":["Token b program"]},{"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":"max_base_amount","type":"u64"},{"name":"max_quote_amount","type":"u64"}]},{"name":"claim_partner_pool_creation_fee","discriminator":[250,238,26,4,139,10,101,248],"accounts":[{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"fee_claimer","signer":true},{"name":"fee_receiver","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":"claim_protocol_fee","discriminator":[165,228,133,48,99,249,255,33],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"base_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"quote_mint","docs":["The mint of token b"],"relations":["config"]},{"name":"token_base_account","writable":true},{"name":"token_quote_account","writable":true},{"name":"operator"},{"name":"signer","docs":["Signer"],"signer":true},{"name":"token_base_program","docs":["Token a program"]},{"name":"token_quote_program","docs":["Token b program"]},{"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":"max_base_amount","type":"u64"},{"name":"max_quote_amount","type":"u64"}]},{"name":"claim_protocol_pool_creation_fee","discriminator":[114,205,83,188,240,153,25,54],"accounts":[{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"operator"},{"name":"signer","docs":["Operator"],"signer":true},{"name":"treasury","writable":true,"address":"6aYhxiNGmG8AyU25rh2R7iFu4pBrqnQHpNUGhmsEXRcm"},{"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":"claim_trading_fee","discriminator":[8,236,89,49,152,125,177,81],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"token_a_account","docs":["The treasury token a account"],"writable":true},{"name":"token_b_account","docs":["The treasury token b account"],"writable":true},{"name":"base_vault","docs":["The vault token account for input token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of token a"],"relations":["pool"]},{"name":"quote_mint","docs":["The mint of token b"],"relations":["config"]},{"name":"fee_claimer","signer":true},{"name":"token_base_program","docs":["Token a program"]},{"name":"token_quote_program","docs":["Token b program"]},{"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":"max_amount_a","type":"u64"},{"name":"max_amount_b","type":"u64"}]},{"name":"close_claim_protocol_fee_operator","discriminator":[8,41,87,35,80,48,121,26],"accounts":[{"name":"claim_fee_operator","writable":true},{"name":"rent_receiver","writable":true},{"name":"signer","signer":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":"close_operator_account","discriminator":[171,9,213,74,120,23,3,29],"accounts":[{"name":"operator","writable":true},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"create_config","discriminator":[201,207,243,114,75,111,47,189],"accounts":[{"name":"config","writable":true,"signer":true},{"name":"fee_claimer"},{"name":"leftover_receiver"},{"name":"quote_mint","docs":["quote mint"]},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"config_parameters","type":{"defined":{"name":"ConfigParameters"}}}]},{"name":"create_locker","docs":["PERMISSIONLESS FUNCTIONS ///","create locker"],"discriminator":[167,90,137,154,75,47,17,84],"accounts":[{"name":"virtual_pool","docs":["Virtual pool"],"writable":true},{"name":"config","docs":["Config"],"relations":["virtual_pool"]},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"base_vault","writable":true,"relations":["virtual_pool"]},{"name":"base_mint","writable":true,"relations":["virtual_pool"]},{"name":"base","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,97,115,101,95,108,111,99,107,101,114]},{"kind":"account","path":"virtual_pool"}]}},{"name":"creator","relations":["virtual_pool"]},{"name":"escrow","writable":true},{"name":"escrow_token","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"token_program"},{"name":"locker_program","address":"LocpQgucEQHbqNABEYvBvwoxCPsSbG91A1QaQhQQqjn"},{"name":"locker_event_authority"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_operator_account","discriminator":[221,64,246,149,240,153,229,163],"accounts":[{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"whitelisted_address"}]}},{"name":"whitelisted_address"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"permission","type":"u128"}]},{"name":"create_partner_metadata","docs":["PARTNER FUNCTIONS ///"],"discriminator":[192,168,234,191,188,226,227,255],"accounts":[{"name":"partner_metadata","docs":["Partner metadata"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,97,114,116,110,101,114,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"fee_claimer"}]}},{"name":"payer","docs":["Payer of the partner metadata."],"writable":true,"signer":true},{"name":"fee_claimer","docs":["Fee claimer for partner"],"signer":true},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"},{"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":"metadata","type":{"defined":{"name":"CreatePartnerMetadataParameters"}}}]},{"name":"create_virtual_pool_metadata","discriminator":[45,97,187,103,254,109,124,134],"accounts":[{"name":"virtual_pool","writable":true},{"name":"virtual_pool_metadata","docs":["Virtual pool metadata"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[118,105,114,116,117,97,108,95,112,111,111,108,95,109,101,116,97,100,97,116,97]},{"kind":"account","path":"virtual_pool"}]}},{"name":"creator","signer":true},{"name":"payer","docs":["Payer of the virtual pool metadata."],"writable":true,"signer":true},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"},{"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":"metadata","type":{"defined":{"name":"CreateVirtualPoolMetadataParameters"}}}]},{"name":"creator_withdraw_surplus","discriminator":[165,3,137,7,28,134,76,80],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_quote_account","docs":["The receiver token account"],"writable":true},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"quote_mint","docs":["The mint of quote token"],"relations":["config"]},{"name":"creator","signer":true},{"name":"token_quote_program","docs":["Token b program"]},{"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":"initialize_virtual_pool_with_spl_token","docs":["POOL CREATOR FUNCTIONS ////"],"discriminator":[140,85,215,176,102,54,104,79],"accounts":[{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"creator","signer":true},{"name":"base_mint","writable":true,"signer":true},{"name":"quote_mint","relations":["config"]},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"base_vault","docs":["Token a vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"pool"}]}},{"name":"quote_vault","docs":["Token b vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"},{"kind":"account","path":"pool"}]}},{"name":"mint_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"token_quote_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"InitializePoolParameters"}}}]},{"name":"initialize_virtual_pool_with_token2022","discriminator":[169,118,51,78,145,110,220,155],"accounts":[{"name":"config","docs":["Which config the pool belongs to."]},{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"creator","signer":true},{"name":"base_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"quote_mint","relations":["config"]},{"name":"pool","docs":["Initialize an account to store the pool state"],"writable":true},{"name":"base_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"pool"}]}},{"name":"quote_vault","docs":["Token quote vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"},{"kind":"account","path":"pool"}]}},{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"token_quote_program","docs":["Program to create mint account and mint tokens"]},{"name":"token_program","docs":["token program for base mint"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"InitializePoolParameters"}}}]},{"name":"migrate_meteora_damm","discriminator":[27,1,48,22,180,63,118,217],"accounts":[{"name":"virtual_pool","docs":["virtual pool"],"writable":true,"relations":["migration_metadata"]},{"name":"migration_metadata","writable":true},{"name":"config","relations":["virtual_pool"]},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true},{"name":"damm_config","docs":["pool config"]},{"name":"lp_mint","writable":true},{"name":"token_a_mint","writable":true},{"name":"token_b_mint"},{"name":"a_vault","writable":true},{"name":"b_vault","writable":true},{"name":"a_token_vault","writable":true},{"name":"b_token_vault","writable":true},{"name":"a_vault_lp_mint","writable":true},{"name":"b_vault_lp_mint","writable":true},{"name":"a_vault_lp","writable":true},{"name":"b_vault_lp","writable":true},{"name":"base_vault","writable":true,"relations":["virtual_pool"]},{"name":"quote_vault","writable":true,"relations":["virtual_pool"]},{"name":"virtual_pool_lp","writable":true},{"name":"protocol_token_a_fee","writable":true},{"name":"protocol_token_b_fee","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"rent"},{"name":"mint_metadata","writable":true},{"name":"metadata_program"},{"name":"amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"},{"name":"vault_program"},{"name":"token_program","docs":["token_program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"migrate_meteora_damm_claim_lp_token","discriminator":[139,133,2,30,91,145,127,154],"accounts":[{"name":"virtual_pool","relations":["migration_metadata"]},{"name":"migration_metadata","docs":["migration metadata"],"writable":true},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"lp_mint","relations":["migration_metadata"]},{"name":"source_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"migration_metadata"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"destination_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"migration_metadata"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"owner"},{"name":"sender","signer":true},{"name":"token_program","docs":["token_program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"migrate_meteora_damm_lock_lp_token","discriminator":[177,55,238,157,251,88,165,42],"accounts":[{"name":"virtual_pool","relations":["migration_metadata"]},{"name":"migration_metadata","docs":["migration_metadata"],"writable":true},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true,"relations":["lock_escrow"]},{"name":"lp_mint","relations":["migration_metadata"]},{"name":"lock_escrow","writable":true},{"name":"owner","relations":["lock_escrow"]},{"name":"source_tokens","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"migration_metadata"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"escrow_vault","writable":true},{"name":"amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"},{"name":"a_vault"},{"name":"b_vault"},{"name":"a_vault_lp"},{"name":"b_vault_lp"},{"name":"a_vault_lp_mint"},{"name":"b_vault_lp_mint"},{"name":"token_program","docs":["token_program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"migration_damm_v2","discriminator":[156,169,230,103,53,228,80,64],"accounts":[{"name":"virtual_pool","docs":["virtual pool"],"writable":true},{"name":"migration_metadata"},{"name":"config","docs":["virtual pool config key"],"relations":["virtual_pool"]},{"name":"pool_authority","writable":true,"address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"pool","writable":true},{"name":"first_position_nft_mint","writable":true,"signer":true},{"name":"first_position_nft_account","writable":true},{"name":"first_position","writable":true},{"name":"second_position_nft_mint","writable":true,"signer":true,"optional":true},{"name":"second_position_nft_account","writable":true,"optional":true},{"name":"second_position","writable":true,"optional":true},{"name":"damm_pool_authority"},{"name":"amm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"base_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"token_a_vault","writable":true},{"name":"token_b_vault","writable":true},{"name":"base_vault","writable":true,"relations":["virtual_pool"]},{"name":"quote_vault","writable":true,"relations":["virtual_pool"]},{"name":"payer","writable":true,"signer":true},{"name":"token_base_program"},{"name":"token_quote_program"},{"name":"token_2022_program"},{"name":"damm_event_authority"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"migration_damm_v2_create_metadata","discriminator":[109,189,19,36,195,183,222,82],"accounts":[{"name":"virtual_pool"},{"name":"config"},{"name":"migration_metadata"},{"name":"payer"},{"name":"system_program"},{"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":"migration_meteora_damm_create_metadata","docs":["migrate damm v1"],"discriminator":[47,94,126,115,221,226,194,133],"accounts":[{"name":"virtual_pool"},{"name":"config","relations":["virtual_pool"]},{"name":"migration_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,101,111,114,97]},{"kind":"account","path":"virtual_pool"}]}},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"partner_withdraw_surplus","discriminator":[168,173,72,100,201,98,38,92],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_quote_account","docs":["The receiver token account"],"writable":true},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"quote_mint","docs":["The mint of quote token"],"relations":["config"]},{"name":"fee_claimer","signer":true},{"name":"token_quote_program","docs":["Token b program"]},{"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":"swap","docs":["TRADING BOTS FUNCTIONS ////"],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","docs":["config key"],"relations":["pool"]},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"base_vault","docs":["The vault token account for base token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for quote token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of base token"]},{"name":"quote_mint","docs":["The mint of quote token"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_base_program","docs":["Token base program"]},{"name":"token_quote_program","docs":["Token quote program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"params","type":{"defined":{"name":"SwapParameters"}}}]},{"name":"swap2","discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","docs":["config key"],"relations":["pool"]},{"name":"pool","docs":["Pool account"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"base_vault","docs":["The vault token account for base token"],"writable":true,"relations":["pool"]},{"name":"quote_vault","docs":["The vault token account for quote token"],"writable":true,"relations":["pool"]},{"name":"base_mint","docs":["The mint of base token"]},{"name":"quote_mint","docs":["The mint of quote token"]},{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"token_base_program","docs":["Token base program"]},{"name":"token_quote_program","docs":["Token quote program"]},{"name":"referral_token_account","docs":["referral token account"],"writable":true,"optional":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":"params","type":{"defined":{"name":"SwapParameters2"}}}]},{"name":"transfer_pool_creator","discriminator":[20,7,169,33,58,147,166,33],"accounts":[{"name":"virtual_pool","writable":true},{"name":"config","relations":["virtual_pool"]},{"name":"creator","signer":true},{"name":"new_creator"},{"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":"withdraw_leftover","discriminator":[20,198,202,237,235,243,183,66],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_base_account","docs":["The receiver token account, withdraw to ATA"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"leftover_receiver"},{"kind":"account","path":"token_base_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"base_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"base_mint","docs":["The mint of quote token"],"relations":["virtual_pool"]},{"name":"leftover_receiver","relations":["config"]},{"name":"token_base_program","docs":["Token base program"]},{"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":"withdraw_migration_fee","docs":["BOTH partner and creator FUNCTIONS ///"],"discriminator":[237,142,45,23,129,6,222,162],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["virtual_pool"]},{"name":"virtual_pool","writable":true},{"name":"token_quote_account","docs":["The receiver token account"],"writable":true},{"name":"quote_vault","docs":["The vault token account for output token"],"writable":true,"relations":["virtual_pool"]},{"name":"quote_mint","docs":["The mint of quote token"],"relations":["config"]},{"name":"sender","signer":true},{"name":"token_quote_program","docs":["Token b program"]},{"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":"flag","type":"u8"}]},{"name":"zap_protocol_fee","discriminator":[213,155,187,34,56,182,91,240],"accounts":[{"name":"pool_authority","address":"FhVo3mqL8PW5pH5U2CN4XE33DokiyZnUwuGpH2hmHLuM"},{"name":"config","relations":["pool"]},{"name":"pool","writable":true},{"name":"token_vault","writable":true},{"name":"token_mint"},{"name":"receiver_token","writable":true},{"name":"operator","docs":["zap claim fee operator"]},{"name":"signer","docs":["Operator"],"signer":true},{"name":"token_program","docs":["Token program"]},{"name":"sysvar_instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"max_amount","type":"u64"}]}],"accounts":[{"name":"ClaimFeeOperator","discriminator":[166,48,134,86,34,200,188,150]},{"name":"Config","discriminator":[155,12,170,224,30,250,204,130]},{"name":"LockEscrow","discriminator":[190,106,121,6,200,182,21,75]},{"name":"MeteoraDammMigrationMetadata","discriminator":[17,155,141,215,207,4,133,156]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"PartnerMetadata","discriminator":[68,68,130,19,16,209,98,156]},{"name":"PoolConfig","discriminator":[26,108,14,123,116,230,129,43]},{"name":"VirtualPool","discriminator":[213,224,5,209,98,69,119,92]},{"name":"VirtualPoolMetadata","discriminator":[217,37,82,250,43,47,228,254]}],"events":[{"name":"EvtClaimCreatorTradingFee","discriminator":[154,228,215,202,133,155,214,138]},{"name":"EvtClaimPoolCreationFee","discriminator":[149,111,149,44,136,64,175,62]},{"name":"EvtClaimProtocolFee","discriminator":[186,244,75,251,188,13,25,33]},{"name":"EvtClaimProtocolLiquidityMigrationFee","discriminator":[81,168,116,31,161,86,27,35]},{"name":"EvtClaimTradingFee","discriminator":[26,83,117,240,92,202,112,254]},{"name":"EvtCloseClaimFeeOperator","discriminator":[111,39,37,55,110,216,194,23]},{"name":"EvtCreateClaimFeeOperator","discriminator":[21,6,153,120,68,116,28,177]},{"name":"EvtCreateConfig","discriminator":[131,207,180,174,180,73,165,54]},{"name":"EvtCreateConfigV2","discriminator":[163,74,66,187,119,195,26,144]},{"name":"EvtCreateMeteoraMigrationMetadata","discriminator":[99,167,133,63,214,143,175,139]},{"name":"EvtCreatorWithdrawSurplus","discriminator":[152,73,21,15,66,87,53,157]},{"name":"EvtCurveComplete","discriminator":[229,231,86,84,156,134,75,24]},{"name":"EvtInitializePool","discriminator":[228,50,246,85,203,66,134,37]},{"name":"EvtPartnerClaimPoolCreationFee","discriminator":[174,223,44,150,145,98,89,195]},{"name":"EvtPartnerMetadata","discriminator":[200,127,6,55,13,32,8,150]},{"name":"EvtPartnerWithdrawMigrationFee","discriminator":[181,105,127,67,8,187,120,57]},{"name":"EvtPartnerWithdrawSurplus","discriminator":[195,56,152,9,232,72,35,22]},{"name":"EvtSwap","discriminator":[27,60,21,213,138,170,187,147]},{"name":"EvtSwap2","discriminator":[189,66,51,168,38,80,117,153]},{"name":"EvtUpdatePoolCreator","discriminator":[107,225,165,237,91,158,213,220]},{"name":"EvtVirtualPoolMetadata","discriminator":[188,18,72,76,195,91,38,74]},{"name":"EvtWithdrawLeftover","discriminator":[191,189,104,143,111,156,94,229]},{"name":"EvtWithdrawMigrationFee","discriminator":[26,203,84,85,161,23,100,214]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"InvalidFee","msg":"Invalid fee setup"},{"code":6002,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6003,"name":"ExceedMaxFeeBps","msg":"Exceeded max fee bps"},{"code":6004,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6005,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6006,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6007,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6008,"name":"InvalidQuoteMint","msg":"Invalid quote mint"},{"code":6009,"name":"InvalidCollectFeeMode","msg":"Invalid collect fee mode"},{"code":6010,"name":"InvalidMigrationFeeOption","msg":"Invalid migration fee option"},{"code":6011,"name":"InvalidInput","msg":"Invalid input"},{"code":6012,"name":"NotEnoughLiquidity","msg":"Not enough liquidity"},{"code":6013,"name":"PoolIsCompleted","msg":"Pool is completed"},{"code":6014,"name":"PoolIsIncompleted","msg":"Pool is incompleted"},{"code":6015,"name":"InvalidMigrationOption","msg":"Invalid migration option"},{"code":6016,"name":"InvalidTokenDecimals","msg":"Invalid token decimals"},{"code":6017,"name":"InvalidTokenType","msg":"Invalid token type"},{"code":6018,"name":"InvalidFeePercentage","msg":"Invalid fee percentage"},{"code":6019,"name":"InvalidQuoteThreshold","msg":"Invalid quote threshold"},{"code":6020,"name":"InvalidTokenSupply","msg":"Invalid token supply"},{"code":6021,"name":"InvalidCurve","msg":"Invalid curve"},{"code":6022,"name":"NotPermitToDoThisAction","msg":"Not permit to do this action"},{"code":6023,"name":"InvalidOwnerAccount","msg":"Invalid owner account"},{"code":6024,"name":"InvalidConfigAccount","msg":"Invalid config account"},{"code":6025,"name":"SurplusHasBeenWithdraw","msg":"Surplus has been withdraw"},{"code":6026,"name":"LeftoverHasBeenWithdraw","msg":"Leftover has been withdraw"},{"code":6027,"name":"TotalBaseTokenExceedMaxSupply","msg":"Total base token is exceeded max supply"},{"code":6028,"name":"UnsupportNativeMintToken2022","msg":"Unsupport native mint token 2022"},{"code":6029,"name":"InsufficientLiquidityForMigration","msg":"Insufficient liquidity for migration"},{"code":6030,"name":"MissingPoolConfigInRemainingAccount","msg":"Missing pool config in remaining account"},{"code":6031,"name":"InvalidVestingParameters","msg":"Invalid vesting parameters"},{"code":6032,"name":"InvalidLeftoverAddress","msg":"Invalid leftover address"},{"code":6033,"name":"InsufficientLiquidity","msg":"Liquidity in bonding curve is insufficient"},{"code":6034,"name":"InvalidFeeScheduler","msg":"Invalid fee scheduler"},{"code":6035,"name":"InvalidCreatorTradingFeePercentage","msg":"Invalid creator trading fee percentage"},{"code":6036,"name":"InvalidNewCreator","msg":"Invalid new creator"},{"code":6037,"name":"InvalidTokenAuthorityOption","msg":"Invalid token authority option"},{"code":6038,"name":"InvalidAccount","msg":"Invalid account for the instruction"},{"code":6039,"name":"InvalidMigratorFeePercentage","msg":"Invalid migrator fee percentage"},{"code":6040,"name":"MigrationFeeHasBeenWithdraw","msg":"Migration fee has been withdraw"},{"code":6041,"name":"InvalidBaseFeeMode","msg":"Invalid base fee mode"},{"code":6042,"name":"InvalidFeeRateLimiter","msg":"Invalid fee rate limiter"},{"code":6043,"name":"FailToValidateSingleSwapInstruction","msg":"Fail to validate single swap instruction in rate limiter"},{"code":6044,"name":"InvalidMigratedPoolFee","msg":"Invalid migrated pool fee params"},{"code":6045,"name":"UndeterminedError","msg":"Undertermined error"},{"code":6046,"name":"RateLimiterNotSupported","msg":"Rate limiter not supported"},{"code":6047,"name":"AmountLeftIsNotZero","msg":"Amount left is not zero"},{"code":6048,"name":"NextSqrtPriceIsSmallerThanStartSqrtPrice","msg":"Next sqrt price is smaller than start sqrt price"},{"code":6049,"name":"InvalidMinBaseFee","msg":"Invalid min base fee"},{"code":6050,"name":"AccountInvariantViolation","msg":"Account invariant violation"},{"code":6051,"name":"InvalidPoolCreationFee","msg":"Invalid pool creation fee"},{"code":6052,"name":"PoolCreationFeeHasBeenClaimed","msg":"Pool creation fee has been claimed"},{"code":6053,"name":"Unauthorized","msg":"Not permit to do this action"},{"code":6054,"name":"ZeroPoolCreationFee","msg":"Pool creation fee is zero"},{"code":6055,"name":"InvalidMigrationLockedLiquidity","msg":"Invalid migration locked liquidity"},{"code":6056,"name":"InvalidFeeMarketCapScheduler","msg":"Invalid fee market cap scheduler"},{"code":6057,"name":"FirstSwapValidationFailed","msg":"Fail to validate first swap with minimum fee"},{"code":6058,"name":"IncorrectATA","msg":"Incorrect ATA"},{"code":6059,"name":"InsufficientPoolLamports","msg":"Pool has insufficient lamports to perform the operation"},{"code":6060,"name":"InvalidPermission","msg":"Invalid permission"},{"code":6061,"name":"InvalidWithdrawProtocolFeeZapAccounts","msg":"Invalid withdraw protocol fee zap accounts"},{"code":6062,"name":"MintRestrictedFromZap","msg":"SOL,USDC protocol fee cannot be withdrawn via zap"},{"code":6063,"name":"InvalidZapOutParameters","msg":"Invalid zap out parameters"},{"code":6064,"name":"CpiDisabled","msg":"CPI disabled"},{"code":6065,"name":"MissingZapOutInstruction","msg":"Missing zap out instruction"},{"code":6066,"name":"InvalidZapAccounts","msg":"Invalid zap accounts"},{"code":6067,"name":"InvalidCompoundingParameters","msg":"Invalid compounding parameters"}],"types":[{"name":"BaseFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"second_factor","type":"u64"},{"name":"third_factor","type":"u64"},{"name":"first_factor","type":"u16"},{"name":"base_fee_mode","type":"u8"},{"name":"padding_0","type":{"array":["u8",5]}}]}},{"name":"BaseFeeParameters","type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"first_factor","type":"u16"},{"name":"second_factor","type":"u64"},{"name":"third_factor","type":"u64"},{"name":"base_fee_mode","type":"u8"}]}},{"name":"ClaimFeeOperator","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"operator","docs":["operator"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"Config","type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFees"}}},{"name":"activation_duration","type":"u64"},{"name":"vault_config_key","type":"pubkey"},{"name":"pool_creator_authority","type":"pubkey"},{"name":"activation_type","type":"u8"},{"name":"partner_fee_numerator","type":"u64"},{"name":"padding","type":{"array":["u8",219]}}]}},{"name":"ConfigParameters","type":{"kind":"struct","fields":[{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"collect_fee_mode","type":"u8"},{"name":"migration_option","type":"u8"},{"name":"activation_type","type":"u8"},{"name":"token_type","type":"u8"},{"name":"token_decimal","type":"u8"},{"name":"partner_liquidity_percentage","type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","type":"u8"},{"name":"creator_liquidity_percentage","type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","type":"u8"},{"name":"migration_quote_threshold","type":"u64"},{"name":"sqrt_start_price","type":"u128"},{"name":"locked_vesting","type":{"defined":{"name":"LockedVestingParams"}}},{"name":"migration_fee_option","type":"u8"},{"name":"token_supply","type":{"option":{"defined":{"name":"TokenSupplyParams"}}}},{"name":"creator_trading_fee_percentage","type":"u8"},{"name":"token_update_authority","type":"u8"},{"name":"migration_fee","type":{"defined":{"name":"MigrationFee"}}},{"name":"migrated_pool_fee","type":{"defined":{"name":"MigratedPoolFee"}}},{"name":"pool_creation_fee","docs":["pool creation fee in SOL lamports value"],"type":"u64"},{"name":"partner_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfoParams"}}},{"name":"creator_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfoParams"}}},{"name":"migrated_pool_base_fee_mode","type":"u8"},{"name":"migrated_pool_market_cap_fee_scheduler_params","type":{"defined":{"name":"MigratedPoolMarketCapFeeSchedulerParams"}}},{"name":"enable_first_swap_with_min_fee","type":"bool"},{"name":"compounding_fee_bps","type":"u16"},{"name":"padding","docs":["padding for future use"],"type":{"array":["u8",2]}},{"name":"curve","type":{"vec":{"defined":{"name":"LiquidityDistributionParameters"}}}}]}},{"name":"CreatePartnerMetadataParameters","type":{"kind":"struct","fields":[{"name":"padding","type":{"array":["u8",96]}},{"name":"name","type":"string"},{"name":"website","type":"string"},{"name":"logo","type":"string"}]}},{"name":"CreateVirtualPoolMetadataParameters","type":{"kind":"struct","fields":[{"name":"padding","type":{"array":["u8",96]}},{"name":"name","type":"string"},{"name":"website","type":"string"},{"name":"logo","type":"string"}]}},{"name":"DynamicFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"padding2","type":{"array":["u8",8]}},{"name":"bin_step_u128","type":"u128"}]}},{"name":"DynamicFeeParameters","type":{"kind":"struct","fields":[{"name":"bin_step","type":"u16"},{"name":"bin_step_u128","type":"u128"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"}]}},{"name":"EvtClaimCreatorTradingFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtClaimPoolCreationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"receiver","type":"pubkey"},{"name":"creation_fee","type":"u64"}]}},{"name":"EvtClaimProtocolFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtClaimProtocolLiquidityMigrationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtClaimTradingFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"token_base_amount","type":"u64"},{"name":"token_quote_amount","type":"u64"}]}},{"name":"EvtCloseClaimFeeOperator","docs":["Close claim fee operator"],"type":{"kind":"struct","fields":[{"name":"claim_fee_operator","type":"pubkey"},{"name":"operator","type":"pubkey"}]}},{"name":"EvtCreateClaimFeeOperator","docs":["Create claim fee operator"],"type":{"kind":"struct","fields":[{"name":"operator","type":"pubkey"}]}},{"name":"EvtCreateConfig","docs":["Create config"],"type":{"kind":"struct","fields":[{"name":"config","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"fee_claimer","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"pool_fees","type":{"defined":{"name":"PoolFeeParameters"}}},{"name":"collect_fee_mode","type":"u8"},{"name":"migration_option","type":"u8"},{"name":"activation_type","type":"u8"},{"name":"token_decimal","type":"u8"},{"name":"token_type","type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","type":"u8"},{"name":"partner_liquidity_percentage","type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","type":"u8"},{"name":"creator_liquidity_percentage","type":"u8"},{"name":"swap_base_amount","type":"u64"},{"name":"migration_quote_threshold","type":"u64"},{"name":"migration_base_amount","type":"u64"},{"name":"sqrt_start_price","type":"u128"},{"name":"locked_vesting","type":{"defined":{"name":"LockedVestingParams"}}},{"name":"migration_fee_option","type":"u8"},{"name":"fixed_token_supply_flag","type":"u8"},{"name":"pre_migration_token_supply","type":"u64"},{"name":"post_migration_token_supply","type":"u64"},{"name":"curve","type":{"vec":{"defined":{"name":"LiquidityDistributionParameters"}}}}]}},{"name":"EvtCreateConfigV2","type":{"kind":"struct","fields":[{"name":"config","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"fee_claimer","type":"pubkey"},{"name":"leftover_receiver","type":"pubkey"},{"name":"config_parameters","type":{"defined":{"name":"ConfigParameters"}}}]}},{"name":"EvtCreateMeteoraMigrationMetadata","type":{"kind":"struct","fields":[{"name":"virtual_pool","type":"pubkey"}]}},{"name":"EvtCreatorWithdrawSurplus","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"surplus_amount","type":"u64"}]}},{"name":"EvtCurveComplete","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"base_reserve","type":"u64"},{"name":"quote_reserve","type":"u64"}]}},{"name":"EvtInitializePool","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"pool_type","type":"u8"},{"name":"activation_point","type":"u64"}]}},{"name":"EvtPartnerClaimPoolCreationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"partner","type":"pubkey"},{"name":"creation_fee","type":"u64"},{"name":"fee_receiver","type":"pubkey"}]}},{"name":"EvtPartnerMetadata","docs":["Create partner metadata"],"type":{"kind":"struct","fields":[{"name":"partner_metadata","type":"pubkey"},{"name":"fee_claimer","type":"pubkey"}]}},{"name":"EvtPartnerWithdrawMigrationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"fee","type":"u64"}]}},{"name":"EvtPartnerWithdrawSurplus","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"surplus_amount","type":"u64"}]}},{"name":"EvtSwap","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"trade_direction","type":"u8"},{"name":"has_referral","type":"bool"},{"name":"params","type":{"defined":{"name":"SwapParameters"}}},{"name":"swap_result","type":{"defined":{"name":"SwapResult"}}},{"name":"amount_in","type":"u64"},{"name":"current_timestamp","type":"u64"}]}},{"name":"EvtSwap2","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"trade_direction","type":"u8"},{"name":"has_referral","type":"bool"},{"name":"swap_parameters","type":{"defined":{"name":"SwapParameters2"}}},{"name":"swap_result","type":{"defined":{"name":"SwapResult2"}}},{"name":"quote_reserve_amount","type":"u64"},{"name":"migration_threshold","type":"u64"},{"name":"current_timestamp","type":"u64"}]}},{"name":"EvtUpdatePoolCreator","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"new_creator","type":"pubkey"}]}},{"name":"EvtVirtualPoolMetadata","docs":["Create virtual pool metadata"],"type":{"kind":"struct","fields":[{"name":"virtual_pool_metadata","type":"pubkey"},{"name":"virtual_pool","type":"pubkey"}]}},{"name":"EvtWithdrawLeftover","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"leftover_receiver","type":"pubkey"},{"name":"leftover_amount","type":"u64"}]}},{"name":"EvtWithdrawMigrationFee","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"fee","type":"u64"},{"name":"flag","type":"u8"}]}},{"name":"InitializePoolParameters","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"LiquidityDistributionConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"sqrt_price","type":"u128"},{"name":"liquidity","type":"u128"}]}},{"name":"LiquidityDistributionParameters","type":{"kind":"struct","fields":[{"name":"sqrt_price","type":"u128"},{"name":"liquidity","type":"u128"}]}},{"name":"LiquidityVestingInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"is_initialized","type":"u8"},{"name":"vesting_percentage","type":"u8"},{"name":"_padding","type":{"array":["u8",2]}},{"name":"bps_per_period","type":"u16"},{"name":"number_of_periods","type":"u16"},{"name":"frequency","type":"u32"},{"name":"cliff_duration_from_migration_time","type":"u32"}]}},{"name":"LiquidityVestingInfoParams","type":{"kind":"struct","fields":[{"name":"vesting_percentage","type":"u8"},{"name":"bps_per_period","type":"u16"},{"name":"number_of_periods","type":"u16"},{"name":"cliff_duration_from_migration_time","type":"u32"},{"name":"frequency","type":"u32"}]}},{"name":"LockEscrow","docs":["State of lock escrow account"],"type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"escrow_vault","type":"pubkey"},{"name":"bump","type":"u8"},{"name":"total_locked_amount","type":"u64"},{"name":"lp_per_token","type":"u128"},{"name":"unclaimed_fee_pending","type":"u64"},{"name":"a_fee","type":"u64"},{"name":"b_fee","type":"u64"}]}},{"name":"LockedVestingConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_per_period","type":"u64"},{"name":"cliff_duration_from_migration_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"_padding","type":"u64"}]}},{"name":"LockedVestingParams","type":{"kind":"struct","fields":[{"name":"amount_per_period","type":"u64"},{"name":"cliff_duration_from_migration_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"}]}},{"name":"MeteoraDammMigrationMetadata","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"virtual_pool","docs":["pool"],"type":"pubkey"},{"name":"padding_0","docs":["!!! BE CAREFUL to use tombstone field, previous is pool creator"],"type":{"array":["u8",32]}},{"name":"partner","docs":["partner"],"type":"pubkey"},{"name":"lp_mint","docs":["lp mint"],"type":"pubkey"},{"name":"partner_locked_liquidity","docs":["partner locked liquidity"],"type":"u64"},{"name":"partner_liquidity","docs":["partner liquidity"],"type":"u64"},{"name":"creator_locked_liquidity","docs":["creator locked liquidity"],"type":"u64"},{"name":"creator_liquidity","docs":["creator liquidity"],"type":"u64"},{"name":"_padding_0","docs":["padding"],"type":"u8"},{"name":"creator_locked_status","docs":["flag to check whether liquidity token is locked for creator"],"type":"u8"},{"name":"partner_locked_status","docs":["flag to check whether liquidity token is locked for partner"],"type":"u8"},{"name":"creator_claim_status","docs":["flag to check whether creator has claimed liquidity token"],"type":"u8"},{"name":"partner_claim_status","docs":["flag to check whether partner has claimed liquidity token"],"type":"u8"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",107]}}]}},{"name":"MigratedPoolFee","type":{"kind":"struct","fields":[{"name":"collect_fee_mode","type":"u8"},{"name":"dynamic_fee","type":"u8"},{"name":"pool_fee_bps","type":"u16"}]}},{"name":"MigratedPoolMarketCapFeeSchedulerParams","type":{"kind":"struct","fields":[{"name":"number_of_period","type":"u16"},{"name":"sqrt_price_step_bps","type":"u16"},{"name":"scheduler_expiration_duration","type":"u32"},{"name":"reduction_factor","type":"u64"}]}},{"name":"MigrationFee","type":{"kind":"struct","fields":[{"name":"fee_percentage","type":"u8"},{"name":"creator_fee_percentage","type":"u8"}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"whitelisted_address","type":"pubkey"},{"name":"permission","type":"u128"},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"PartnerMetadata","docs":["Metadata for a partner."],"type":{"kind":"struct","fields":[{"name":"fee_claimer","docs":["fee claimer"],"type":"pubkey"},{"name":"padding","docs":["padding for future use"],"type":{"array":["u128",6]}},{"name":"name","docs":["Name of partner."],"type":"string"},{"name":"website","docs":["Website of partner."],"type":"string"},{"name":"logo","docs":["Logo of partner"],"type":"string"}]}},{"name":"PoolConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"quote_mint","docs":["quote mint"],"type":"pubkey"},{"name":"fee_claimer","docs":["Address to get the fee"],"type":"pubkey"},{"name":"leftover_receiver","docs":["Address to receive extra base token after migration, in case token is fixed supply"],"type":"pubkey"},{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesConfig"}}},{"name":"partner_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"creator_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"padding_0","docs":["Padding for future use"],"type":{"array":["u8",14]}},{"name":"padding_1","docs":["Previously was protocol and referral fee percent. Beware of tombstone."],"type":"u16"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"migration_option","docs":["migration option"],"type":"u8"},{"name":"activation_type","docs":["whether mode slot or timestamp"],"type":"u8"},{"name":"token_decimal","docs":["token decimals"],"type":"u8"},{"name":"version","docs":["version"],"type":"u8"},{"name":"token_type","docs":["token type of base token"],"type":"u8"},{"name":"quote_token_flag","docs":["quote token flag"],"type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","docs":["partner locked liquidity percentage"],"type":"u8"},{"name":"partner_liquidity_percentage","docs":["partner liquidity percentage"],"type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","docs":["creator post migration fee percentage"],"type":"u8"},{"name":"creator_liquidity_percentage","docs":["creator liquidity percentage"],"type":"u8"},{"name":"migration_fee_option","docs":["migration fee option"],"type":"u8"},{"name":"fixed_token_supply_flag","docs":["flag to indicate whether token is dynamic supply (0) or fixed supply (1)"],"type":"u8"},{"name":"creator_trading_fee_percentage","docs":["creator trading fee percentage"],"type":"u8"},{"name":"token_update_authority","docs":["token update authority"],"type":"u8"},{"name":"migration_fee_percentage","docs":["migration fee percentage"],"type":"u8"},{"name":"creator_migration_fee_percentage","docs":["creator migration fee percentage"],"type":"u8"},{"name":"padding_2","type":{"array":["u8",7]}},{"name":"swap_base_amount","docs":["swap base amount"],"type":"u64"},{"name":"migration_quote_threshold","docs":["migration quote threshold (in quote token)"],"type":"u64"},{"name":"migration_base_threshold","docs":["migration base threshold (in base token)"],"type":"u64"},{"name":"migration_sqrt_price","docs":["migration sqrt price"],"type":"u128"},{"name":"locked_vesting_config","docs":["locked vesting config"],"type":{"defined":{"name":"LockedVestingConfig"}}},{"name":"pre_migration_token_supply","docs":["pre migration token supply"],"type":"u64"},{"name":"post_migration_token_supply","docs":["post migration token supply"],"type":"u64"},{"name":"migrated_collect_fee_mode","docs":["migrated pool collect fee mode"],"type":"u8"},{"name":"migrated_dynamic_fee","docs":["migrated dynamic fee option."],"type":"u8"},{"name":"migrated_pool_fee_bps","docs":["migrated pool fee in bps"],"type":"u16"},{"name":"migrated_pool_base_fee_mode","type":"u8"},{"name":"enable_first_swap_with_min_fee","type":"u8"},{"name":"migrated_compounding_fee_bps","docs":["compounding fee bps for migrated DAMM v2 pool, should only be non-zero if migrated_collect_fee_mode is 2 (Compounding)"],"type":"u16"},{"name":"pool_creation_fee","docs":["pool creation fee in lamports value"],"type":"u64"},{"name":"migrated_pool_base_fee_bytes","docs":["serialized MigratedPoolMarketCapFeeSchedulerParams, only used when migrated_pool_base_fee_mode is market cap scheduler"],"type":{"array":["u8",16]}},{"name":"sqrt_start_price","docs":["minimum price"],"type":"u128"},{"name":"curve","docs":["curve, only use 20 point firstly, we can extend that latter"],"type":{"array":[{"defined":{"name":"LiquidityDistributionConfig"}},20]}}]}},{"name":"PoolFeeParameters","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"base_fee","docs":["Base fee"],"type":{"defined":{"name":"BaseFeeParameters"}}},{"name":"dynamic_fee","docs":["dynamic fee"],"type":{"option":{"defined":{"name":"DynamicFeeParameters"}}}}]}},{"name":"PoolFees","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"trade_fee_numerator","type":"u64"},{"name":"trade_fee_denominator","type":"u64"},{"name":"protocol_trade_fee_numerator","type":"u64"},{"name":"protocol_trade_fee_denominator","type":"u64"}]}},{"name":"PoolFeesConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","type":{"defined":{"name":"BaseFeeConfig"}}},{"name":"dynamic_fee","type":{"defined":{"name":"DynamicFeeConfig"}}}]}},{"name":"PoolMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_protocol_base_fee","type":"u64"},{"name":"total_protocol_quote_fee","type":"u64"},{"name":"total_trading_base_fee","type":"u64"},{"name":"total_trading_quote_fee","type":"u64"}]}},{"name":"SwapParameters","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]}},{"name":"SwapParameters2","type":{"kind":"struct","fields":[{"name":"amount_0","docs":["When it's exact in, partial fill, this will be amount_in. When it's exact out, this will be amount_out"],"type":"u64"},{"name":"amount_1","docs":["When it's exact in, partial fill, this will be minimum_amount_out. When it's exact out, this will be maximum_amount_in"],"type":"u64"},{"name":"swap_mode","docs":["Swap mode, refer [SwapMode]"],"type":"u8"}]}},{"name":"SwapResult","docs":["Encodes all results of swapping"],"type":{"kind":"struct","fields":[{"name":"actual_input_amount","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"next_sqrt_price","type":"u128"},{"name":"trading_fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"referral_fee","type":"u64"}]}},{"name":"SwapResult2","type":{"kind":"struct","fields":[{"name":"included_fee_input_amount","type":"u64"},{"name":"excluded_fee_input_amount","type":"u64"},{"name":"amount_left","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"next_sqrt_price","type":"u128"},{"name":"trading_fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"referral_fee","type":"u64"}]}},{"name":"TokenSupplyParams","type":{"kind":"struct","fields":[{"name":"pre_migration_token_supply","docs":["pre migration token supply"],"type":"u64"},{"name":"post_migration_token_supply","docs":["post migration token supply","because DBC allow user to swap over the migration quote threshold, so in extreme case user may swap more than allowed buffer on curve","that result the total supply in post migration may be increased a bit (between pre_migration_token_supply and post_migration_token_supply)"],"type":"u64"}]}},{"name":"VirtualPool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"volatility_tracker","docs":["volatility tracker"],"type":{"defined":{"name":"VolatilityTracker"}}},{"name":"config","docs":["config key"],"type":"pubkey"},{"name":"creator","docs":["creator"],"type":"pubkey"},{"name":"base_mint","docs":["base mint"],"type":"pubkey"},{"name":"base_vault","docs":["base vault"],"type":"pubkey"},{"name":"quote_vault","docs":["quote vault"],"type":"pubkey"},{"name":"base_reserve","docs":["base reserve"],"type":"u64"},{"name":"quote_reserve","docs":["quote reserve"],"type":"u64"},{"name":"protocol_base_fee","docs":["protocol base fee"],"type":"u64"},{"name":"protocol_quote_fee","docs":["protocol quote fee"],"type":"u64"},{"name":"partner_base_fee","docs":["partner base fee"],"type":"u64"},{"name":"partner_quote_fee","docs":["trading quote fee"],"type":"u64"},{"name":"sqrt_price","docs":["current price"],"type":"u128"},{"name":"activation_point","docs":["Activation point"],"type":"u64"},{"name":"pool_type","docs":["pool type, spl token or token2022"],"type":"u8"},{"name":"is_migrated","docs":["is migrated"],"type":"u8"},{"name":"is_partner_withdraw_surplus","docs":["is partner withdraw surplus"],"type":"u8"},{"name":"is_protocol_withdraw_surplus","docs":["is protocol withdraw surplus"],"type":"u8"},{"name":"migration_progress","docs":["migration progress"],"type":"u8"},{"name":"is_withdraw_leftover","docs":["is withdraw leftover"],"type":"u8"},{"name":"is_creator_withdraw_surplus","docs":["is creator withdraw surplus"],"type":"u8"},{"name":"migration_fee_withdraw_status","docs":["migration fee withdraw status","bit 1 (0b010) creator","bit 2 (0b100) partner"],"type":"u8"},{"name":"metrics","docs":["pool metrics"],"type":{"defined":{"name":"PoolMetrics"}}},{"name":"finish_curve_timestamp","docs":["The time curve is finished"],"type":"u64"},{"name":"creator_base_fee","docs":["creator base fee"],"type":"u64"},{"name":"creator_quote_fee","docs":["creator quote fee"],"type":"u64"},{"name":"legacy_creation_fee_bits","docs":["legacy creation fee bits, we dont use this now"],"type":"u8"},{"name":"creation_fee_bits","docs":["pool creation fee claim status"],"type":"u8"},{"name":"has_swap","docs":["Cached flag"],"type":"u8"},{"name":"_padding_0","docs":["Padding for further use"],"type":{"array":["u8",5]}},{"name":"protocol_liquidity_migration_fee_bps","type":"u16"},{"name":"_padding_1","type":{"array":["u8",6]}},{"name":"protocol_migration_base_fee_amount","type":"u64"},{"name":"protocol_migration_quote_fee_amount","type":"u64"},{"name":"_padding_2","docs":["Padding for further use"],"type":{"array":["u64",3]}}]}},{"name":"VirtualPoolMetadata","docs":["Metadata for a virtual pool."],"type":{"kind":"struct","fields":[{"name":"virtual_pool","docs":["virtual pool"],"type":"pubkey"},{"name":"padding","docs":["padding for future use"],"type":{"array":["u128",6]}},{"name":"name","docs":["Name of project."],"type":"string"},{"name":"website","docs":["Website of project."],"type":"string"},{"name":"logo","docs":["Logo of project"],"type":"string"}]}},{"name":"VolatilityTracker","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"last_update_timestamp","type":"u64"},{"name":"padding","type":{"array":["u8",8]}},{"name":"sqrt_price_reference","type":"u128"},{"name":"volatility_accumulator","type":"u128"},{"name":"volatility_reference","type":"u128"}]}}]} \ No newline at end of file diff --git a/idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json b/idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json new file mode 100644 index 0000000..31fdbda --- /dev/null +++ b/idls/meteora_dlmm.LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo.json @@ -0,0 +1 @@ +{"address":"LBUZKhRxPF3XUpBCjp4YzTKgLccjZhTSDM9YuVaPwxo","metadata":{"name":"lb_clmm","version":"0.12.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameter"}}}]},{"name":"add_liquidity2","discriminator":[228,162,78,28,70,219,116,115],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameter"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"add_liquidity_by_strategy","discriminator":[7,3,150,127,148,40,61,200],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByStrategy"}}}]},{"name":"add_liquidity_by_strategy2","discriminator":[3,221,149,218,111,141,118,213],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByStrategy"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"add_liquidity_by_strategy_one_side","discriminator":[41,5,238,175,100,225,6,205],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByStrategyOneSide"}}}]},{"name":"add_liquidity_by_weight","discriminator":[28,140,238,99,231,162,21,149],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByWeight"}}}]},{"name":"add_liquidity_by_weight2","discriminator":[209,59,63,91,111,200,153,228],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityParameterByWeight"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"add_liquidity_one_side","discriminator":[94,155,103,151,70,95,220,165],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"liquidity_parameter","type":{"defined":{"name":"LiquidityOneSideParameter"}}}]},{"name":"add_liquidity_one_side_precise","discriminator":[161,194,103,84,171,71,250,154],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"parameter","type":{"defined":{"name":"AddLiquiditySingleSidePreciseParameter"}}}]},{"name":"add_liquidity_one_side_precise2","discriminator":[33,51,163,201,117,98,125,231],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"sender","signer":true},{"name":"token_program"},{"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":"liquidity_parameter","type":{"defined":{"name":"AddLiquiditySingleSidePreciseParameter2"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"cancel_limit_order","discriminator":[132,156,132,31,67,40,232,97],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension","limit_order"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"limit_order","writable":true},{"name":"owner_token_x","docs":["When dont set it tokenAccount to prevent unnecessary create token account (rent fee) when user only withdraw token y"],"writable":true},{"name":"owner_token_y","writable":true},{"name":"owner","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"bins","type":{"vec":"i32"}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"claim_fee","discriminator":[169,32,79,137,136,232,70,137],"accounts":[{"name":"lb_pair","writable":true,"relations":["position","bin_array_lower","bin_array_upper"]},{"name":"position","writable":true},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"claim_fee2","discriminator":[112,191,101,171,28,144,127,187],"accounts":[{"name":"lb_pair","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"token_program_x"},{"name":"token_program_y"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"min_bin_id","type":"i32"},{"name":"max_bin_id","type":"i32"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"claim_reward","discriminator":[149,95,181,242,94,90,158,162],"accounts":[{"name":"lb_pair","writable":true,"relations":["position","bin_array_lower","bin_array_upper"]},{"name":"position","writable":true},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"user_token_account","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"reward_index","type":"u64"}]},{"name":"claim_reward2","discriminator":[190,3,127,119,178,87,157,183],"accounts":[{"name":"lb_pair","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"user_token_account","writable":true},{"name":"token_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"reward_index","type":"u64"},{"name":"min_bin_id","type":"i32"},{"name":"max_bin_id","type":"i32"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"close_bin_array","discriminator":[68,174,88,80,181,204,19,224],"accounts":[{"name":"lb_pair","relations":["bin_array"]},{"name":"bin_array","writable":true},{"name":"rent_receiver","writable":true,"signer":true},{"name":"signer","signer":true}],"args":[]},{"name":"close_claim_fee_operator_account","discriminator":[184,213,88,31,179,101,130,36],"accounts":[{"name":"claim_fee_operator","writable":true},{"name":"rent_receiver","writable":true},{"name":"signer","signer":true}],"args":[]},{"name":"close_limit_order_if_empty","discriminator":[57,124,36,155,126,249,93,171],"accounts":[{"name":"limit_order","writable":true},{"name":"owner","signer":true},{"name":"rent_receiver","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":"close_operator_account","discriminator":[171,9,213,74,120,23,3,29],"accounts":[{"name":"operator","writable":true},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"close_position","discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"rent_receiver","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":"close_position2","discriminator":[174,90,35,115,186,40,147,226],"accounts":[{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"rent_receiver","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":"close_position_if_empty","discriminator":[59,124,212,118,91,152,110,157],"accounts":[{"name":"position","writable":true},{"name":"sender","signer":true},{"name":"rent_receiver","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":"close_preset_parameter","discriminator":[4,148,145,100,134,26,181,61],"accounts":[{"name":"preset_parameter","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"close_preset_parameter2","discriminator":[39,25,95,107,116,17,115,28],"accounts":[{"name":"preset_parameter","writable":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"rent_receiver","writable":true}],"args":[]},{"name":"close_token_badge","discriminator":[108,146,86,110,179,254,10,104],"accounts":[{"name":"token_badge","writable":true},{"name":"rent_receiver","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[]},{"name":"create_operator_account","discriminator":[221,64,246,149,240,153,229,163],"accounts":[{"name":"operator","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,111,114]},{"kind":"account","path":"whitelisted_signer"}]}},{"name":"whitelisted_signer"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"permission","type":"u128"}]},{"name":"decrease_position_length","discriminator":[194,219,136,32,25,96,105,37],"accounts":[{"name":"rent_receiver","writable":true},{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"length_to_remove","type":"u16"},{"name":"side","type":"u8"}]},{"name":"for_idl_type_generation_do_not_call","discriminator":[180,105,69,80,95,50,73,108],"accounts":[{"name":"dummy_zc_account"}],"args":[{"name":"_ix","type":{"defined":{"name":"DummyIx"}}}]},{"name":"fund_reward","discriminator":[188,50,249,165,93,151,38,63],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array"]},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"name":"bin_array","writable":true},{"name":"token_program"},{"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":"reward_index","type":"u64"},{"name":"amount","type":"u64"},{"name":"carry_forward","type":"bool"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"go_to_a_bin","discriminator":[146,72,174,224,40,253,84,174],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension","from_bin_array","to_bin_array"]},{"name":"bin_array_bitmap_extension","optional":true},{"name":"from_bin_array","optional":true},{"name":"to_bin_array","optional":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":"bin_id","type":"i32"}]},{"name":"increase_oracle_length","discriminator":[190,61,125,87,103,79,158,173],"accounts":[{"name":"oracle","writable":true},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"length_to_add","type":"u64"}]},{"name":"increase_position_length","discriminator":[80,83,117,211,66,13,33,149],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"lb_pair","relations":["position"]},{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"length_to_add","type":"u16"},{"name":"side","type":"u8"}]},{"name":"increase_position_length2","discriminator":[255,210,204,71,115,137,225,113],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"lb_pair","relations":["position"]},{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"minimum_upper_bin_id","type":"i32"}]},{"name":"initialize_bin_array","discriminator":[35,86,19,185,78,212,75,211],"accounts":[{"name":"lb_pair"},{"name":"bin_array","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,105,110,95,97,114,114,97,121]},{"kind":"account","path":"lb_pair"},{"kind":"arg","path":"index"}]}},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"i64"}]},{"name":"initialize_bin_array_bitmap_extension","discriminator":[47,157,226,180,12,240,33,71],"accounts":[{"name":"lb_pair"},{"name":"bin_array_bitmap_extension","docs":["Initialize an account to store if a bin array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"}],"args":[]},{"name":"initialize_customizable_permissionless_lb_pair","discriminator":[46,39,41,135,111,183,200,64],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"user_token_x"},{"name":"funder","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_y"},{"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":"params","type":{"defined":{"name":"CustomizableParams"}}}]},{"name":"initialize_customizable_permissionless_lb_pair2","discriminator":[243,73,129,126,51,19,241,107],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"user_token_x"},{"name":"funder","writable":true,"signer":true},{"name":"token_badge_x","optional":true},{"name":"token_badge_y","optional":true},{"name":"token_program_x"},{"name":"token_program_y"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"user_token_y"},{"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":"params","type":{"defined":{"name":"CustomizableParams"}}}]},{"name":"initialize_lb_pair","discriminator":[45,154,237,210,221,15,166,92],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"preset_parameter"},{"name":"funder","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"},{"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":"active_id","type":"i32"},{"name":"bin_step","type":"u16"}]},{"name":"initialize_lb_pair2","discriminator":[73,59,36,120,237,83,108,198],"accounts":[{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"preset_parameter"},{"name":"funder","writable":true,"signer":true},{"name":"token_badge_x","optional":true},{"name":"token_badge_y","optional":true},{"name":"token_program_x"},{"name":"token_program_y"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"InitializeLbPair2Params"}}}]},{"name":"initialize_permission_lb_pair","discriminator":[108,102,213,85,251,3,53,21],"accounts":[{"name":"base","signer":true},{"name":"lb_pair","writable":true},{"name":"bin_array_bitmap_extension","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[98,105,116,109,97,112]},{"kind":"account","path":"lb_pair"}]}},{"name":"token_mint_x"},{"name":"token_mint_y"},{"name":"reserve_x","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_x"}]}},{"name":"reserve_y","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"account","path":"token_mint_y"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"lb_pair"}]}},{"name":"payer","writable":true,"signer":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"token_badge_x","optional":true},{"name":"token_badge_y","optional":true},{"name":"token_program_x"},{"name":"token_program_y"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"ix_data","type":{"defined":{"name":"InitPermissionPairIx"}}}]},{"name":"initialize_position","discriminator":[219,192,234,71,190,191,102,80],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"position","writable":true,"signer":true},{"name":"lb_pair"},{"name":"owner","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"},{"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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"}]},{"name":"initialize_position2","discriminator":[143,19,242,145,213,15,104,115],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"position","writable":true,"signer":true},{"name":"lb_pair"},{"name":"owner","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"}]},{"name":"initialize_position_by_operator","discriminator":[251,189,190,244,117,254,35,148],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"base","signer":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"lb_pair"},{"kind":"account","path":"base"},{"kind":"arg","path":"lower_bin_id"},{"kind":"arg","path":"width"}]}},{"name":"lb_pair"},{"name":"owner"},{"name":"operator","docs":["operator"],"signer":true},{"name":"operator_token_x"},{"name":"owner_token_x"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"},{"name":"fee_owner","type":"pubkey"},{"name":"lock_release_point","type":"u64"}]},{"name":"initialize_position_pda","discriminator":[46,82,125,146,85,141,228,153],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"base","signer":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"lb_pair"},{"kind":"account","path":"base"},{"kind":"arg","path":"lower_bin_id"},{"kind":"arg","path":"width"}]}},{"name":"lb_pair"},{"name":"owner","docs":["owner"],"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent"},{"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":"lower_bin_id","type":"i32"},{"name":"width","type":"i32"}]},{"name":"initialize_preset_parameter","discriminator":[66,188,71,211,98,109,14,186],"accounts":[{"name":"preset_parameter","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,101,115,101,116,95,112,97,114,97,109,101,116,101,114,50]},{"kind":"arg","path":"ix.index"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"ix","type":{"defined":{"name":"InitPresetParametersIx"}}}]},{"name":"initialize_reward","discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"lb_pair","writable":true},{"name":"reward_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"lb_pair"},{"kind":"arg","path":"reward_index"}]}},{"name":"reward_mint"},{"name":"token_badge","optional":true},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"reward_index","type":"u64"},{"name":"reward_duration","type":"u64"},{"name":"funder","type":"pubkey"}]},{"name":"initialize_token_badge","discriminator":[253,77,205,95,27,224,89,223],"accounts":[{"name":"token_mint"},{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"token_mint"}]}},{"name":"operator"},{"name":"signer","signer":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"place_limit_order","discriminator":[108,176,33,186,146,229,1,197],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"limit_order","writable":true,"signer":true},{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"user_token","writable":true},{"name":"sender","signer":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"PlaceLimitOrderParams"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"rebalance_liquidity","discriminator":[92,4,176,193,119,185,83,9],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"owner","signer":true,"relations":["position"]},{"name":"rent_payer","writable":true,"signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"params","type":{"defined":{"name":"RebalanceLiquidityParams"}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"remove_all_liquidity","discriminator":[10,51,61,35,112,105,24,85],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"remove_liquidity","discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"bin_liquidity_removal","type":{"vec":{"defined":{"name":"BinLiquidityReduction"}}}}]},{"name":"remove_liquidity2","discriminator":[230,215,82,127,241,101,227,146],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"bin_liquidity_removal","type":{"vec":{"defined":{"name":"BinLiquidityReduction"}}}},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"remove_liquidity_by_range","discriminator":[26,82,102,152,240,74,105,26],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension","bin_array_lower","bin_array_upper"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"sender","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"from_bin_id","type":"i32"},{"name":"to_bin_id","type":"i32"},{"name":"bps_to_remove","type":"u16"}]},{"name":"remove_liquidity_by_range2","discriminator":[204,2,195,145,53,145,145,205],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"user_token_x","writable":true},{"name":"user_token_y","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"sender","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"from_bin_id","type":"i32"},{"name":"to_bin_id","type":"i32"},{"name":"bps_to_remove","type":"u16"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"set_activation_point","discriminator":[91,249,15,165,26,129,254,125],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"activation_point","type":"u64"}]},{"name":"set_pair_status","discriminator":[67,248,231,137,154,149,217,174],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":true}],"args":[{"name":"status","type":"u8"}]},{"name":"set_pair_status_permissionless","discriminator":[78,59,152,211,70,183,46,208],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"status","type":"u8"}]},{"name":"set_permissionless_operation_bits","discriminator":[84,58,203,139,163,81,190,186],"accounts":[{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"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":"bits","type":"u8"}]},{"name":"set_pre_activation_duration","discriminator":[165,61,201,244,130,159,22,100],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"pre_activation_duration","type":"u64"}]},{"name":"set_pre_activation_swap_address","discriminator":[57,139,47,123,216,80,223,10],"accounts":[{"name":"lb_pair","writable":true},{"name":"signer","signer":true}],"args":[{"name":"pre_activation_swap_address","type":"pubkey"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"swap2","discriminator":[65,75,63,76,235,91,91,136],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"swap_exact_out","discriminator":[250,73,101,33,38,207,75,184],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"max_in_amount","type":"u64"},{"name":"out_amount","type":"u64"}]},{"name":"swap_exact_out2","discriminator":[43,215,247,132,137,60,243,81],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"max_in_amount","type":"u64"},{"name":"out_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"swap_with_price_impact","discriminator":[56,173,230,208,173,228,156,205],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_y_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"active_id","type":{"option":"i32"}},{"name":"max_price_impact_bps","type":"u16"}]},{"name":"swap_with_price_impact2","discriminator":[74,98,192,214,177,51,75,51],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array_bitmap_extension"]},{"name":"bin_array_bitmap_extension","writable":true,"optional":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"oracle","writable":true,"relations":["lb_pair"]},{"name":"host_fee_in","writable":true,"optional":true},{"name":"user","signer":true},{"name":"token_x_program"},{"name":"token_y_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"amount_in","type":"u64"},{"name":"active_id","type":{"option":"i32"}},{"name":"max_price_impact_bps","type":"u16"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"update_base_fee_parameters","discriminator":[75,168,223,161,16,195,3,47],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":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":"fee_parameter","type":{"defined":{"name":"BaseFeeParameter"}}}]},{"name":"update_dynamic_fee_parameters","discriminator":[92,161,46,246,255,189,22,22],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":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":"fee_parameter","type":{"defined":{"name":"DynamicFeeParameter"}}}]},{"name":"update_fees_and_reward2","discriminator":[32,142,184,154,103,65,184,88],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position"]},{"name":"owner","signer":true}],"args":[{"name":"min_bin_id","type":"i32"},{"name":"max_bin_id","type":"i32"}]},{"name":"update_fees_and_rewards","discriminator":[154,230,250,13,236,209,75,223],"accounts":[{"name":"position","writable":true},{"name":"lb_pair","writable":true,"relations":["position","bin_array_lower","bin_array_upper"]},{"name":"bin_array_lower","writable":true},{"name":"bin_array_upper","writable":true},{"name":"owner","signer":true}],"args":[]},{"name":"update_position_operator","discriminator":[202,184,103,143,180,191,116,217],"accounts":[{"name":"position","writable":true},{"name":"owner","signer":true,"relations":["position"]},{"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":"operator","type":"pubkey"}]},{"name":"update_reward_duration","discriminator":[138,174,196,169,213,235,254,107],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array"]},{"name":"operator"},{"name":"signer","signer":true},{"name":"bin_array","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":"reward_index","type":"u64"},{"name":"new_duration","type":"u64"}]},{"name":"update_reward_funder","discriminator":[211,28,48,32,215,160,35,23],"accounts":[{"name":"lb_pair","writable":true},{"name":"operator"},{"name":"signer","signer":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":"reward_index","type":"u64"},{"name":"new_funder","type":"pubkey"}]},{"name":"withdraw_ineligible_reward","discriminator":[148,206,42,195,247,49,103,8],"accounts":[{"name":"lb_pair","writable":true,"relations":["bin_array"]},{"name":"reward_vault","writable":true},{"name":"reward_mint"},{"name":"funder_token_account","writable":true},{"name":"funder","signer":true},{"name":"bin_array","writable":true},{"name":"token_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"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":"reward_index","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"withdraw_protocol_fee","discriminator":[158,201,158,189,33,93,162,103],"accounts":[{"name":"lb_pair","writable":true},{"name":"reserve_x","writable":true,"relations":["lb_pair"]},{"name":"reserve_y","writable":true,"relations":["lb_pair"]},{"name":"token_x_mint","relations":["lb_pair"]},{"name":"token_y_mint","relations":["lb_pair"]},{"name":"receiver_token_x","writable":true},{"name":"receiver_token_y","writable":true},{"name":"operator"},{"name":"signer","docs":["operator"],"signer":true},{"name":"token_x_program"},{"name":"token_y_program"}],"args":[{"name":"max_amount_x","type":"u64"},{"name":"max_amount_y","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]},{"name":"zap_protocol_fee","discriminator":[213,155,187,34,56,182,91,240],"accounts":[{"name":"lb_pair","writable":true},{"name":"reserve","writable":true},{"name":"token_mint"},{"name":"receiver_token","writable":true},{"name":"operator"},{"name":"signer","docs":["operator"],"signer":true},{"name":"token_program"},{"name":"sysvar_instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"max_amount","type":"u64"},{"name":"remaining_accounts_info","type":{"defined":{"name":"RemainingAccountsInfo"}}}]}],"accounts":[{"name":"BinArray","discriminator":[92,142,92,220,5,148,70,181]},{"name":"BinArrayBitmapExtension","discriminator":[80,111,124,113,55,237,18,5]},{"name":"ClaimFeeOperator","discriminator":[166,48,134,86,34,200,188,150]},{"name":"DummyZcAccount","discriminator":[94,107,238,80,208,48,180,8]},{"name":"LbPair","discriminator":[33,11,49,98,181,101,177,13]},{"name":"LimitOrder","discriminator":[137,183,212,91,115,29,141,227]},{"name":"Operator","discriminator":[219,31,188,145,69,139,204,117]},{"name":"Oracle","discriminator":[139,194,131,179,140,179,229,244]},{"name":"PositionV2","discriminator":[117,176,212,199,245,180,133,182]},{"name":"PresetParameter","discriminator":[242,62,244,34,181,112,58,170]},{"name":"PresetParameter2","discriminator":[171,236,148,115,162,113,222,174]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]}],"events":[{"name":"AddLiquidity","discriminator":[31,94,125,90,227,52,61,186]},{"name":"CancelLimitOrderEvt","discriminator":[131,234,194,133,9,14,189,209]},{"name":"ClaimFee","discriminator":[75,122,154,48,140,74,123,163]},{"name":"ClaimFee2","discriminator":[232,171,242,97,58,77,35,45]},{"name":"ClaimReward","discriminator":[148,116,134,204,22,171,85,95]},{"name":"ClaimReward2","discriminator":[27,143,244,33,80,43,110,146]},{"name":"CloseLimitOrderEvt","discriminator":[142,135,8,76,92,63,118,83]},{"name":"CompositionFee","discriminator":[128,151,123,106,17,102,113,142]},{"name":"DecreasePositionLength","discriminator":[52,118,235,85,172,169,15,128]},{"name":"DynamicFeeParameterUpdate","discriminator":[88,88,178,135,194,146,91,243]},{"name":"FeeParameterUpdate","discriminator":[48,76,241,117,144,215,242,44]},{"name":"FundReward","discriminator":[246,228,58,130,145,170,79,204]},{"name":"GoToABin","discriminator":[59,138,76,68,138,131,176,67]},{"name":"IncreaseObservation","discriminator":[99,249,17,121,166,156,207,215]},{"name":"IncreasePositionLength","discriminator":[157,239,42,204,30,56,223,46]},{"name":"InitializeReward","discriminator":[211,153,88,62,149,60,177,70]},{"name":"LbPairCreate","discriminator":[185,74,252,125,27,215,188,111]},{"name":"PlaceLimitOrderEvt","discriminator":[43,79,27,169,244,28,225,63]},{"name":"PositionClose","discriminator":[255,196,16,107,28,202,53,128]},{"name":"PositionCreate","discriminator":[144,142,252,84,157,53,37,121]},{"name":"Rebalancing","discriminator":[0,109,117,179,61,91,199,200]},{"name":"RemoveLiquidity","discriminator":[116,244,97,232,103,31,152,58]},{"name":"SetPositionPermissionlessOperationBitsEvt","discriminator":[195,229,147,245,29,125,48,168]},{"name":"Swap","discriminator":[81,108,227,190,205,208,10,196]},{"name":"Swap2Evt","discriminator":[46,116,82,215,148,27,84,77]},{"name":"UpdatePositionLockReleasePoint","discriminator":[133,214,66,224,64,12,7,191]},{"name":"UpdatePositionOperator","discriminator":[39,115,48,204,246,47,66,57]},{"name":"UpdateRewardDuration","discriminator":[223,245,224,153,49,29,163,172]},{"name":"UpdateRewardFunder","discriminator":[224,178,174,74,252,165,85,180]},{"name":"WithdrawIneligibleReward","discriminator":[231,189,65,149,102,215,154,244]}],"errors":[{"code":6000,"name":"InvalidStartBinIndex","msg":"Invalid start bin index"},{"code":6001,"name":"InvalidBinId","msg":"Invalid bin id"},{"code":6002,"name":"InvalidInput","msg":"Invalid input data"},{"code":6003,"name":"ExceededAmountSlippageTolerance","msg":"Exceeded amount slippage tolerance"},{"code":6004,"name":"ExceededBinSlippageTolerance","msg":"Exceeded bin slippage tolerance"},{"code":6005,"name":"CompositionFactorFlawed","msg":"Composition factor flawed"},{"code":6006,"name":"NonPresetBinStep","msg":"Non preset bin step"},{"code":6007,"name":"ZeroLiquidity","msg":"Zero liquidity"},{"code":6008,"name":"InvalidPosition","msg":"Invalid position"},{"code":6009,"name":"BinArrayNotFound","msg":"Bin array not found"},{"code":6010,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6011,"name":"InvalidAccountForSingleDeposit","msg":"Invalid account for single deposit"},{"code":6012,"name":"PairInsufficientLiquidity","msg":"Pair insufficient liquidity"},{"code":6013,"name":"InvalidFeeOwner","msg":"Invalid fee owner"},{"code":6014,"name":"InvalidFeeWithdrawAmount","msg":"Invalid fee withdraw amount"},{"code":6015,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6016,"name":"IdenticalFeeOwner","msg":"Identical fee owner"},{"code":6017,"name":"InvalidBps","msg":"Invalid basis point"},{"code":6018,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6019,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6020,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6021,"name":"InvalidRewardDuration","msg":"Invalid reward duration"},{"code":6022,"name":"RewardInitialized","msg":"Reward already initialized"},{"code":6023,"name":"RewardUninitialized","msg":"Reward not initialized"},{"code":6024,"name":"IdenticalFunder","msg":"Identical funder"},{"code":6025,"name":"RewardCampaignInProgress","msg":"Reward campaign in progress"},{"code":6026,"name":"IdenticalRewardDuration","msg":"Reward duration is the same"},{"code":6027,"name":"InvalidBinArray","msg":"Invalid bin array"},{"code":6028,"name":"NonContinuousBinArrays","msg":"Bin arrays must be continuous"},{"code":6029,"name":"InvalidRewardVault","msg":"Invalid reward vault"},{"code":6030,"name":"NonEmptyPosition","msg":"Position is not empty"},{"code":6031,"name":"UnauthorizedAccess","msg":"Unauthorized access"},{"code":6032,"name":"InvalidFeeParameter","msg":"Invalid fee parameter"},{"code":6033,"name":"MissingOracle","msg":"Missing oracle account"},{"code":6034,"name":"InsufficientSample","msg":"Insufficient observation sample"},{"code":6035,"name":"InvalidLookupTimestamp","msg":"Invalid lookup timestamp"},{"code":6036,"name":"BitmapExtensionAccountIsNotProvided","msg":"Bitmap extension account is not provided"},{"code":6037,"name":"CannotFindNonZeroLiquidityBinArrayId","msg":"Cannot find non-zero liquidity binArrayId"},{"code":6038,"name":"BinIdOutOfBound","msg":"Bin id out of bound"},{"code":6039,"name":"InsufficientOutAmount","msg":"Insufficient amount in for minimum out"},{"code":6040,"name":"InvalidPositionWidth","msg":"Invalid position width"},{"code":6041,"name":"ExcessiveFeeUpdate","msg":"Excessive fee update"},{"code":6042,"name":"PoolDisabled","msg":"Pool disabled"},{"code":6043,"name":"InvalidPoolType","msg":"Invalid pool type"},{"code":6044,"name":"ExceedMaxWhitelist","msg":"Whitelist for wallet is full"},{"code":6045,"name":"InvalidIndex","msg":"Invalid index"},{"code":6046,"name":"RewardNotEnded","msg":"Reward not ended"},{"code":6047,"name":"MustWithdrawnIneligibleReward","msg":"Must withdraw ineligible reward"},{"code":6048,"name":"UnauthorizedAddress","msg":"Unauthorized address"},{"code":6049,"name":"OperatorsAreTheSame","msg":"Cannot update because operators are the same"},{"code":6050,"name":"WithdrawToWrongTokenAccount","msg":"Withdraw to wrong token account"},{"code":6051,"name":"WrongRentReceiver","msg":"Wrong rent receiver"},{"code":6052,"name":"AlreadyPassActivationPoint","msg":"Already activated"},{"code":6053,"name":"ExceedMaxSwappedAmount","msg":"Swapped amount is exceeded max swapped amount"},{"code":6054,"name":"InvalidStrategyParameters","msg":"Invalid strategy parameters"},{"code":6055,"name":"LiquidityLocked","msg":"Liquidity locked"},{"code":6056,"name":"BinRangeIsNotEmpty","msg":"Bin range is not empty"},{"code":6057,"name":"NotExactAmountOut","msg":"Amount out is not matched with exact amount out"},{"code":6058,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6059,"name":"InvalidActivationDuration","msg":"Invalid activation duration"},{"code":6060,"name":"MissingTokenAmountAsTokenLaunchProof","msg":"Missing token amount as token launch owner proof"},{"code":6061,"name":"InvalidQuoteToken","msg":"Quote token must be SOL or USDC"},{"code":6062,"name":"InvalidBinStep","msg":"Invalid bin step"},{"code":6063,"name":"InvalidBaseFee","msg":"Invalid base fee"},{"code":6064,"name":"InvalidPreActivationDuration","msg":"Invalid pre-activation duration"},{"code":6065,"name":"AlreadyPassPreActivationSwapPoint","msg":"Already pass pre-activation swap point"},{"code":6066,"name":"InvalidStatus","msg":"Invalid status"},{"code":6067,"name":"ExceededMaxOracleLength","msg":"Exceed max oracle length"},{"code":6068,"name":"InvalidMinimumLiquidity","msg":"Invalid minimum liquidity"},{"code":6069,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6070,"name":"UnsupportedMintExtension","msg":"Unsupported mint extension"},{"code":6071,"name":"UnsupportNativeMintToken2022","msg":"Unsupported native mint token2022"},{"code":6072,"name":"UnmatchTokenMint","msg":"Unmatch token mint"},{"code":6073,"name":"UnsupportedTokenMint","msg":"Unsupported token mint"},{"code":6074,"name":"InsufficientRemainingAccounts","msg":"Insufficient remaining accounts"},{"code":6075,"name":"InvalidRemainingAccountSlice","msg":"Invalid remaining account slice"},{"code":6076,"name":"DuplicatedRemainingAccountTypes","msg":"Duplicated remaining account types"},{"code":6077,"name":"MissingRemainingAccountForTransferHook","msg":"Missing remaining account for transfer hook"},{"code":6078,"name":"NoTransferHookProgram","msg":"Remaining account was passed for transfer hook but there's no hook program"},{"code":6079,"name":"ZeroFundedAmount","msg":"Zero funded amount"},{"code":6080,"name":"InvalidSide","msg":"Invalid side"},{"code":6081,"name":"InvalidResizeLength","msg":"Invalid resize length"},{"code":6082,"name":"NotSupportAtTheMoment","msg":"Not support at the moment"},{"code":6083,"name":"InvalidRebalanceParameters","msg":"Invalid rebalance parameters"},{"code":6084,"name":"InvalidRewardAccounts","msg":"Invalid reward accounts"},{"code":6085,"name":"UndeterminedError","msg":"Undetermined error"},{"code":6086,"name":"ReallocExceedMaxLengthPerInstruction","msg":"Realloc exceed max length per instruction"},{"code":6087,"name":"InvalidBaseFeeMantissa","msg":"Mantissa cannot more than two significant digits"},{"code":6088,"name":"InvalidPositionOwner","msg":"Invalid position owner"},{"code":6089,"name":"InvalidPoolAddress","msg":"Invalid pool address"},{"code":6090,"name":"InvalidTokenBadgeType","msg":"Invalid token badge type"},{"code":6091,"name":"InvalidTransferHookAuthority","msg":"Invalid transfer hook authority"},{"code":6092,"name":"AmountXIsNegative","msg":"Amount x is negative"},{"code":6093,"name":"AmountYIsNegative","msg":"Amount y is negative"},{"code":6094,"name":"InvalidPoolCreator","msg":"Invalid pool creator"},{"code":6095,"name":"InvalidFunctionType","msg":"Invalid function type"},{"code":6096,"name":"InvalidPermission","msg":"Invalid permission"},{"code":6097,"name":"IncorrectATA","msg":"Incorrect ATA"},{"code":6098,"name":"InvalidWithdrawProtocolFeeZapAccounts","msg":"Invalid withdraw protocol fee zap accounts"},{"code":6099,"name":"MintRestrictedFromZap","msg":"SOL,USDC protocol fee cannot be withdrawn via zap"},{"code":6100,"name":"CpiDisabled","msg":"CPI disabled"},{"code":6101,"name":"MissingZapOutInstruction","msg":"Missing zap out instruction"},{"code":6102,"name":"InvalidZapAccounts","msg":"Invalid zap accounts"},{"code":6103,"name":"InvalidZapOutParameters","msg":"Invalid zap out parameters"},{"code":6104,"name":"InsufficientInAmount","msg":"Insufficient in amount"},{"code":6105,"name":"InvalidPlaceLimitOrderParameters","msg":"Invalid place limit order parameters"},{"code":6106,"name":"InvalidLimitOrderOwner","msg":"Invalid limit order owner"},{"code":6107,"name":"InvalidCancelLimitOrderParameters","msg":"Invalid cancel limit order parameters"},{"code":6108,"name":"CannotFindLimitOrderByBinId","msg":"Cannot find limit order by bin id"},{"code":6109,"name":"CancelNonEmptyLimitOrder","msg":"Cannot cancel non-empty limit order"},{"code":6110,"name":"InvalidCollectFeeMode","msg":"Invalid collect fee mode"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookX"},{"name":"TransferHookY"},{"name":"TransferHookReward"},{"name":"TransferHookMultiReward","fields":["u8"]},{"name":"TransferHookReferral"}]}},{"name":"ActivationType","docs":["Type of the activation"],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Slot"},{"name":"Timestamp"}]}},{"name":"AddLiquidity","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"amounts","type":{"array":["u64",2]}},{"name":"active_bin_id","type":"i32"}]}},{"name":"AddLiquidityParams","type":{"kind":"struct","fields":[{"name":"min_delta_id","type":"i32"},{"name":"max_delta_id","type":"i32"},{"name":"x0","type":"u64"},{"name":"y0","type":"u64"},{"name":"delta_x","type":"u64"},{"name":"delta_y","type":"u64"},{"name":"bit_flag","type":"u8"},{"name":"favor_x_in_active_id","type":"bool"},{"name":"padding","type":{"array":["u8",16]}}]}},{"name":"AddLiquiditySingleSidePreciseParameter","type":{"kind":"struct","fields":[{"name":"bins","type":{"vec":{"defined":{"name":"CompressedBinDepositAmount"}}}},{"name":"decompress_multiplier","type":"u64"}]}},{"name":"AddLiquiditySingleSidePreciseParameter2","type":{"kind":"struct","fields":[{"name":"bins","type":{"vec":{"defined":{"name":"CompressedBinDepositAmount"}}}},{"name":"decompress_multiplier","type":"u64"},{"name":"max_amount","type":"u64"}]}},{"name":"BaseFeeParameter","type":{"kind":"struct","fields":[{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"base_factor","docs":["Base factor for base fee rate"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"}]}},{"name":"Bin","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of token X in the bin for market making. This already excluded protocol fees."],"type":"u64"},{"name":"amount_y","docs":["Amount of token Y in the bin for market making. This already excluded protocol fees."],"type":"u64"},{"name":"price","docs":["Bin price"],"type":"u128"},{"name":"liquidity_supply","docs":["Bin MM liquidity supply."],"type":"u128"},{"name":"fulfilled_order_amount_x","docs":["Total fulfilled order amount x"],"type":"u64"},{"name":"fulfilled_order_amount_y","docs":["Total fulfilled order amount y"],"type":"u64"},{"name":"limit_order_fee_ask_side","docs":["Limit order fee collected by ask side orders"],"type":"u64"},{"name":"limit_order_fee_bid_side","docs":["Limit order fee collected by bid side orders"],"type":"u64"},{"name":"fee_amount_x_per_token_stored","docs":["Swap fee amount of token X per liquidity deposited."],"type":"u128"},{"name":"fee_amount_y_per_token_stored","docs":["Swap fee amount of token Y per liquidity deposited."],"type":"u128"},{"name":"open_order_amount","docs":["Pending open limit orders amount in the bin."],"type":"u64"},{"name":"total_processing_order_amount","docs":["Total processing order amount"],"type":"u64"},{"name":"processed_order_remaining_amount","docs":["Remaining in processing open limit orders amount in the bin."],"type":"u64"},{"name":"order_age","docs":["Age"],"type":"u32"},{"name":"limit_order_ask_side","docs":["limit order flag"],"type":"u8"},{"name":"_padding_1","docs":["padding"],"type":{"array":["u8",3]}}]}},{"name":"BinArray","docs":["An account to contain a range of bin. For example: Bin 100 <-> 200.","For example:","BinArray index: 0 contains bin 0 <-> 599","index: 2 contains bin 600 <-> 1199, ..."],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"index","type":"i64"},{"name":"version","type":"u8"},{"name":"_padding_1","type":{"array":["u8",7]}},{"name":"lb_pair","type":"pubkey"},{"name":"bins","type":{"array":[{"defined":{"name":"Bin"}},70]}}]}},{"name":"BinArrayBitmapExtension","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"positive_bin_array_bitmap","docs":["Packed initialized bin array state for start_bin_index is positive"],"type":{"array":[{"array":["u64",8]},12]}},{"name":"negative_bin_array_bitmap","docs":["Packed initialized bin array state for start_bin_index is negative"],"type":{"array":[{"array":["u64",8]},12]}}]}},{"name":"BinLimitOrderAmount","type":{"kind":"struct","fields":[{"name":"id","type":"i32"},{"name":"amount","type":"u64"}]}},{"name":"BinLiquidityDistribution","type":{"kind":"struct","fields":[{"name":"bin_id","docs":["Define the bin ID wish to deposit to."],"type":"i32"},{"name":"distribution_x","docs":["DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin."],"type":"u16"},{"name":"distribution_y","docs":["DistributionX (or distributionY) is the percentages of amountX (or amountY) you want to add to each bin."],"type":"u16"}]}},{"name":"BinLiquidityDistributionByWeight","type":{"kind":"struct","fields":[{"name":"bin_id","docs":["Define the bin ID wish to deposit to."],"type":"i32"},{"name":"weight","docs":["weight of liquidity distributed for this bin id"],"type":"u16"}]}},{"name":"BinLiquidityReduction","type":{"kind":"struct","fields":[{"name":"bin_id","type":"i32"},{"name":"bps_to_remove","type":"u16"}]}},{"name":"CancelLimitOrderEvt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"limit_order","type":"pubkey"},{"name":"amounts","type":{"array":["u64",2]}},{"name":"active_id","type":"i32"},{"name":"bins","type":{"vec":"i32"}}]}},{"name":"ClaimFee","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"fee_x","type":"u64"},{"name":"fee_y","type":"u64"}]}},{"name":"ClaimFee2","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"fee_x","type":"u64"},{"name":"fee_y","type":"u64"},{"name":"active_bin_id","type":"i32"}]}},{"name":"ClaimFeeOperator","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"operator","docs":["operator"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"ClaimReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"total_reward","type":"u64"}]}},{"name":"ClaimReward2","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"total_reward","type":"u64"},{"name":"active_bin_id","type":"i32"}]}},{"name":"CloseLimitOrderEvt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"limit_order","type":"pubkey"}]}},{"name":"CompositionFee","type":{"kind":"struct","fields":[{"name":"from","type":"pubkey"},{"name":"bin_id","type":"i16"},{"name":"token_x_fee_amount","type":"u64"},{"name":"token_y_fee_amount","type":"u64"},{"name":"protocol_token_x_fee_amount","type":"u64"},{"name":"protocol_token_y_fee_amount","type":"u64"}]}},{"name":"CompressedBinDepositAmount","type":{"kind":"struct","fields":[{"name":"bin_id","type":"i32"},{"name":"amount","type":"u32"}]}},{"name":"CustomizableParams","type":{"kind":"struct","fields":[{"name":"active_id","docs":["Pool price"],"type":"i32"},{"name":"bin_step","docs":["Bin step"],"type":"u16"},{"name":"base_factor","docs":["Base factor"],"type":"u16"},{"name":"activation_type","docs":["Activation type. 0 = Slot, 1 = Time. Check ActivationType enum"],"type":"u8"},{"name":"has_alpha_vault","docs":["Whether the pool has an alpha vault"],"type":"bool"},{"name":"activation_point","docs":["Decide when does the pool start trade. None = Now"],"type":{"option":"u64"}},{"name":"creator_pool_on_off_control","docs":["Pool creator have permission to enable/disable pool with restricted program validation. Only applicable for customizable permissionless pool."],"type":"bool"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"concrete_function_type","docs":["Concrete function type"],"type":"u8"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"padding","docs":["Padding, for future use"],"type":{"array":["u8",60]}}]}},{"name":"DecreasePositionLength","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"length_to_remove","type":"u16"},{"name":"side","type":"u8"}]}},{"name":"DummyIx","type":{"kind":"struct","fields":[{"name":"_pair_status","type":{"defined":{"name":"PairStatus"}}},{"name":"_pair_type","type":{"defined":{"name":"PairType"}}},{"name":"_activation_type","type":{"defined":{"name":"ActivationType"}}},{"name":"_token_program_flag","type":{"defined":{"name":"TokenProgramFlags"}}},{"name":"_resize_side","type":{"defined":{"name":"ResizeSide"}}},{"name":"_rounding","type":{"defined":{"name":"Rounding"}}}]}},{"name":"DummyZcAccount","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"position_bin_data","type":{"defined":{"name":"PositionBinData"}}}]}},{"name":"DynamicFeeParameter","type":{"kind":"struct","fields":[{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"}]}},{"name":"DynamicFeeParameterUpdate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"}]}},{"name":"FeeInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"fee_x_per_token_complete","type":"u128"},{"name":"fee_y_per_token_complete","type":"u128"},{"name":"fee_x_pending","type":"u64"},{"name":"fee_y_pending","type":"u64"}]}},{"name":"FeeParameterUpdate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"protocol_share","type":"u16"},{"name":"base_factor","type":"u16"},{"name":"base_fee_power_factor","type":"u8"}]}},{"name":"FundReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"amount","type":"u64"}]}},{"name":"GoToABin","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from_bin_id","type":"i32"},{"name":"to_bin_id","type":"i32"}]}},{"name":"IncreaseObservation","type":{"kind":"struct","fields":[{"name":"oracle","type":"pubkey"},{"name":"new_observation_length","type":"u64"}]}},{"name":"IncreasePositionLength","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"length_to_add","type":"u16"},{"name":"side","type":"u8"}]}},{"name":"InitPermissionPairIx","type":{"kind":"struct","fields":[{"name":"active_id","type":"i32"},{"name":"bin_step","type":"u16"},{"name":"base_factor","type":"u16"},{"name":"base_fee_power_factor","type":"u8"},{"name":"activation_type","type":"u8"},{"name":"padding0","type":"u16"},{"name":"concrete_function_type","type":"u8"},{"name":"collect_fee_mode","type":"u8"}]}},{"name":"InitPresetParametersIx","type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"concrete_function_type","docs":["function type"],"type":"u8"},{"name":"collect_fee_mode","docs":["collect fee mode"],"type":"u8"}]}},{"name":"InitializeLbPair2Params","type":{"kind":"struct","fields":[{"name":"active_id","docs":["Pool price"],"type":"i32"},{"name":"padding","docs":["Padding, for future use"],"type":{"array":["u8",96]}}]}},{"name":"InitializeReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"funder","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"reward_duration","type":"u64"}]}},{"name":"LbPair","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"parameters","type":{"defined":{"name":"StaticParameters"}}},{"name":"v_parameters","type":{"defined":{"name":"VariableParameters"}}},{"name":"bump_seed","type":{"array":["u8",1]}},{"name":"bin_step_seed","docs":["Bin step signer seed"],"type":{"array":["u8",2]}},{"name":"pair_type","docs":["Type of the pair"],"type":"u8"},{"name":"active_id","docs":["Active bin id"],"type":"i32"},{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"status","docs":["Status of the pair. Check PairStatus enum."],"type":"u8"},{"name":"require_base_factor_seed","docs":["Require base factor seed"],"type":"u8"},{"name":"base_factor_seed","docs":["Base factor seed"],"type":{"array":["u8",2]}},{"name":"activation_type","docs":["Activation type"],"type":"u8"},{"name":"creator_pool_on_off_control","docs":["Allow pool creator to enable/disable pool with restricted validation. Only applicable for customizable permissionless pair type."],"type":"u8"},{"name":"token_x_mint","docs":["Token X mint"],"type":"pubkey"},{"name":"token_y_mint","docs":["Token Y mint"],"type":"pubkey"},{"name":"reserve_x","docs":["LB token X vault"],"type":"pubkey"},{"name":"reserve_y","docs":["LB token Y vault"],"type":"pubkey"},{"name":"protocol_fee","docs":["Uncollected protocol fee"],"type":{"defined":{"name":"ProtocolFee"}}},{"name":"_padding_1","docs":["padding 1"],"type":{"array":["u8",32]}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"RewardInfo"}},2]}},{"name":"oracle","docs":["Oracle pubkey"],"type":"pubkey"},{"name":"bin_array_bitmap","docs":["Packed initialized bin array state"],"type":{"array":["u64",16]}},{"name":"last_updated_at","docs":["Last time the pool fee parameter was updated"],"type":"i64"},{"name":"_padding_2","docs":["_padding_2"],"type":{"array":["u8",32]}},{"name":"pre_activation_swap_address","docs":["Address allowed to swap when the current point is greater than or equal to the pre-activation point. The pre-activation point is calculated as `activation_point - pre_activation_duration`."],"type":"pubkey"},{"name":"base_key","docs":["Base keypair. Only required for permission pair"],"type":"pubkey"},{"name":"activation_point","docs":["Time point to enable the pair. Only applicable for permission pair."],"type":"u64"},{"name":"pre_activation_duration","docs":["Duration before activation activation_point. Used to calculate pre-activation time point for pre_activation_swap_address"],"type":"u64"},{"name":"_padding_3","docs":["_padding 3"],"type":{"array":["u8",8]}},{"name":"_padding_4","docs":["_padding_4"],"type":"u64"},{"name":"creator","docs":["Pool creator"],"type":"pubkey"},{"name":"token_mint_x_program_flag","docs":["token_mint_x_program_flag"],"type":"u8"},{"name":"token_mint_y_program_flag","docs":["token_mint_y_program_flag"],"type":"u8"},{"name":"version","docs":["version to know whether we have reset tombstone fields"],"type":"u8"},{"name":"_reserved","docs":["Reserved space for future use"],"type":{"array":["u8",21]}}]}},{"name":"LbPairCreate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"bin_step","type":"u16"},{"name":"token_x","type":"pubkey"},{"name":"token_y","type":"pubkey"}]}},{"name":"LimitOrder","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lb_pair","docs":["The LB pair of this LO"],"type":"pubkey"},{"name":"owner","docs":["Owner of the LO. Client rely on this to to fetch their LOs."],"type":"pubkey"},{"name":"bin_count","docs":["Bin count"],"type":"u16"},{"name":"_padding_0","docs":["Padding"],"type":{"array":["u8",14]}},{"name":"padding_1","docs":["Reserved space for future use"],"type":{"array":["u64",4]}}]}},{"name":"LiquidityOneSideParameter","type":{"kind":"struct","fields":[{"name":"amount","docs":["Amount of X token or Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"bin_liquidity_dist","docs":["Liquidity distribution to each bins"],"type":{"vec":{"defined":{"name":"BinLiquidityDistributionByWeight"}}}}]}},{"name":"LiquidityParameter","type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of X token to deposit"],"type":"u64"},{"name":"amount_y","docs":["Amount of Y token to deposit"],"type":"u64"},{"name":"bin_liquidity_dist","docs":["Liquidity distribution to each bins"],"type":{"vec":{"defined":{"name":"BinLiquidityDistribution"}}}}]}},{"name":"LiquidityParameterByStrategy","type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of X token to deposit"],"type":"u64"},{"name":"amount_y","docs":["Amount of Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"strategy_parameters","docs":["strategy parameters"],"type":{"defined":{"name":"StrategyParameters"}}}]}},{"name":"LiquidityParameterByStrategyOneSide","type":{"kind":"struct","fields":[{"name":"amount","docs":["Amount of X token or Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"strategy_parameters","docs":["strategy parameters"],"type":{"defined":{"name":"StrategyParameters"}}}]}},{"name":"LiquidityParameterByWeight","type":{"kind":"struct","fields":[{"name":"amount_x","docs":["Amount of X token to deposit"],"type":"u64"},{"name":"amount_y","docs":["Amount of Y token to deposit"],"type":"u64"},{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"},{"name":"bin_liquidity_dist","docs":["Liquidity distribution to each bins"],"type":{"vec":{"defined":{"name":"BinLiquidityDistributionByWeight"}}}}]}},{"name":"Operator","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"signer","type":"pubkey"},{"name":"permission","type":"u128"},{"name":"padding","type":{"array":["u64",2]}}]}},{"name":"Oracle","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"idx","docs":["Index of latest observation"],"type":"u64"},{"name":"active_size","docs":["Size of active sample. Active sample is initialized observation."],"type":"u64"},{"name":"length","docs":["Number of observations"],"type":"u64"}]}},{"name":"PairStatus","docs":["Pair status. 0 = Enabled, 1 = Disabled. Putting 0 as enabled for backward compatibility."],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Enabled"},{"name":"Disabled"}]}},{"name":"PairType","docs":["Type of the Pair. 0 = Permissionless, 1 = Permission, 2 = CustomizablePermissionless. Putting 0 as permissionless for backward compatibility."],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Permissionless"},{"name":"Permission"},{"name":"CustomizablePermissionless"},{"name":"PermissionlessV2"}]}},{"name":"PlaceLimitOrderEvt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"sender","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"limit_order","type":"pubkey"},{"name":"active_id","type":"i32"},{"name":"params","type":{"defined":{"name":"PlaceLimitOrderParams"}}}]}},{"name":"PlaceLimitOrderParams","type":{"kind":"struct","fields":[{"name":"is_ask_side","type":"bool"},{"name":"padding","type":{"array":["u8",16]}},{"name":"relative_bin","type":{"option":{"defined":{"name":"RelativeBin"}}}},{"name":"bins","type":{"vec":{"defined":{"name":"BinLimitOrderAmount"}}}}]}},{"name":"PositionBinData","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"liquidity_share","type":"u128"},{"name":"reward_info","type":{"defined":{"name":"UserRewardInfo"}}},{"name":"fee_info","type":{"defined":{"name":"FeeInfo"}}}]}},{"name":"PositionClose","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"}]}},{"name":"PositionCreate","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"}]}},{"name":"PositionV2","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lb_pair","docs":["The LB pair of this position"],"type":"pubkey"},{"name":"owner","docs":["Owner of the position. Client rely on this to to fetch their positions."],"type":"pubkey"},{"name":"liquidity_shares","docs":["Liquidity shares of this position in bins (lower_bin_id <-> upper_bin_id). This is the same as LP concept."],"type":{"array":["u128",70]}},{"name":"reward_infos","docs":["Farming reward information"],"type":{"array":[{"defined":{"name":"UserRewardInfo"}},70]}},{"name":"fee_infos","docs":["Swap fee to claim information"],"type":{"array":[{"defined":{"name":"FeeInfo"}},70]}},{"name":"lower_bin_id","docs":["Lower bin ID"],"type":"i32"},{"name":"upper_bin_id","docs":["Upper bin ID"],"type":"i32"},{"name":"last_updated_at","docs":["Last updated timestamp"],"type":"i64"},{"name":"total_claimed_fee_x_amount","docs":["Total claimed token fee X"],"type":"u64"},{"name":"total_claimed_fee_y_amount","docs":["Total claimed token fee Y"],"type":"u64"},{"name":"total_claimed_rewards","docs":["Total claimed rewards"],"type":{"array":["u64",2]}},{"name":"operator","docs":["Operator of position"],"type":"pubkey"},{"name":"lock_release_point","docs":["Time point which the locked liquidity can be withdraw"],"type":"u64"},{"name":"_padding_0","docs":["_padding_0, previous subjected_to_bootstrap_liquidity_locking, BE CAREFUL FOR TOMBSTONE WHEN REUSE !!"],"type":"u8"},{"name":"fee_owner","docs":["Address is able to claim fee in this position, only valid for bootstrap_liquidity_position"],"type":"pubkey"},{"name":"version","docs":["version to know whether we have reset tombstone fields"],"type":"u8"},{"name":"permissionless_operation_bits","type":"u8"},{"name":"_reserved","docs":["Reserved space for future use"],"type":{"array":["u8",85]}}]}},{"name":"PresetParameter","type":{"kind":"struct","fields":[{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"min_bin_id","docs":["Min bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"max_bin_id","docs":["Max bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"}]}},{"name":"PresetParameter2","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"bin_step","docs":["Bin step. Represent the price increment / decrement."],"type":"u16"},{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"index","docs":["index"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"concrete_function_type","docs":["function type, to check whether the pool should have LM farming or other functions in the future, refer ConcreteFunctionType"],"type":"u8"},{"name":"collect_fee_mode","docs":["collect fee mode"],"type":"u8"},{"name":"padding_0","type":{"array":["u8",7]}},{"name":"padding_1","docs":["Padding 1 for future use"],"type":{"array":["u64",19]}}]}},{"name":"ProtocolFee","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_x","type":"u64"},{"name":"amount_y","type":"u64"}]}},{"name":"RebalanceLiquidityParams","type":{"kind":"struct","fields":[{"name":"active_id","docs":["active id"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"u16"},{"name":"should_claim_fee","docs":["a flag to indicate that whether fee should be harvested"],"type":"bool"},{"name":"should_claim_reward","docs":["a flag to indicate that whether rewards should be harvested"],"type":"bool"},{"name":"min_withdraw_x_amount","docs":["threshold for withdraw token x"],"type":"u64"},{"name":"max_deposit_x_amount","docs":["threshold for deposit token x"],"type":"u64"},{"name":"min_withdraw_y_amount","docs":["threshold for withdraw token y"],"type":"u64"},{"name":"max_deposit_y_amount","docs":["threshold for deposit token y"],"type":"u64"},{"name":"shrink_mode","docs":["shrink mode"],"type":"u8"},{"name":"padding","docs":["padding 32 bytes for future usage"],"type":{"array":["u8",31]}},{"name":"removes","docs":["removes"],"type":{"vec":{"defined":{"name":"RemoveLiquidityParams"}}}},{"name":"adds","docs":["adds"],"type":{"vec":{"defined":{"name":"AddLiquidityParams"}}}}]}},{"name":"Rebalancing","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"active_bin_id","type":"i32"},{"name":"x_withdrawn_amount","type":"u64"},{"name":"x_added_amount","type":"u64"},{"name":"y_withdrawn_amount","type":"u64"},{"name":"y_added_amount","type":"u64"},{"name":"x_fee_amount","type":"u64"},{"name":"y_fee_amount","type":"u64"},{"name":"old_min_id","type":"i32"},{"name":"old_max_id","type":"i32"},{"name":"new_min_id","type":"i32"},{"name":"new_max_id","type":"i32"},{"name":"rewards","type":{"array":["u64",2]}}]}},{"name":"RelativeBin","type":{"kind":"struct","fields":[{"name":"active_id","docs":["Active bin that integrator observe off-chain"],"type":"i32"},{"name":"max_active_bin_slippage","docs":["max active bin slippage allowed"],"type":"i32"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"RemoveLiquidity","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"amounts","type":{"array":["u64",2]}},{"name":"active_bin_id","type":"i32"}]}},{"name":"RemoveLiquidityParams","type":{"kind":"struct","fields":[{"name":"min_bin_id","type":{"option":"i32"}},{"name":"max_bin_id","type":{"option":"i32"}},{"name":"bps","type":"u16"},{"name":"padding","type":{"array":["u8",16]}}]}},{"name":"ResizeSide","docs":["Side of resize, 0 for lower and 1 for upper"],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Lower"},{"name":"Upper"}]}},{"name":"RewardInfo","docs":["Stores the state relevant for tracking liquidity mining rewards"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"funder","docs":["Authority account that allows to fund rewards"],"type":"pubkey"},{"name":"reward_duration","docs":["LM reward duration in seconds."],"type":"u64"},{"name":"reward_duration_end","docs":["LM reward duration end time."],"type":"u64"},{"name":"reward_rate","docs":["LM reward rate"],"type":"u128"},{"name":"last_update_time","docs":["The last time reward states were updated."],"type":"u64"},{"name":"cumulative_seconds_with_empty_liquidity_reward","docs":["Accumulated seconds where when farm distribute rewards, but the bin is empty. The reward will be accumulated for next reward time window."],"type":"u64"}]}},{"name":"Rounding","type":{"kind":"enum","variants":[{"name":"Up"},{"name":"Down"}]}},{"name":"SetPositionPermissionlessOperationBitsEvt","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"old_bits","type":"u8"},{"name":"new_bits","type":"u8"}]}},{"name":"StaticParameters","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_factor","docs":["Used for base fee calculation. base_fee_rate = base_factor * bin_step * 10 * 10^base_fee_power_factor"],"type":"u16"},{"name":"filter_period","docs":["Filter period determine high frequency trading time window."],"type":"u16"},{"name":"decay_period","docs":["Decay period determine when the volatile fee start decay / decrease."],"type":"u16"},{"name":"reduction_factor","docs":["Reduction factor controls the volatile fee rate decrement rate."],"type":"u16"},{"name":"variable_fee_control","docs":["Used to scale the variable fee component depending on the dynamic of the market"],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum number of bin crossed can be accumulated. Used to cap volatile fee rate."],"type":"u32"},{"name":"min_bin_id","docs":["Min bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"max_bin_id","docs":["Max bin id supported by the pool based on the configured bin step."],"type":"i32"},{"name":"protocol_share","docs":["Portion of swap fees retained by the protocol by controlling protocol_share parameter. protocol_swap_fee = protocol_share * total_swap_fee"],"type":"u16"},{"name":"base_fee_power_factor","docs":["Base fee power factor"],"type":"u8"},{"name":"function_type","docs":["function type"],"type":"u8"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"_padding","docs":["Padding for bytemuck safe alignment"],"type":{"array":["u8",3]}}]}},{"name":"StrategyParameters","type":{"kind":"struct","fields":[{"name":"min_bin_id","docs":["min bin id"],"type":"i32"},{"name":"max_bin_id","docs":["max bin id"],"type":"i32"},{"name":"strategy_type","docs":["strategy type"],"type":{"defined":{"name":"StrategyType"}}},{"name":"parameteres","docs":["parameters"],"type":{"array":["u8",64]}}]}},{"name":"StrategyType","type":{"kind":"enum","variants":[{"name":"SpotOneSide"},{"name":"CurveOneSide"},{"name":"BidAskOneSide"},{"name":"SpotBalanced"},{"name":"CurveBalanced"},{"name":"BidAskBalanced"},{"name":"SpotImBalanced"},{"name":"CurveImBalanced"},{"name":"BidAskImBalanced"}]}},{"name":"Swap","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"start_bin_id","type":"i32"},{"name":"end_bin_id","type":"i32"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"swap_for_y","type":"bool"},{"name":"fee","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"fee_bps","type":"u128"},{"name":"host_fee","type":"u64"}]}},{"name":"Swap2Evt","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"from","type":"pubkey"},{"name":"start_bin_id","type":"i32"},{"name":"end_bin_id","type":"i32"},{"name":"swap_for_y","type":"bool"},{"name":"fee_bps","type":"u128"},{"name":"amount_in","docs":["Total amount, user transfer out"],"type":"u64"},{"name":"amount_left","docs":["Leftover amount"],"type":"u64"},{"name":"amount_out","docs":["Total amount transfer to user, including transfer fee"],"type":"u64"},{"name":"mm_fee","docs":["Market maker fee"],"type":"u64"},{"name":"protocol_fee","docs":["Total protocol fee"],"type":"u64"},{"name":"limit_order_fee","docs":["Total limit order fee"],"type":"u64"},{"name":"host_fee","docs":["Total host fee"],"type":"u64"},{"name":"fees_on_input","docs":["check if fees on input"],"type":"bool"},{"name":"fees_on_token_x","docs":["check if fees is on token x"],"type":"bool"}]}},{"name":"TokenBadge","docs":["Parameter that set by the protocol"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"token_mint","docs":["token mint"],"type":"pubkey"},{"name":"_padding","docs":["Reserve"],"type":{"array":["u8",128]}}]}},{"name":"TokenProgramFlags","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"TokenProgram"},{"name":"TokenProgram2022"}]}},{"name":"UpdatePositionLockReleasePoint","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"current_point","type":"u64"},{"name":"new_lock_release_point","type":"u64"},{"name":"old_lock_release_point","type":"u64"},{"name":"sender","type":"pubkey"}]}},{"name":"UpdatePositionOperator","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"old_operator","type":"pubkey"},{"name":"new_operator","type":"pubkey"}]}},{"name":"UpdateRewardDuration","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"old_reward_duration","type":"u64"},{"name":"new_reward_duration","type":"u64"}]}},{"name":"UpdateRewardFunder","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_index","type":"u64"},{"name":"old_funder","type":"pubkey"},{"name":"new_funder","type":"pubkey"}]}},{"name":"UserRewardInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"reward_per_token_completes","type":{"array":["u128",2]}},{"name":"reward_pendings","type":{"array":["u64",2]}}]}},{"name":"VariableParameters","docs":["Parameters that changes based on dynamic of the market"],"serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"volatility_accumulator","docs":["Volatility accumulator measure the number of bin crossed since reference bin ID. Normally (without filter period taken into consideration), reference bin ID is the active bin of last swap.","It affects the variable fee rate"],"type":"u32"},{"name":"volatility_reference","docs":["Volatility reference is decayed volatility accumulator. It is always <= volatility_accumulator"],"type":"u32"},{"name":"index_reference","docs":["Active bin id of last swap."],"type":"i32"},{"name":"_padding","docs":["Padding for bytemuck safe alignment"],"type":{"array":["u8",4]}},{"name":"last_update_timestamp","docs":["Last timestamp the variable parameters was updated"],"type":"i64"},{"name":"_padding_1","docs":["Padding for bytemuck safe alignment"],"type":{"array":["u8",8]}}]}},{"name":"WithdrawIneligibleReward","type":{"kind":"struct","fields":[{"name":"lb_pair","type":"pubkey"},{"name":"reward_mint","type":"pubkey"},{"name":"amount","type":"u64"}]}}],"constants":[{"name":"BASIS_POINT_MAX","type":"u16","value":"10000"},{"name":"BIN_ARRAY","type":"bytes","value":"[98, 105, 110, 95, 97, 114, 114, 97, 121]"},{"name":"BIN_ARRAY_BITMAP_SEED","type":"bytes","value":"[98, 105, 116, 109, 97, 112]"},{"name":"BIN_ARRAY_BITMAP_SIZE","type":"i32","value":"512"},{"name":"CLAIM_PROTOCOL_FEE_OPERATOR","type":"bytes","value":"[99, 102, 95, 111, 112, 101, 114, 97, 116, 111, 114]"},{"name":"DEFAULT_BIN_PER_POSITION","type":"u64","value":"70"},{"name":"EXTENSION_BINARRAY_BITMAP_SIZE","type":"u64","value":"12"},{"name":"FEE_DENOMINATOR","type":"u64","value":"1000000000"},{"name":"HOST_FEE_BPS","docs":["Host fee. 20%"],"type":"u16","value":"2000"},{"name":"ILM_PROTOCOL_SHARE","type":"u16","value":"2000"},{"name":"LIMIT_ORDER_FEE_SHARE","type":"u16","value":"5000"},{"name":"MAX_BASE_FEE","docs":["Maximum base fee, base_fee / 10^9 = fee_in_percentage"],"type":"u128","value":"100000000"},{"name":"MAX_BIN_ID_PER_BIN_STEP","docs":["Maximum bin ID per bin step. Computed based on 1 bps. Used for bin id bound estimation."],"type":"i32","value":"351639"},{"name":"MAX_BIN_PER_ARRAY","type":"u64","value":"70"},{"name":"MAX_BIN_PER_LIMIT_ORDER","type":"u64","value":"50"},{"name":"MAX_BIN_STEP","docs":["Maximum bin step"],"type":"u16","value":"400"},{"name":"MAX_FEE_RATE","docs":["Maximum fee rate. 10%"],"type":"u64","value":"100000000"},{"name":"MAX_PROTOCOL_SHARE","docs":["Maximum protocol share of the fee. 25%"],"type":"u16","value":"2500"},{"name":"MAX_RESIZE_LENGTH","type":"u64","value":"91"},{"name":"MAX_REWARD_BIN_SPLIT","type":"u64","value":"15"},{"name":"MAX_REWARD_DURATION","type":"u64","value":"31536000"},{"name":"MINIMUM_LIQUIDITY","type":"u128","value":"1000000"},{"name":"MIN_BASE_FEE","docs":["Minimum base fee"],"type":"u128","value":"100000"},{"name":"MIN_REWARD_DURATION","type":"u64","value":"1"},{"name":"NUM_REWARDS","type":"u64","value":"2"},{"name":"OPERATOR_PREFIX","type":"bytes","value":"[111, 112, 101, 114, 97, 116, 111, 114]"},{"name":"ORACLE","type":"bytes","value":"[111, 114, 97, 99, 108, 101]"},{"name":"POSITION","type":"bytes","value":"[112, 111, 115, 105, 116, 105, 111, 110]"},{"name":"POSITION_MAX_LENGTH","type":"u64","value":"1400"},{"name":"PRESET_PARAMETER","type":"bytes","value":"[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114]"},{"name":"PRESET_PARAMETER2","type":"bytes","value":"[112, 114, 101, 115, 101, 116, 95, 112, 97, 114, 97, 109, 101, 116, 101, 114, 50]"},{"name":"PROTOCOL_SHARE","type":"u16","value":"500"}]} \ No newline at end of file diff --git a/idls/meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json b/idls/meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json new file mode 100644 index 0000000..3c1bd2d --- /dev/null +++ b/idls/meteora_pools_amm.Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB.json @@ -0,0 +1 @@ +{"version":"0.5.2","name":"amm","docs":["Program for AMM"],"instructions":[{"name":"initializePermissionedPool","docs":["Initialize a new permissioned pool."],"accounts":[{"name":"pool","isMut":true,"isSigner":true,"docs":["Pool account (arbitrary address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"adminTokenA","isMut":true,"isSigner":false,"docs":["Admin token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"adminTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"adminPoolLp","isMut":true,"isSigner":false,"docs":["Admin pool LP token account. Used to receive LP during first deposit (initialize pool)","Admin pool LP token account. Used to receive LP during first deposit (initialize pool)"]},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"admin","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"feeOwner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}}]},{"name":"initializePermissionlessPool","docs":["Initialize a new permissionless pool."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"feeOwner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}},{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"initializePermissionlessPoolWithFeeTier","docs":["Initialize a new permissionless pool with customized fee tier"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"feeOwner","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}},{"name":"tradeFeeBps","type":"u64"},{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"enableOrDisablePool","docs":["Enable or disable a pool. A disabled pool allow only remove balanced liquidity operation."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account. Must be owner of the pool."]}],"args":[{"name":"enable","type":"bool"}]},{"name":"swap","docs":["Swap token A to B, or vice versa. An amount of trading fee will be charged for liquidity provider, and the admin of the pool."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"userSourceToken","isMut":true,"isSigner":false,"docs":["User token account. Token from this account will be transfer into the vault by the pool in exchange for another token of the pool."]},{"name":"userDestinationToken","isMut":true,"isSigner":false,"docs":["User token account. The exchanged token will be transfer into this account from the pool."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["Lp token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["Lp token mint of vault b"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"protocolTokenFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account. Used to receive trading fee. It's mint field must matched with user_source_token mint field."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_source_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"inAmount","type":"u64"},{"name":"minimumOutAmount","type":"u64"}]},{"name":"removeLiquiditySingleSide","docs":["Withdraw only single token from the pool. Only supported by pool with stable swap curve."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["User pool lp token account. LP will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userDestinationToken","isMut":true,"isSigner":false,"docs":["User token account to receive token upon success liquidity removal."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of the user_pool_lp account."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"minimumOutAmount","type":"u64"}]},{"name":"addImbalanceLiquidity","docs":["Deposit tokens to the pool in an imbalance ratio. Only supported by pool with stable swap curve."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"minimumPoolTokenAmount","type":"u64"},{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"removeBalanceLiquidity","docs":["Withdraw tokens from the pool in a balanced ratio. User will still able to withdraw from pool even the pool is disabled. This allow user to exit their liquidity when there's some unforeseen event happen."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"minimumATokenOut","type":"u64"},{"name":"minimumBTokenOut","type":"u64"}]},{"name":"addBalanceLiquidity","docs":["Deposit tokens to the pool in a balanced ratio."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"poolTokenAmount","type":"u64"},{"name":"maximumTokenAAmount","type":"u64"},{"name":"maximumTokenBAmount","type":"u64"}]},{"name":"setPoolFees","docs":["Update trading fee charged for liquidity provider, and admin."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"feeOperator","isMut":false,"isSigner":true,"docs":["Fee operator account"]}],"args":[{"name":"fees","type":{"defined":"PoolFees"}},{"name":"newPartnerFeeNumerator","type":"u64"}]},{"name":"overrideCurveParam","docs":["Update swap curve parameters. This function do not allow update of curve type. For example: stable swap curve to constant product curve. Only supported by pool with stable swap curve.","Only amp is allowed to be override. The other attributes of stable swap curve will be ignored."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account."]}],"args":[{"name":"curveType","type":{"defined":"CurveType"}}]},{"name":"getPoolInfo","docs":["Get the general information of the pool."],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"aVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":false,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":false,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault b"]}],"args":[]},{"name":"bootstrapLiquidity","docs":["Bootstrap the pool when liquidity is depleted."],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"userPoolLp","isMut":true,"isSigner":false,"docs":["user pool lp token account. lp will be burned from this account upon success liquidity removal."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"user","isMut":false,"isSigner":true,"docs":["User account. Must be owner of user_a_token, and user_b_token."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"createMintMetadata","docs":["Create mint metadata account for old pools"],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP mint account of the pool"]},{"name":"aVaultLp","isMut":false,"isSigner":false,"docs":["Vault A LP account of the pool"]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Payer"]}],"args":[]},{"name":"createLockEscrow","docs":["Create lock account"],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account"]},{"name":"lockEscrow","isMut":true,"isSigner":false,"docs":["Lock account"]},{"name":"owner","isMut":false,"isSigner":false},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Payer account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[]},{"name":"lock","docs":["Lock Lp token"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"lockEscrow","isMut":true,"isSigner":false,"docs":["Lock account"]},{"name":"owner","isMut":true,"isSigner":true,"docs":["Can be anyone"]},{"name":"sourceTokens","isMut":true,"isSigner":false,"docs":["owner lp token account"]},{"name":"escrowVault","isMut":true,"isSigner":false,"docs":["Escrow vault"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"aVault","isMut":false,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":false,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":false,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":false,"isSigner":false,"docs":["LP token mint of vault b"]}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"claimFee","docs":["Claim fee"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"lockEscrow","isMut":true,"isSigner":false,"docs":["Lock account"]},{"name":"owner","isMut":true,"isSigner":true,"docs":["Owner of lock account"]},{"name":"sourceTokens","isMut":true,"isSigner":false,"docs":["owner lp token account"]},{"name":"escrowVault","isMut":true,"isSigner":false,"docs":["Escrow vault"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token a. token a of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token b. token b of the pool will be deposit / withdraw from this vault account."]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault a"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault b"]},{"name":"userAToken","isMut":true,"isSigner":false,"docs":["User token A account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"userBToken","isMut":true,"isSigner":false,"docs":["User token B account. Token will be transfer from this account if it is add liquidity operation. Else, token will be transfer into this account."]},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. the pool will deposit/withdraw liquidity from the vault."]}],"args":[{"name":"maxAmount","type":"u64"}]},{"name":"createConfig","docs":["Create config"],"accounts":[{"name":"config","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"configParameters","type":{"defined":"ConfigParameters"}}]},{"name":"closeConfig","docs":["Close config"],"accounts":[{"name":"config","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"rentReceiver","isMut":true,"isSigner":false}],"args":[]},{"name":"initializePermissionlessConstantProductPoolWithConfig","docs":["Initialize permissionless pool with config"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"config","isMut":false,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"}]},{"name":"initializePermissionlessConstantProductPoolWithConfig2","docs":["Initialize permissionless pool with config 2"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"config","isMut":false,"isSigner":false},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"},{"name":"activationPoint","type":{"option":"u64"}}]},{"name":"initializeCustomizablePermissionlessConstantProductPool","docs":["Initialize permissionless pool with customizable params"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA address)"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["LP token mint of the pool"]},{"name":"tokenAMint","isMut":false,"isSigner":false,"docs":["Token A mint of the pool. Eg: USDT"]},{"name":"tokenBMint","isMut":false,"isSigner":false,"docs":["Token B mint of the pool. Eg: USDC"]},{"name":"aVault","isMut":true,"isSigner":false,"docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."]},{"name":"bVault","isMut":true,"isSigner":false,"docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."]},{"name":"aTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault A"]},{"name":"bTokenVault","isMut":true,"isSigner":false,"docs":["Token vault account of vault B"]},{"name":"aVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault A"]},{"name":"bVaultLpMint","isMut":true,"isSigner":false,"docs":["LP token mint of vault B"]},{"name":"aVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."]},{"name":"bVaultLp","isMut":true,"isSigner":false,"docs":["LP token account of vault B. Used to receive/burn vault LP upon deposit/withdraw from the vault."]},{"name":"payerTokenA","isMut":true,"isSigner":false,"docs":["Payer token account for pool token A mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerTokenB","isMut":true,"isSigner":false,"docs":["Admin token account for pool token B mint. Used to bootstrap the pool with initial liquidity."]},{"name":"payerPoolLp","isMut":true,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token A. Used to receive trading fee."]},{"name":"protocolTokenBFee","isMut":true,"isSigner":false,"docs":["Protocol fee token account for token B. Used to receive trading fee."]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Admin account. This account will be the admin of the pool, and the payer for PDA during initialize pool."]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account."]},{"name":"mintMetadata","isMut":true,"isSigner":false},{"name":"metadataProgram","isMut":false,"isSigner":false},{"name":"vaultProgram","isMut":false,"isSigner":false,"docs":["Vault program. The pool will deposit/withdraw liquidity from the vault."]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program."]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Associated token program."]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program."]}],"args":[{"name":"tokenAAmount","type":"u64"},{"name":"tokenBAmount","type":"u64"},{"name":"params","type":{"defined":"CustomizableParams"}}]},{"name":"updateActivationPoint","docs":["Update activation slot"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account."]}],"args":[{"name":"newActivationPoint","type":"u64"}]},{"name":"withdrawProtocolFees","docs":["Withdraw protocol fee"],"accounts":[{"name":"pool","isMut":false,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"aVaultLp","isMut":false,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false},{"name":"protocolTokenBFee","isMut":true,"isSigner":false},{"name":"treasuryTokenA","isMut":true,"isSigner":false},{"name":"treasuryTokenB","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setWhitelistedVault","docs":["Set whitelisted vault"],"accounts":[{"name":"pool","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"whitelistedVault","type":"publicKey"}]},{"name":"partnerClaimFee","docs":["Partner claim fee"],"accounts":[{"name":"pool","isMut":true,"isSigner":false,"docs":["Pool account (PDA)"]},{"name":"aVaultLp","isMut":false,"isSigner":false},{"name":"protocolTokenAFee","isMut":true,"isSigner":false},{"name":"protocolTokenBFee","isMut":true,"isSigner":false},{"name":"partnerTokenA","isMut":true,"isSigner":false},{"name":"partnerTokenB","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"partnerAuthority","isMut":false,"isSigner":true}],"args":[{"name":"maxAmountA","type":"u64"},{"name":"maxAmountB","type":"u64"}]}],"accounts":[{"name":"Config","type":{"kind":"struct","fields":[{"name":"poolFees","type":{"defined":"PoolFees"}},{"name":"activationDuration","type":"u64"},{"name":"vaultConfigKey","type":"publicKey"},{"name":"poolCreatorAuthority","docs":["Only pool_creator_authority can use the current config to initialize new pool. When it's Pubkey::default, it's a public config."],"type":"publicKey"},{"name":"activationType","docs":["Activation type"],"type":"u8"},{"name":"partnerFeeNumerator","type":"u64"},{"name":"padding","type":{"array":["u8",219]}}]}},{"name":"LockEscrow","docs":["State of lock escrow account"],"type":{"kind":"struct","fields":[{"name":"pool","docs":["Pool address"],"type":"publicKey"},{"name":"owner","docs":["Owner address"],"type":"publicKey"},{"name":"escrowVault","docs":["Vault address, store the lock user lock"],"type":"publicKey"},{"name":"bump","docs":["bump, used to sign"],"type":"u8"},{"name":"totalLockedAmount","docs":["Total locked amount"],"type":"u64"},{"name":"lpPerToken","docs":["Lp per token, virtual price of lp token"],"type":"u128"},{"name":"unclaimedFeePending","docs":["Unclaimed fee pending"],"type":"u64"},{"name":"aFee","docs":["Total a fee claimed so far"],"type":"u64"},{"name":"bFee","docs":["Total b fee claimed so far"],"type":"u64"}]}},{"name":"Pool","docs":["State of pool account"],"type":{"kind":"struct","fields":[{"name":"lpMint","docs":["LP token mint of the pool"],"type":"publicKey"},{"name":"tokenAMint","docs":["Token A mint of the pool. Eg: USDT"],"type":"publicKey"},{"name":"tokenBMint","docs":["Token B mint of the pool. Eg: USDC"],"type":"publicKey"},{"name":"aVault","docs":["Vault account for token A. Token A of the pool will be deposit / withdraw from this vault account."],"type":"publicKey"},{"name":"bVault","docs":["Vault account for token B. Token B of the pool will be deposit / withdraw from this vault account."],"type":"publicKey"},{"name":"aVaultLp","docs":["LP token account of vault A. Used to receive/burn the vault LP upon deposit/withdraw from the vault."],"type":"publicKey"},{"name":"bVaultLp","docs":["LP token account of vault B. Used to receive/burn the vault LP upon deposit/withdraw from the vault."],"type":"publicKey"},{"name":"aVaultLpBump","docs":["\"A\" vault lp bump. Used to create signer seeds."],"type":"u8"},{"name":"enabled","docs":["Flag to determine whether the pool is enabled, or disabled."],"type":"bool"},{"name":"protocolTokenAFee","docs":["Protocol fee token account for token A. Used to receive trading fee."],"type":"publicKey"},{"name":"protocolTokenBFee","docs":["Protocol fee token account for token B. Used to receive trading fee."],"type":"publicKey"},{"name":"feeLastUpdatedAt","docs":["Fee last updated timestamp"],"type":"u64"},{"name":"padding0","type":{"array":["u8",24]}},{"name":"fees","docs":["Store the fee charges setting."],"type":{"defined":"PoolFees"}},{"name":"poolType","docs":["Pool type"],"type":{"defined":"PoolType"}},{"name":"stake","docs":["Stake pubkey of SPL stake pool"],"type":"publicKey"},{"name":"totalLockedLp","docs":["Total locked lp token"],"type":"u64"},{"name":"bootstrapping","docs":["bootstrapping config"],"type":{"defined":"Bootstrapping"}},{"name":"partnerInfo","type":{"defined":"PartnerInfo"}},{"name":"padding","docs":["Padding for future pool field"],"type":{"defined":"Padding"}},{"name":"curveType","docs":["The type of the swap curve supported by the pool."],"type":{"defined":"CurveType"}}]}}],"types":[{"name":"TokenMultiplier","docs":["Multiplier for the pool token. Used to normalized token with different decimal into the same precision."],"type":{"kind":"struct","fields":[{"name":"tokenAMultiplier","docs":["Multiplier for token A of the pool."],"type":"u64"},{"name":"tokenBMultiplier","docs":["Multiplier for token B of the pool."],"type":"u64"},{"name":"precisionFactor","docs":["Record the highest token decimal in the pool. For example, Token A is 6 decimal, token B is 9 decimal. This will save value of 9."],"type":"u8"}]}},{"name":"PoolFees","docs":["Information regarding fee charges"],"type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","docs":["Trade fees are extra token amounts that are held inside the token","accounts during a trade, making the value of liquidity tokens rise.","Trade fee numerator"],"type":"u64"},{"name":"tradeFeeDenominator","docs":["Trade fee denominator"],"type":"u64"},{"name":"protocolTradeFeeNumerator","docs":["Protocol trading fees are extra token amounts that are held inside the token","accounts during a trade, with the equivalent in pool tokens minted to","the protocol of the program.","Protocol trade fee numerator"],"type":"u64"},{"name":"protocolTradeFeeDenominator","docs":["Protocol trade fee denominator"],"type":"u64"}]}},{"name":"Depeg","docs":["Contains information for depeg pool"],"type":{"kind":"struct","fields":[{"name":"baseVirtualPrice","docs":["The virtual price of staking / interest bearing token"],"type":"u64"},{"name":"baseCacheUpdated","docs":["The last time base_virtual_price is updated"],"type":"u64"},{"name":"depegType","docs":["Type of the depeg pool"],"type":{"defined":"DepegType"}}]}},{"name":"ConfigParameters","type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","type":"u64"},{"name":"protocolTradeFeeNumerator","type":"u64"},{"name":"activationDuration","type":"u64"},{"name":"vaultConfigKey","type":"publicKey"},{"name":"poolCreatorAuthority","type":"publicKey"},{"name":"activationType","type":"u8"},{"name":"index","type":"u64"},{"name":"partnerFeeNumerator","type":"u64"}]}},{"name":"CustomizableParams","type":{"kind":"struct","fields":[{"name":"tradeFeeNumerator","docs":["Trading fee."],"type":"u32"},{"name":"activationPoint","docs":["The pool start trading."],"type":{"option":"u64"}},{"name":"hasAlphaVault","docs":["Whether the pool support alpha vault"],"type":"bool"},{"name":"activationType","docs":["Activation type"],"type":"u8"},{"name":"padding","docs":["Padding"],"type":{"array":["u8",90]}}]}},{"name":"Padding","docs":["Padding for future pool fields"],"type":{"kind":"struct","fields":[{"name":"padding0","docs":["Padding 0"],"type":{"array":["u8",6]}},{"name":"padding1","docs":["Padding 1"],"type":{"array":["u64",21]}},{"name":"padding2","docs":["Padding 2"],"type":{"array":["u64",21]}}]}},{"name":"PartnerInfo","type":{"kind":"struct","fields":[{"name":"feeNumerator","type":"u64"},{"name":"partnerAuthority","type":"publicKey"},{"name":"pendingFeeA","type":"u64"},{"name":"pendingFeeB","type":"u64"}]}},{"name":"Bootstrapping","type":{"kind":"struct","fields":[{"name":"activationPoint","docs":["Activation point, can be slot or timestamp"],"type":"u64"},{"name":"whitelistedVault","docs":["Whitelisted vault to be able to buy pool before activation_point"],"type":"publicKey"},{"name":"poolCreator","docs":["Need to store pool creator in lauch pool, so they can modify liquidity before activation_point"],"type":"publicKey"},{"name":"activationType","docs":["Activation type, 0 means by slot, 1 means by timestamp"],"type":"u8"}]}},{"name":"ActivationType","docs":["Type of the activation"],"type":{"kind":"enum","variants":[{"name":"Slot"},{"name":"Timestamp"}]}},{"name":"RoundDirection","docs":["Rounding direction"],"type":{"kind":"enum","variants":[{"name":"Floor"},{"name":"Ceiling"}]}},{"name":"TradeDirection","docs":["Trade (swap) direction"],"type":{"kind":"enum","variants":[{"name":"AtoB"},{"name":"BtoA"}]}},{"name":"NewCurveType","docs":["Type of the swap curve"],"type":{"kind":"enum","variants":[{"name":"ConstantProduct"},{"name":"Stable","fields":[{"name":"amp","docs":["Amplification coefficient"],"type":"u64"},{"name":"token_multiplier","docs":["Multiplier for the pool token. Used to normalized token with different decimal into the same precision."],"type":{"defined":"TokenMultiplier"}},{"name":"depeg","docs":["Depeg pool information. Contains functions to allow token amount to be repeg using stake / interest bearing token virtual price"],"type":{"defined":"Depeg"}},{"name":"last_amp_updated_timestamp","docs":["The last amp updated timestamp. Used to prevent update_curve_info called infinitely many times within a short period"],"type":"u64"}]},{"name":"NewCurve","fields":[{"name":"field_one","type":"u64"},{"name":"field_two","type":"u64"}]}]}},{"name":"CurveType","docs":["Type of the swap curve"],"type":{"kind":"enum","variants":[{"name":"ConstantProduct"},{"name":"Stable","fields":[{"name":"amp","docs":["Amplification coefficient"],"type":"u64"},{"name":"token_multiplier","docs":["Multiplier for the pool token. Used to normalized token with different decimal into the same precision."],"type":{"defined":"TokenMultiplier"}},{"name":"depeg","docs":["Depeg pool information. Contains functions to allow token amount to be repeg using stake / interest bearing token virtual price"],"type":{"defined":"Depeg"}},{"name":"last_amp_updated_timestamp","docs":["The last amp updated timestamp. Used to prevent update_curve_info called infinitely many times within a short period"],"type":"u64"}]}]}},{"name":"DepegType","docs":["Type of depeg pool"],"type":{"kind":"enum","variants":[{"name":"None"},{"name":"Marinade"},{"name":"Lido"},{"name":"SplStake"}]}},{"name":"Rounding","docs":["Round up, down"],"type":{"kind":"enum","variants":[{"name":"Up"},{"name":"Down"}]}},{"name":"PoolType","docs":["Pool type"],"type":{"kind":"enum","variants":[{"name":"Permissioned"},{"name":"Permissionless"}]}}],"events":[{"name":"AddLiquidity","fields":[{"name":"lpMintAmount","type":"u64","index":false},{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false}]},{"name":"RemoveLiquidity","fields":[{"name":"lpUnmintAmount","type":"u64","index":false},{"name":"tokenAOutAmount","type":"u64","index":false},{"name":"tokenBOutAmount","type":"u64","index":false}]},{"name":"BootstrapLiquidity","fields":[{"name":"lpMintAmount","type":"u64","index":false},{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"Swap","fields":[{"name":"inAmount","type":"u64","index":false},{"name":"outAmount","type":"u64","index":false},{"name":"tradeFee","type":"u64","index":false},{"name":"protocolFee","type":"u64","index":false},{"name":"hostFee","type":"u64","index":false}]},{"name":"SetPoolFees","fields":[{"name":"tradeFeeNumerator","type":"u64","index":false},{"name":"tradeFeeDenominator","type":"u64","index":false},{"name":"protocolTradeFeeNumerator","type":"u64","index":false},{"name":"protocolTradeFeeDenominator","type":"u64","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"PoolInfo","fields":[{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false},{"name":"virtualPrice","type":"f64","index":false},{"name":"currentTimestamp","type":"u64","index":false}]},{"name":"TransferAdmin","fields":[{"name":"admin","type":"publicKey","index":false},{"name":"newAdmin","type":"publicKey","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"OverrideCurveParam","fields":[{"name":"newAmp","type":"u64","index":false},{"name":"updatedTimestamp","type":"u64","index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"PoolCreated","fields":[{"name":"lpMint","type":"publicKey","index":false},{"name":"tokenAMint","type":"publicKey","index":false},{"name":"tokenBMint","type":"publicKey","index":false},{"name":"poolType","type":{"defined":"PoolType"},"index":false},{"name":"pool","type":"publicKey","index":false}]},{"name":"PoolEnabled","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"enabled","type":"bool","index":false}]},{"name":"MigrateFeeAccount","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"newAdminTokenAFee","type":"publicKey","index":false},{"name":"newAdminTokenBFee","type":"publicKey","index":false},{"name":"tokenAAmount","type":"u64","index":false},{"name":"tokenBAmount","type":"u64","index":false}]},{"name":"CreateLockEscrow","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false}]},{"name":"Lock","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false}]},{"name":"ClaimFee","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"owner","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"aFee","type":"u64","index":false},{"name":"bFee","type":"u64","index":false}]},{"name":"CreateConfig","fields":[{"name":"tradeFeeNumerator","type":"u64","index":false},{"name":"protocolTradeFeeNumerator","type":"u64","index":false},{"name":"config","type":"publicKey","index":false}]},{"name":"CloseConfig","fields":[{"name":"config","type":"publicKey","index":false}]},{"name":"WithdrawProtocolFees","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"protocolAFee","type":"u64","index":false},{"name":"protocolBFee","type":"u64","index":false},{"name":"protocolAFeeOwner","type":"publicKey","index":false},{"name":"protocolBFeeOwner","type":"publicKey","index":false}]},{"name":"PartnerClaimFees","fields":[{"name":"pool","type":"publicKey","index":false},{"name":"feeA","type":"u64","index":false},{"name":"feeB","type":"u64","index":false},{"name":"partner","type":"publicKey","index":false}]}],"errors":[{"code":6000,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6001,"name":"InvalidFee","msg":"Invalid fee setup"},{"code":6002,"name":"InvalidInvariant","msg":"Invalid invariant d"},{"code":6003,"name":"FeeCalculationFailure","msg":"Fee calculation failure"},{"code":6004,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6005,"name":"InvalidCalculation","msg":"Invalid curve calculation"},{"code":6006,"name":"ZeroTradingTokens","msg":"Given pool token amount results in zero trading tokens"},{"code":6007,"name":"ConversionError","msg":"Math conversion overflow"},{"code":6008,"name":"FaultyLpMint","msg":"LP mint authority must be 'A' vault lp, without freeze authority, and 0 supply"},{"code":6009,"name":"MismatchedTokenMint","msg":"Token mint mismatched"},{"code":6010,"name":"MismatchedLpMint","msg":"LP mint mismatched"},{"code":6011,"name":"MismatchedOwner","msg":"Invalid lp token owner"},{"code":6012,"name":"InvalidVaultAccount","msg":"Invalid vault account"},{"code":6013,"name":"InvalidVaultLpAccount","msg":"Invalid vault lp account"},{"code":6014,"name":"InvalidPoolLpMintAccount","msg":"Invalid pool lp mint account"},{"code":6015,"name":"PoolDisabled","msg":"Pool disabled"},{"code":6016,"name":"InvalidAdminAccount","msg":"Invalid admin account"},{"code":6017,"name":"InvalidProtocolFeeAccount","msg":"Invalid protocol fee account"},{"code":6018,"name":"SameAdminAccount","msg":"Same admin account"},{"code":6019,"name":"IdenticalSourceDestination","msg":"Identical user source and destination token account"},{"code":6020,"name":"ApyCalculationError","msg":"Apy calculation error"},{"code":6021,"name":"InsufficientSnapshot","msg":"Insufficient virtual price snapshot"},{"code":6022,"name":"NonUpdatableCurve","msg":"Current curve is non-updatable"},{"code":6023,"name":"MisMatchedCurve","msg":"New curve is mismatched with old curve"},{"code":6024,"name":"InvalidAmplification","msg":"Amplification is invalid"},{"code":6025,"name":"UnsupportedOperation","msg":"Operation is not supported"},{"code":6026,"name":"ExceedMaxAChanges","msg":"Exceed max amplification changes"},{"code":6027,"name":"InvalidRemainingAccountsLen","msg":"Invalid remaining accounts length"},{"code":6028,"name":"InvalidRemainingAccounts","msg":"Invalid remaining account"},{"code":6029,"name":"MismatchedDepegMint","msg":"Token mint B doesn't matches depeg type token mint"},{"code":6030,"name":"InvalidApyAccount","msg":"Invalid APY account"},{"code":6031,"name":"InvalidTokenMultiplier","msg":"Invalid token multiplier"},{"code":6032,"name":"InvalidDepegInformation","msg":"Invalid depeg information"},{"code":6033,"name":"UpdateTimeConstraint","msg":"Update time constraint violated"},{"code":6034,"name":"ExceedMaxFeeBps","msg":"Exceeded max fee bps"},{"code":6035,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6036,"name":"PoolIsNotPermissioned","msg":"Pool is not permissioned"},{"code":6037,"name":"InvalidDepositAmount","msg":"Invalid deposit amount"},{"code":6038,"name":"InvalidFeeOwner","msg":"Invalid fee owner"},{"code":6039,"name":"NonDepletedPool","msg":"Pool is not depleted"},{"code":6040,"name":"AmountNotPeg","msg":"Token amount is not 1:1"},{"code":6041,"name":"AmountIsZero","msg":"Amount is zero"},{"code":6042,"name":"TypeCastFailed","msg":"Type cast error"},{"code":6043,"name":"AmountIsNotEnough","msg":"Amount is not enough"},{"code":6044,"name":"InvalidActivationDuration","msg":"Invalid activation duration"},{"code":6045,"name":"PoolIsNotLaunchPool","msg":"Pool is not launch pool"},{"code":6046,"name":"UnableToModifyActivationPoint","msg":"Unable to modify activation point"},{"code":6047,"name":"InvalidAuthorityToCreateThePool","msg":"Invalid authority to create the pool"},{"code":6048,"name":"InvalidActivationType","msg":"Invalid activation type"},{"code":6049,"name":"InvalidActivationPoint","msg":"Invalid activation point"},{"code":6050,"name":"PreActivationSwapStarted","msg":"Pre activation swap window started"},{"code":6051,"name":"InvalidPoolType","msg":"Invalid pool type"},{"code":6052,"name":"InvalidQuoteMint","msg":"Quote token must be SOL,USDC"}]} \ No newline at end of file diff --git a/idls/meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json b/idls/meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json new file mode 100644 index 0000000..61034fa --- /dev/null +++ b/idls/meteora_vault.24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi.json @@ -0,0 +1 @@ +{"version":"0.7.2","name":"vault","docs":["Program for vault"],"instructions":[{"name":"initialize","docs":["initialize new vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["This is base account for all vault","No need base key now because we only allow 1 vault per token now","Vault account"]},{"name":"payer","isMut":true,"isSigner":true,"docs":["Payer can be anyone"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["Token vault account"]},{"name":"tokenMint","isMut":false,"isSigner":false,"docs":["Token mint account"]},{"name":"lpMint","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false,"docs":["rent"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["system_program"]}],"args":[]},{"name":"enableVault","docs":["enable vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["Admin account"]}],"args":[{"name":"enabled","type":"u8"}]},{"name":"setOperator","docs":["set new operator"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"operator","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[]},{"name":"initializeStrategy","docs":["Initialize a strategy and add strategy to vault.strategies index"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"strategy","isMut":true,"isSigner":false,"docs":["Strategy account"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["Collateral vault account"]},{"name":"collateralMint","isMut":false,"isSigner":false,"docs":["Collateral mint account"]},{"name":"admin","isMut":true,"isSigner":true,"docs":["Admin account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program account"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Rent account"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Token program account"]}],"args":[{"name":"bumps","type":{"defined":"StrategyBumps"}},{"name":"strategyType","type":{"defined":"StrategyType"}}]},{"name":"removeStrategy","docs":["remove a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["Strategy account"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["Collateral vault account"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[]},{"name":"removeStrategy2","docs":["remove a strategy by advance payment"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["Vault account"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["Strategy account"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["Collateral vault account"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"tokenAdminAdvancePayment","isMut":true,"isSigner":false,"docs":["token_advance_payemnt","the owner of token_advance_payment must be admin"]},{"name":"tokenVaultAdvancePayment","isMut":true,"isSigner":false,"docs":["token_vault_advance_payment","the account must be different from token_vault","the owner of token_advance_payment must be vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[{"name":"maxAdminPayAmount","type":"u64"}]},{"name":"collectDust","docs":["collect token, that someone send wrongly","also help in case Mango reimbursement"],"accounts":[{"name":"vault","isMut":false,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["Token vault, must be different from vault.token_vault"]},{"name":"tokenAdmin","isMut":true,"isSigner":false,"docs":["token admin, enforce owner is admin to avoid mistake"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[]},{"name":"addStrategy","docs":["add a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":false,"isSigner":false,"docs":["strategy"]},{"name":"admin","isMut":false,"isSigner":true,"docs":["admin"]}],"args":[]},{"name":"depositStrategy","docs":["deposit liquidity to a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["strategy"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["collateral_vault"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"operator","isMut":false,"isSigner":true,"docs":["operator"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawStrategy","docs":["withdraw liquidity from a strategy"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["strategy"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["collateral_vault"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]},{"name":"operator","isMut":false,"isSigner":true,"docs":["operator"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdraw2","docs":["Withdraw v2. Withdraw from token vault if no remaining accounts are available. Else, it will attempt to withdraw from strategy and token vault. This method just proxy between 2 methods. Protocol integration should be using withdraw instead of this function."],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"unmintAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]},{"name":"deposit","docs":["user deposit liquidity to vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"tokenAmount","type":"u64"},{"name":"minimumLpTokenAmount","type":"u64"}]},{"name":"withdraw","docs":["user withdraw liquidity from vault"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"unmintAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]},{"name":"withdrawDirectlyFromStrategy","docs":["user withdraw liquidity from vault, if vault reserve doesn't have enough liquidity, it will withdraw from the strategy firstly"],"accounts":[{"name":"vault","isMut":true,"isSigner":false,"docs":["vault"]},{"name":"strategy","isMut":true,"isSigner":false,"docs":["strategy"]},{"name":"reserve","isMut":true,"isSigner":false},{"name":"strategyProgram","isMut":false,"isSigner":false},{"name":"collateralVault","isMut":true,"isSigner":false,"docs":["collateral_vault"]},{"name":"tokenVault","isMut":true,"isSigner":false,"docs":["token_vault"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp_mint"]},{"name":"feeVault","isMut":true,"isSigner":false,"docs":["fee_vault"]},{"name":"userToken","isMut":true,"isSigner":false,"docs":["user_token"]},{"name":"userLp","isMut":true,"isSigner":false,"docs":["user_lp"]},{"name":"user","isMut":false,"isSigner":true,"docs":["user"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token_program"]}],"args":[{"name":"unmintAmount","type":"u64"},{"name":"minOutAmount","type":"u64"}]}],"accounts":[{"name":"Vault","docs":["Vault struct"],"type":{"kind":"struct","fields":[{"name":"enabled","docs":["The flag, if admin set enable = false, then the user can only withdraw and cannot deposit in the vault."],"type":"u8"},{"name":"bumps","docs":["Vault nonce, to create vault seeds"],"type":{"defined":"VaultBumps"}},{"name":"totalAmount","docs":["The total liquidity of the vault, including remaining tokens in token_vault and the liquidity in all strategies."],"type":"u64"},{"name":"tokenVault","docs":["Token account, hold liquidity in vault reserve"],"type":"publicKey"},{"name":"feeVault","docs":["Hold lp token of vault, each time rebalance crank is called, vault calculate performance fee and mint corresponding lp token amount to fee_vault. fee_vault is owned by treasury address"],"type":"publicKey"},{"name":"tokenMint","docs":["Token mint that vault supports"],"type":"publicKey"},{"name":"lpMint","docs":["Lp mint of vault"],"type":"publicKey"},{"name":"strategies","docs":["The list of strategy addresses that vault supports, vault can support up to MAX_STRATEGY strategies at the same time."],"type":{"array":["publicKey",30]}},{"name":"base","docs":["The base address to create vault seeds"],"type":"publicKey"},{"name":"admin","docs":["Admin of vault"],"type":"publicKey"},{"name":"operator","docs":["Person who can send the crank. Operator can only send liquidity to strategies that admin defined, and claim reward to account of treasury address"],"type":"publicKey"},{"name":"lockedProfitTracker","docs":["Stores information for locked profit."],"type":{"defined":"LockedProfitTracker"}}]}},{"name":"Strategy","docs":["Strategy struct"],"type":{"kind":"struct","fields":[{"name":"reserve","docs":["Lending pool address, that the strategy will deposit/withdraw balance"],"type":"publicKey"},{"name":"collateralVault","docs":["The token account, that holds the collateral token"],"type":"publicKey"},{"name":"strategyType","docs":["Specify type of strategy"],"type":{"defined":"StrategyType"}},{"name":"currentLiquidity","docs":["The liquidity in strategy at the time vault deposit/withdraw from a lending protocol"],"type":"u64"},{"name":"bumps","docs":["Hold some bumps, in case the strategy needs to use other seeds to sign a CPI call."],"type":{"array":["u8",10]}},{"name":"vault","docs":["Vault address, that the strategy belongs"],"type":"publicKey"},{"name":"isDisable","docs":["If we remove strategy by remove_strategy2 endpoint, this account will be never added again"],"type":"u8"}]}}],"types":[{"name":"VaultBumps","docs":["Vault bumps struct"],"type":{"kind":"struct","fields":[{"name":"vaultBump","docs":["vault_bump"],"type":"u8"},{"name":"tokenVaultBump","docs":["token_vault_bump"],"type":"u8"}]}},{"name":"StrategyBumps","docs":["Strategy bumps struct"],"type":{"kind":"struct","fields":[{"name":"strategyIndex","docs":["strategy_index"],"type":"u8"},{"name":"otherBumps","docs":["Bumps of PDAs for the integrated protocol."],"type":{"array":["u8",10]}}]}},{"name":"LockedProfitTracker","docs":["LockedProfitTracker struct"],"type":{"kind":"struct","fields":[{"name":"lastUpdatedLockedProfit","docs":["The total locked profit from the last report"],"type":"u64"},{"name":"lastReport","docs":["The last timestamp (in seconds) rebalancing"],"type":"u64"},{"name":"lockedProfitDegradation","docs":["Rate per second of degradation"],"type":"u64"}]}},{"name":"StrategyType","docs":["StrategyType struct"],"type":{"kind":"enum","variants":[{"name":"PortFinanceWithoutLM"},{"name":"PortFinanceWithLM"},{"name":"SolendWithoutLM"},{"name":"Mango"},{"name":"SolendWithLM"},{"name":"ApricotWithoutLM"},{"name":"Francium"},{"name":"Tulip"},{"name":"Vault"},{"name":"Drift"},{"name":"Frakt"},{"name":"Marginfi"}]}}],"events":[{"name":"AddLiquidity","fields":[{"name":"lpMintAmount","type":"u64","index":false},{"name":"tokenAmount","type":"u64","index":false}]},{"name":"RemoveLiquidity","fields":[{"name":"lpUnmintAmount","type":"u64","index":false},{"name":"tokenAmount","type":"u64","index":false}]},{"name":"StrategyDeposit","fields":[{"name":"strategyType","type":{"defined":"StrategyType"},"index":false},{"name":"tokenAmount","type":"u64","index":false}]},{"name":"StrategyWithdraw","fields":[{"name":"strategyType","type":{"defined":"StrategyType"},"index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"estimatedTokenAmount","type":"u64","index":false}]},{"name":"ClaimReward","fields":[{"name":"strategyType","type":{"defined":"StrategyType"},"index":false},{"name":"tokenAmount","type":"u64","index":false},{"name":"mintAccount","type":"publicKey","index":false}]},{"name":"PerformanceFee","fields":[{"name":"lpMintMore","type":"u64","index":false}]},{"name":"ReportLoss","fields":[{"name":"strategy","type":"publicKey","index":false},{"name":"loss","type":"u64","index":false}]},{"name":"TotalAmount","fields":[{"name":"totalAmount","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"VaultIsDisabled","msg":"Vault is disabled"},{"code":6001,"name":"ExceededSlippage","msg":"Exceeded slippage tolerance"},{"code":6002,"name":"StrategyIsNotExisted","msg":"Strategy is not existed"},{"code":6003,"name":"UnAuthorized","msg":"UnAuthorized"},{"code":6004,"name":"MathOverflow","msg":"Math operation overflow"},{"code":6005,"name":"ProtocolIsNotSupported","msg":"Protocol is not supported"},{"code":6006,"name":"UnMatchReserve","msg":"Reserve does not support token mint"},{"code":6007,"name":"InvalidLockedProfitDegradation","msg":"lockedProfitDegradation is invalid"},{"code":6008,"name":"MaxStrategyReached","msg":"Maximum number of strategies have been reached"},{"code":6009,"name":"StrategyExisted","msg":"Strategy existed"},{"code":6010,"name":"InvalidUnmintAmount","msg":"Invalid unmint amount"},{"code":6011,"name":"InvalidAccountsForStrategy","msg":"Invalid accounts for strategy"},{"code":6012,"name":"InvalidBump","msg":"Invalid bump"},{"code":6013,"name":"AmountMustGreaterThanZero","msg":"Amount must be greater than 0"},{"code":6014,"name":"MangoIsNotSupportedAnymore","msg":"Mango is not supported anymore"},{"code":6015,"name":"StrategyIsNotSupported","msg":"Strategy is not supported"},{"code":6016,"name":"PayAmountIsExeeced","msg":"Pay amount is exceeded"},{"code":6017,"name":"FeeVaultIsNotSet","msg":"Fee vault is not set"},{"code":6018,"name":"LendingAssertionViolation","msg":"deposit amount in lending is not matched"},{"code":6019,"name":"HaveMoneyInLending","msg":"Cannot remove strategy becase we have some in lending"}]} \ No newline at end of file diff --git a/idls/moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json b/idls/moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json new file mode 100644 index 0000000..8f66db1 --- /dev/null +++ b/idls/moonit.MoonCVVNZFSYkqNXP6bxHLPL6QQJiMagDL3qcqUQTrG.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"token_launchpad","instructions":[{"name":"tokenMint","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"backendAuthority","isMut":false,"isSigner":true},{"name":"curveAccount","isMut":true,"isSigner":false},{"name":"mint","isMut":true,"isSigner":true},{"name":"mintMetadata","isMut":true,"isSigner":false,"docs":["Type validating that the account is owned by the System Program = uninitialized","seeds should ensure that the address is correct"]},{"name":"curveTokenAccount","isMut":true,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"mplTokenMetadata","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"mintParams","type":{"defined":"TokenMintParams"}}]},{"name":"buy","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokenAccount","isMut":true,"isSigner":false},{"name":"curveAccount","isMut":true,"isSigner":false},{"name":"curveTokenAccount","isMut":true,"isSigner":false},{"name":"dexFee","isMut":true,"isSigner":false},{"name":"helioFee","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"TradeParams"}}]},{"name":"sell","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokenAccount","isMut":true,"isSigner":false},{"name":"curveAccount","isMut":true,"isSigner":false},{"name":"curveTokenAccount","isMut":true,"isSigner":false},{"name":"dexFee","isMut":true,"isSigner":false},{"name":"helioFee","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"TradeParams"}}]},{"name":"migrateFunds","accounts":[{"name":"backendAuthority","isMut":false,"isSigner":true,"docs":["BE Authority"]},{"name":"migrationAuthority","isMut":true,"isSigner":true,"docs":["Migration Authority","Owner and Payer over Token Accounts, needs to be mutable"]},{"name":"curveAccount","isMut":true,"isSigner":false,"docs":["Curve Account","The account is closed after this instruction"]},{"name":"curveTokenAccount","isMut":true,"isSigner":false,"docs":["Curve Token Account","The account is closed after this instruction"]},{"name":"migrationAuthorityTokenAccount","isMut":true,"isSigner":false,"docs":["Authority token Account","Init on demand"]},{"name":"mint","isMut":true,"isSigner":false,"docs":["InterfaceAccount: checks program ownership + deserialize into Mint"]},{"name":"dexFeeAccount","isMut":true,"isSigner":false},{"name":"helioFeeAccount","isMut":true,"isSigner":false},{"name":"configAccount","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"configInit","accounts":[{"name":"configAuthority","isMut":true,"isSigner":true},{"name":"configAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"data","type":{"defined":"ConfigParams"}}]},{"name":"configUpdate","accounts":[{"name":"configAuthority","isMut":false,"isSigner":true},{"name":"configAccount","isMut":true,"isSigner":false}],"args":[{"name":"data","type":{"defined":"ConfigParams"}}]}],"accounts":[{"name":"ConfigAccount","type":{"kind":"struct","fields":[{"name":"migrationAuthority","type":"publicKey"},{"name":"backendAuthority","type":"publicKey"},{"name":"configAuthority","type":"publicKey"},{"name":"helioFee","type":"publicKey"},{"name":"dexFee","type":"publicKey"},{"name":"feeBps","type":"u16"},{"name":"dexFeeShare","type":"u8"},{"name":"migrationFee","type":"u64"},{"name":"marketcapThreshold","type":"u64"},{"name":"marketcapCurrency","type":{"defined":"Currency"}},{"name":"minSupportedDecimalPlaces","type":"u8"},{"name":"maxSupportedDecimalPlaces","type":"u8"},{"name":"minSupportedTokenSupply","type":"u64"},{"name":"maxSupportedTokenSupply","type":"u64"},{"name":"bump","type":"u8"},{"name":"coefB","type":"u32"}]}},{"name":"CurveAccount","type":{"kind":"struct","fields":[{"name":"totalSupply","type":"u64"},{"name":"curveAmount","type":"u64"},{"name":"mint","type":"publicKey"},{"name":"decimals","type":"u8"},{"name":"collateralCurrency","type":{"defined":"Currency"}},{"name":"curveType","type":{"defined":"CurveType"}},{"name":"marketcapThreshold","type":"u64"},{"name":"marketcapCurrency","type":{"defined":"Currency"}},{"name":"migrationFee","type":"u64"},{"name":"coefB","type":"u32"},{"name":"bump","type":"u8"},{"name":"migrationTarget","type":{"defined":"MigrationTarget"}}]}}],"types":[{"name":"TokenMintParams","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"decimals","type":"u8"},{"name":"collateralCurrency","type":"u8"},{"name":"amount","type":"u64"},{"name":"curveType","type":"u8"},{"name":"migrationTarget","type":"u8"}]}},{"name":"TradeParams","type":{"kind":"struct","fields":[{"name":"tokenAmount","type":"u64"},{"name":"collateralAmount","type":"u64"},{"name":"fixedSide","type":"u8"},{"name":"slippageBps","type":"u64"}]}},{"name":"ConfigParams","type":{"kind":"struct","fields":[{"name":"migrationAuthority","type":{"option":"publicKey"}},{"name":"backendAuthority","type":{"option":"publicKey"}},{"name":"configAuthority","type":{"option":"publicKey"}},{"name":"helioFee","type":{"option":"publicKey"}},{"name":"dexFee","type":{"option":"publicKey"}},{"name":"feeBps","type":{"option":"u16"}},{"name":"dexFeeShare","type":{"option":"u8"}},{"name":"migrationFee","type":{"option":"u64"}},{"name":"marketcapThreshold","type":{"option":"u64"}},{"name":"marketcapCurrency","type":{"option":"u8"}},{"name":"minSupportedDecimalPlaces","type":{"option":"u8"}},{"name":"maxSupportedDecimalPlaces","type":{"option":"u8"}},{"name":"minSupportedTokenSupply","type":{"option":"u64"}},{"name":"maxSupportedTokenSupply","type":{"option":"u64"}},{"name":"coefB","type":{"option":"u32"}}]}},{"name":"Currency","type":{"kind":"enum","variants":[{"name":"Sol"}]}},{"name":"CurveType","type":{"kind":"enum","variants":[{"name":"LinearV1"},{"name":"ConstantProductV1"}]}},{"name":"MigrationTarget","type":{"kind":"enum","variants":[{"name":"Raydium"},{"name":"Meteora"}]}},{"name":"TradeType","type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}},{"name":"FixedSide","type":{"kind":"enum","variants":[{"name":"ExactIn"},{"name":"ExactOut"}]}}],"events":[{"name":"TradeEvent","fields":[{"name":"amount","type":"u64","index":false},{"name":"collateralAmount","type":"u64","index":false},{"name":"dexFee","type":"u64","index":false},{"name":"helioFee","type":"u64","index":false},{"name":"allocation","type":"u64","index":false},{"name":"curve","type":"publicKey","index":false},{"name":"costToken","type":"publicKey","index":false},{"name":"sender","type":"publicKey","index":false},{"name":"type","type":{"defined":"TradeType"},"index":false},{"name":"label","type":"string","index":true}]},{"name":"MigrationEvent","fields":[{"name":"tokensMigrated","type":"u64","index":false},{"name":"tokensBurned","type":"u64","index":false},{"name":"collateralMigrated","type":"u64","index":false},{"name":"fee","type":"u64","index":false},{"name":"label","type":"string","index":true}]}],"errors":[{"code":6000,"name":"InsufficientBalance","msg":"Insufficient SOL to pay for the transaction."},{"code":6001,"name":"InvalidAmount","msg":"The amount must be available in the curve ."},{"code":6002,"name":"InvalidSlippage","msg":"The slippage must be under 100 percent."},{"code":6003,"name":"SlippageOverflow","msg":"The cost amount is not in the allowed slippage interval."},{"code":6004,"name":"ThresholdReached","msg":"Threshold limit exceeded."},{"code":6005,"name":"InvalidTokenAccount","msg":"Trade disabled, market cap threshold reached."},{"code":6006,"name":"InvalidCurveAccount","msg":"Invalid curve account."},{"code":6007,"name":"InvalidFeeAccount","msg":"Invalid fee account address."},{"code":6008,"name":"CurveLimit","msg":"Curve limit exceeded."},{"code":6009,"name":"InvalidCurveType","msg":"Invalid curve type."},{"code":6010,"name":"InvalidCurrency","msg":"Invalid currency."},{"code":6011,"name":"Arithmetics","msg":"Artithmetics error"},{"code":6012,"name":"ThresholdNotHit","msg":"Market Cap threshold not hit, cannot migrate funds yet"},{"code":6013,"name":"InvalidAuthority","msg":"Invalid Authority provided."},{"code":6014,"name":"TradeAmountTooLow","msg":"Trade amount too low , resulting in 0 costs"},{"code":6015,"name":"ConfigFieldMissing","msg":"Config field needs to be present during initialization"},{"code":6016,"name":"DifferentCurrencies","msg":"Unsupported different currency types"},{"code":6017,"name":"BasisPointTooHigh","msg":"Basis points too high"},{"code":6018,"name":"FeeShareTooHigh","msg":"Fee share too High"},{"code":6019,"name":"TokenDecimalsOutOfRange","msg":"Token decimals are not within the supported range"},{"code":6020,"name":"TokenNameTooLong","msg":"Token Name too long, max supported length is 32 bytes"},{"code":6021,"name":"TokenSymbolTooLong","msg":"Token Symbol too long, max supported length is 10 bytes"},{"code":6022,"name":"TokenURITooLong","msg":"Token URI too long, max supported length is 200 bytes"},{"code":6023,"name":"IncorrectDecimalPlacesBounds","msg":"Minimum Decimal Places cannot be lower than Maximum Decimal Places"},{"code":6024,"name":"IncorrectTokenSupplyBounds","msg":"Minimum Token Supply cannot be lower than Maximum Token Supply"},{"code":6025,"name":"TotalSupplyOutOfBounds","msg":"Token Total Supply out of bounds"},{"code":6026,"name":"FinalCollateralTooLow","msg":"This setup will produce final collateral amount less than the migration fee"},{"code":6027,"name":"CoefficientZero","msg":"One of the Coefficients is equal to ZERO"},{"code":6028,"name":"MarketCapThresholdTooLow","msg":"Market cap Threshold under the Hard lower bound limits"},{"code":6029,"name":"CoefBOutofBounds","msg":"Default coef_b set out of hard limit bounds"},{"code":6030,"name":"IncorrectMarketCap","msg":"For Constant Product the Market Cap threshold cannot be higher than 325 SOL"},{"code":6031,"name":"IncorrectDecimals","msg":"For Constant Product the Decimal places cannot be other than 9"},{"code":6032,"name":"IncorrectMaxSupply","msg":"For Constant Product the Maximal Token Supply cannot be other than 1_000_000_000"},{"code":6033,"name":"MarketCapTooHigh","msg":"Market Cap Threshold set too high, will not be hit even if Curve Hard Limit reached"},{"code":6034,"name":"InvalidMigrationTarget","msg":"This Migration Target is not supported!"},{"code":6035,"name":"General","msg":"General error"}]} \ No newline at end of file diff --git a/idls/numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json b/idls/numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json new file mode 100644 index 0000000..fb67676 --- /dev/null +++ b/idls/numeraire.NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P.json @@ -0,0 +1 @@ +{"address":"NUMERUNsFCP3kuNmWZuXtm1AaQCPj9uw6Guv2Ekoi5P","metadata":{"name":"numeraire","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","docs":["Pool Owner/Whitelist only functions"],"discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"AddLiquidityData"}}}],"returns":"u64"},{"name":"compound","discriminator":[165,208,251,78,242,160,141,47],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"create_pool","discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"arg","path":"data.pool_seed"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"creator_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"CreateStablePoolData"}}}]},{"name":"init_virtual_stable_pair","discriminator":[228,18,163,161,101,204,106,172],"accounts":[{"name":"x_mint"},{"name":"pair","writable":true,"pda":{"seeds":[{"kind":"account","path":"x_mint"},{"kind":"arg","path":"data.pair_seed"}]}},{"name":"pair_authority","pda":{"seeds":[{"kind":"account","path":"pair"},{"kind":"const","value":[97,117,116,104,111,114,105,116,121]}]}},{"name":"x_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"pair"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"x_adder","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"x_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"]},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"InitVirtualStablePairData"}}}]},{"name":"remove_all_liquidity","discriminator":[10,51,61,35,112,105,24,85],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"remove_liquidity","discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"RemoveLiquidityData"}}}],"returns":"u64"},{"name":"set_fee","discriminator":[18,154,24,18,237,214,19,80],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetFeeData"}}}]},{"name":"set_inv_t_max","discriminator":[218,209,244,237,211,236,98,58],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetInvTMaxData"}}}]},{"name":"set_lp_token_metadata","discriminator":[71,73,56,155,202,142,100,150],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"metadata_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"token_metadata_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"account","path":"token_metadata_program"}}},{"name":"payer","signer":true},{"name":"token_metadata_program","docs":["Solana ecosystem accounts"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetMetadataData"}}}]},{"name":"set_numeraire_owner","discriminator":[6,199,177,104,86,61,93,253],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetOwnerData"}}}]},{"name":"set_numeraire_status","discriminator":[10,17,5,71,204,171,126,173],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetStatusData"}}}]},{"name":"set_numeraire_whitelisted_pool_creator","discriminator":[147,51,31,255,111,2,189,173],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetWhilelistedAddrData"}}}]},{"name":"set_owner","discriminator":[72,202,120,52,77,128,96,197],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetOwnerData"}}}]},{"name":"set_rate","discriminator":[99,58,170,238,160,120,74,11],"accounts":[{"name":"numeraire_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"pair_mint","optional":true},{"name":"payer","writable":true,"signer":true},{"name":"system_program","docs":["Solana ecosystem accounts"],"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SetRateData"}}}]},{"name":"set_status","docs":["Pool Owner only functions"],"discriminator":[181,184,224,203,193,29,177,224],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetStatusData"}}}]},{"name":"set_whitelisted_adder","discriminator":[74,38,140,129,228,73,236,105],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"payer","signer":true}],"args":[{"name":"data","type":{"defined":{"name":"SetWhilelistedAddrData"}}}]},{"name":"skim","discriminator":[238,120,221,138,82,60,100,218],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"const","value":[108,105,113,117,105,100,105,116,121]}]}},{"name":"payer_lp_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"token_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"swap_exact_in","discriminator":[104,104,131,86,161,189,180,216],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactInHintlessData"}}}],"returns":"u64"},{"name":"swap_exact_in_hinted","discriminator":[98,239,244,233,16,236,40,49],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactInData"}}}],"returns":"u64"},{"name":"swap_exact_in_quote","discriminator":[68,209,177,170,185,100,29,191],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactInData"}}}],"returns":"u64"},{"name":"swap_exact_out","discriminator":[250,73,101,33,38,207,75,184],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactOutHintlessData"}}}],"returns":"u64"},{"name":"swap_exact_out_hinted","discriminator":[153,208,206,70,62,234,98,182],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"}]}},{"name":"in_mint","writable":true},{"name":"out_mint","writable":true},{"name":"in_trader","writable":true},{"name":"out_trader","writable":true},{"name":"in_vault","writable":true,"optional":true},{"name":"out_vault","writable":true,"optional":true},{"name":"numeraire_config","pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103]}]}},{"name":"payer","docs":["The trader account (executing the swap, paying for all rents)"],"signer":true},{"name":"token_program","docs":["Solana ecosystem accounts"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"data","type":{"defined":{"name":"SwapExactOutData"}}}],"returns":"u64"}],"accounts":[{"name":"NumeraireConfig","discriminator":[230,62,124,43,102,101,88,63]},{"name":"StablePool","discriminator":[239,91,93,162,171,14,42,66]},{"name":"VirtualStablePair","discriminator":[112,153,135,223,53,247,129,101]}],"events":[{"name":"AddLiquidity","discriminator":[31,94,125,90,227,52,61,186]},{"name":"Quote","discriminator":[133,244,92,134,193,24,187,158]},{"name":"RemoveLiquidity","discriminator":[116,244,97,232,103,31,152,58]},{"name":"SwapExactIn","discriminator":[147,136,213,11,150,23,141,152]},{"name":"SwapExactOut","discriminator":[71,66,127,123,231,29,227,92]}],"errors":[{"code":6000,"name":"OnlyOwner","msg":"Attempt to call an owner only function not by the owner"},{"code":6001,"name":"InvalidTokenAccountData","msg":"Token account data is not as expected"},{"code":6002,"name":"InvalidAccountData","msg":"Account data is not as expected"},{"code":6003,"name":"DecimalsMismatch","msg":"Token pair decimals mismatch"},{"code":6004,"name":"InvalidTokenExtension","msg":"Token should not have this extension"},{"code":6005,"name":"IncorrectAccounts","msg":"Wrong account(s) passed as input"},{"code":6006,"name":"IncorrectAuthority","msg":"Wrong authority passed as input"},{"code":6007,"name":"InvalidDelegate","msg":"Delegate not allowed"},{"code":6008,"name":"UnsupportedFeature","msg":"This feature is currently unsupported or unenabled"},{"code":6009,"name":"FunctionPaused","msg":"This function is currently paused"},{"code":6010,"name":"InvalidFee","msg":"Fee must be less than 100 basis points"},{"code":6011,"name":"InvalidPoolCreate","msg":"Token mints must be ordered by pubkey"},{"code":6012,"name":"InvalidCurveParams","msg":"Curve params must be positive"},{"code":6013,"name":"InsufficientLiquidity","msg":"Pool has too little liquidity for action"},{"code":6014,"name":"LiquidityAddUnbalanced","msg":"Liquidity add does not make pool balanced (or curve params are asymmetric)"},{"code":6015,"name":"InsufficientBalance","msg":"Input is more than trader balance"},{"code":6016,"name":"InputTooSmall","msg":"Input is below the minimum expected"},{"code":6017,"name":"InputTooBig","msg":"Input is more than available liquidity"},{"code":6018,"name":"OutputTooSmall","msg":"Output is below the minimum expected"},{"code":6019,"name":"InvariantOverflow","msg":"Invariant computation overflowed"},{"code":6020,"name":"InvariantViolated","msg":"Invariant does not hold"},{"code":6021,"name":"LiquidityAddTooSmall","msg":"Depositing too little liquidity"},{"code":6022,"name":"UnsupportedTokenProgram","msg":"Only Token Program 2022 and/or Token Program are supported"},{"code":6023,"name":"InvalidPoolWeights","msg":"Some pool weights are zero or nonzero and shouldn't be"},{"code":6024,"name":"SwapOverflowError","msg":"A swap math operation overflowed"},{"code":6025,"name":"LiquidityMathOverflow","msg":"An add/remove liquidity math operation overflowed"},{"code":6026,"name":"InvalidBalanceDeltas","msg":"Some add/remove balance deltas are nonzero and shouldn't be"},{"code":6027,"name":"InvalidPoolParams","msg":"The provided pool params were not well formed"},{"code":6028,"name":"InvalidHints","msg":"The hints provided do not bound the swap amounts"},{"code":6029,"name":"FeeError","msg":"Unexpected fee result"},{"code":6030,"name":"VaultOverflowError","msg":"A vault math operation overflowed"},{"code":6031,"name":"OutputTooBig","msg":"Output is above the maximum expected"},{"code":6032,"name":"Unreachable","msg":"This cannot happen"},{"code":6033,"name":"InvalidAction","msg":"This action is not allowed"}],"types":[{"name":"AddLiquidity","type":{"kind":"struct","fields":[{"name":"lp_token_mint_amount","type":"u64"},{"name":"x_reserve_deltas","type":{"array":["u64",10]}},{"name":"y_reserve_deltas","type":{"array":["u64",10]}},{"name":"inv_L_deltas","type":{"array":["u64",10]}},{"name":"min_lp_token_mint_amount","type":"u64"},{"name":"trader","type":"pubkey"},{"name":"pool","type":"pubkey"}]}},{"name":"AddLiquidityData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"max_amounts_in","type":{"array":["u64",10]}},{"name":"min_lp_token_mint_amount","type":"u64"},{"name":"take_swaps","type":"u8"},{"name":"swap_paths","type":{"array":["u8",10]}},{"name":"swap_amounts","type":{"array":["u64",10]}}]}},{"name":"CreateStablePoolData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"fee_num","type":"u32"},{"name":"fee_denom","type":"u32"},{"name":"pool_seed","type":"pubkey"},{"name":"weights","type":{"array":["u32",10]}},{"name":"inv_T","type":"u64"},{"name":"inv_T_max","type":"u64"}]}},{"name":"InitVirtualStablePairData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"init_amount","type":"u64"},{"name":"curve_Amp","type":"u128"},{"name":"curve_a","type":"u128"},{"name":"curve_b","type":"u128"},{"name":"curve_alpha","type":"u64"},{"name":"curve_beta","type":"u64"},{"name":"pair_seed","type":"pubkey"}]}},{"name":"NumeraireConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"status","type":"u32"},{"name":"rate_mints","type":{"array":["pubkey",10]}},{"name":"rate_nums","type":{"array":["u32",10]}},{"name":"rate_denoms","type":{"array":["u32",10]}},{"name":"_padding","type":{"array":["u8",12]}},{"name":"padding","type":{"array":["u8",1024]}}]}},{"name":"Quote","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"}]}},{"name":"RemoveLiquidity","type":{"kind":"struct","fields":[{"name":"lp_token_redeem_amount","type":"u64"},{"name":"x_reserve_deltas","type":{"array":["u64",10]}},{"name":"y_reserve_deltas","type":{"array":["u64",10]}},{"name":"inv_L_deltas","type":{"array":["u64",10]}},{"name":"min_amounts_out","type":{"array":["u64",10]}},{"name":"trader","type":"pubkey"},{"name":"pool","type":"pubkey"}]}},{"name":"RemoveLiquidityData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"lp_token_redeem_amount","type":"u64"},{"name":"min_amounts_out","type":{"array":["u64",10]}},{"name":"out_index","type":"u8"}]}},{"name":"SetFeeData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"fee_num","type":"u32"},{"name":"fee_denom","type":"u32"}]}},{"name":"SetInvTMaxData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"inv_T_max","type":"u64"}]}},{"name":"SetMetadataData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"SetOwnerData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"}]}},{"name":"SetRateData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"rate_mint","type":"pubkey"},{"name":"rate_num","type":"u32"},{"name":"rate_denom","type":"u32"}]}},{"name":"SetStatusData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"status","type":"u32"}]}},{"name":"SetWhilelistedAddrData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"whitelisted_addr","type":"pubkey"}]}},{"name":"StablePool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pool_seed","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"whitelisted_adder","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"inv_T","type":"u64"},{"name":"inv_T_max","type":"u64"},{"name":"pairs","type":{"array":[{"defined":{"name":"VirtualStablePair"}},10]}},{"name":"weights","type":{"array":["u32",10]}},{"name":"total_weight","type":"u64"},{"name":"status","type":"u32"},{"name":"fee_num","type":"u32"},{"name":"fee_denom","type":"u32"},{"name":"decimals","type":"u8"},{"name":"num_stables","type":"u8"},{"name":"_padding","type":{"array":["u8",2]}},{"name":"padding","type":{"array":["u8",128]}}]}},{"name":"SwapExactIn","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"min_amount_out","type":"u64"},{"name":"trader","type":"pubkey"},{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"pool","type":"pubkey"}]}},{"name":"SwapExactInData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"},{"name":"hints","type":{"array":["u64",10]}},{"name":"path_hints","type":{"array":["u8",10]}}]}},{"name":"SwapExactInHintlessData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_in","type":"u64"},{"name":"min_amount_out","type":"u64"}]}},{"name":"SwapExactOut","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"max_amount_in","type":"u64"},{"name":"trader","type":"pubkey"},{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"pool","type":"pubkey"}]}},{"name":"SwapExactOutData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_out","type":"u64"},{"name":"max_amount_in","type":"u64"},{"name":"hints","type":{"array":["u64",10]}},{"name":"path_hints","type":{"array":["u8",10]}}]}},{"name":"SwapExactOutHintlessData","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"in_index","type":"u8"},{"name":"out_index","type":"u8"},{"name":"exact_amount_out","type":"u64"},{"name":"max_amount_in","type":"u64"}]}},{"name":"VirtualStablePair","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"pair_authority","type":"pubkey"},{"name":"x_reserve_amount","type":"u64"},{"name":"y_reserve","type":"u64"},{"name":"curve_Amp","docs":["Curve params. Define bonding curve shape: x + y + a + b - A / (x + a) - A / (y + b) - D = 0"],"type":"u128"},{"name":"curve_a","type":"u128"},{"name":"curve_b","type":"u128"},{"name":"inv_L","docs":["Invariant constant. For invariant: x/L + y/L + a + b - A / (x/L + a) - A / (y/L + b) - D = 0"],"type":"u128"},{"name":"owner","type":"pubkey"},{"name":"x_mint","type":"pubkey"},{"name":"x_vault","type":"pubkey"},{"name":"curve_alpha","type":"u64"},{"name":"curve_beta","type":"u64"},{"name":"newest_rate_num","type":"u32"},{"name":"newest_rate_denom","type":"u32"},{"name":"decimals","type":"u8"},{"name":"pair_index","type":"u8"},{"name":"x_is_2022","type":"u8"},{"name":"_padding","type":{"array":["u8",5]}},{"name":"padding","type":{"array":["u8",128]}}]}}],"constants":[{"name":"AUTHORITY_SEED","type":"bytes","value":"[97, 117, 116, 104, 111, 114, 105, 116, 121]"},{"name":"CONFIG_SEED","type":"bytes","value":"[99, 111, 110, 102, 105, 103]"},{"name":"LIQUIDITY_SEED","type":"bytes","value":"[108, 105, 113, 117, 105, 100, 105, 116, 121]"},{"name":"LP_TOKEN_PROGRAM","type":"pubkey","value":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"MAX_STABLES_PER_POOL","type":"u8","value":"10"},{"name":"NORMALIZED_VALUE_DECIMALS","type":"u8","value":"6"}]} \ No newline at end of file diff --git a/idls/okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json b/idls/okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json new file mode 100644 index 0000000..0366a0a --- /dev/null +++ b/idls/okx_dex_router.proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u.json @@ -0,0 +1 @@ +{"address":"proVF4pMXVaYqmy4NjniPh4pqKNfMmsihgd4wdkCX3u","metadata":{"name":"OKX: DEX Router","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"signer","writable":true,"signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"receiver","writable":true},{"name":"source_token_account","writable":true,"optional":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"address":"ARu4n5mFdZogZAravu7CcizaojWnS6oqka37gdLT5SZn"},{"name":"token_mint","optional":true},{"name":"token_program","optional":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_cashback_pumpfun","discriminator":[83,1,245,125,201,207,209,249],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","docs":["PumpFun transfers claimed SOL directly to this account (account[0] in the CPI)."],"writable":true,"address":"ARu4n5mFdZogZAravu7CcizaojWnS6oqka37gdLT5SZn"},{"name":"user_volume_accumulator","docs":["Holds native SOL accumulated as cashback; emptied by PumpFun during claim."],"writable":true},{"name":"receiver","docs":["after PumpFun deposits it there."],"writable":true},{"name":"event_authority","address":"Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pumpfun_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[]},{"name":"claim_cashback_pumpswap","discriminator":[253,242,176,173,217,78,100,25],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","writable":true,"address":"ARu4n5mFdZogZAravu7CcizaojWnS6oqka37gdLT5SZn"},{"name":"user_volume_accumulator","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"spl_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"uva_wsol_ata","writable":true},{"name":"sa_wsol_ata","docs":["PumpSwap requires account[5] to be a token account owned by authority_pda","(same owner as user_volume_accumulator). WSOL is deposited here by PumpSwap,","then forwarded to receiver_wsol_ata via a second SPL transfer."],"writable":true},{"name":"receiver_wsol_ata","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"event_authority","address":"GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR"},{"name":"pumpswap_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"}],"args":[]},{"name":"create_token_account","discriminator":[147,241,123,100,244,132,174,118],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"}]},{"name":"create_token_account_with_seed","discriminator":[125,191,239,140,66,8,9,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"},{"kind":"arg","path":"seed"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"},{"name":"seed","type":"u32"}]},{"name":"init_token_ledger","discriminator":[157,116,66,59,137,180,49,157],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"token_ledger","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u8"}]},{"name":"proxy_swap","discriminator":[19,44,130,148,72,56,44,238],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"sa_authority","optional":true,"pda":{"seeds":[{"kind":"const","value":[111,107,120,95,115,97]}]}},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}}]},{"name":"set_token_ledger","discriminator":[228,85,185,112,78,79,77,2],"accounts":[{"name":"token_ledger","writable":true},{"name":"token_account","docs":["SPL / Token-2022 token account to snapshot."]}],"args":[]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}}]},{"name":"swap_tob","discriminator":[170,41,85,177,132,80,31,53],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_enhanced","discriminator":[190,156,169,176,149,154,161,108],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"},{"name":"charge_rate","type":"u16"}]},{"name":"swap_tob_v2","docs":["Used to support commission distribution between parent and child nodes in TOB business"],"discriminator":[72,1,215,242,8,75,54,216],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"parent_commission_account","writable":true},{"name":"child_commission_account","writable":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"total_commission_info","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_with_receiver","discriminator":[223,170,216,234,204,6,241,25],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"sol_receiver","docs":["Optional SOL receiver account","- None: normal swap or SOL stays with payer","- Some: SOL receiver when converting wSOL -> SOL"],"writable":true,"optional":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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_with_receiver_token_ledger","discriminator":[239,93,10,202,161,134,127,130],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"sol_receiver","docs":["Optional SOL receiver account","- None: normal swap or SOL stays with payer","- Some: SOL receiver when converting wSOL -> SOL"],"writable":true,"optional":true},{"name":"token_ledger"},{"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":"args","type":{"defined":{"name":"SwapArgsTokenLedger"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_tob_with_token_ledger","discriminator":[36,92,147,219,26,176,159,90],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"token_ledger"},{"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":"args","type":{"defined":{"name":"SwapArgsTokenLedger"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"trim_rate","type":"u8"}]},{"name":"swap_toc","discriminator":[187,201,212,51,16,155,236,60],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"}]},{"name":"swap_toc_v2","docs":["Used to support commission distribution between parent and child nodes in TOC business"],"discriminator":[127,214,107,189,23,90,47,104],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"parent_commission_account","writable":true},{"name":"child_commission_account","writable":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"total_commission_info","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"platform_fee_rate","type":"u16"}]},{"name":"wrap_unwrap","discriminator":[220,101,139,249,41,190,118,199],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]},{"name":"wrap_unwrap_with_receiver","docs":["Wrap/Unwrap with optional specified receiver","- Wrap (SOL -> WSOL): receiver is WSOL token account (ATA)","- Unwrap (WSOL -> SOL): receiver is system account (EOA)","Transfer amount:","- From fee: amount_in","- To fee: amount_in - fees"],"discriminator":[123,25,47,134,233,167,171,170],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"receiver","docs":["- Wrap: WSOL token account (ATA) to receive WSOL","- Unwrap: System account (EOA) to receive SOL"],"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":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]}],"accounts":[{"name":"TokenLedger","discriminator":[156,247,9,188,54,108,85,77]}],"events":[{"name":"SwapCpiEvent2","discriminator":[21,94,224,53,220,232,193,94]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"SwapTobV2CpiEvent2","discriminator":[244,105,184,90,60,165,36,33]},{"name":"SwapTocV2CpiEvent2","discriminator":[102,16,181,62,201,71,212,41]},{"name":"SwapWithFeesCpiEvent2","discriminator":[12,134,38,93,167,151,42,69]},{"name":"SwapWithFeesCpiEventEnhanced2","discriminator":[84,79,219,247,218,156,219,177]}],"errors":[{"code":6000,"name":"RoutesCannotBeEmpty","msg":"Routes cannot be empty"},{"code":6001,"name":"TooManyRoutes","msg":"Too many routes"},{"code":6002,"name":"MultipleOrNoOutputNode","msg":"Multiple or no output node"},{"code":6003,"name":"MultipleOrNoInputNode","msg":"Multiple or no input node"},{"code":6004,"name":"NotAllNodesProcessed","msg":"Not all nodes are processed"},{"code":6005,"name":"InputIndexShouldStartFromZero","msg":"Input index should start from zero"},{"code":6006,"name":"CircularDependency","msg":"Circular dependency detected in DAG"},{"code":6007,"name":"InvalidWeight","msg":"Invalid weight"},{"code":6008,"name":"InvalidNodeOrder","msg":"Invalid node order"},{"code":6009,"name":"TargetNodeNotFound","msg":"Target node not found"},{"code":6010,"name":"MinReturnNotReached","msg":"Min return not reached"},{"code":6011,"name":"AmountInMustBeGreaterThanZero","msg":"amount_in must be greater than 0"},{"code":6012,"name":"SlippageTooHigh","msg":"slippage must be less than or equal to 100%"},{"code":6013,"name":"InvalidExpectAmountOut","msg":"invalid expect amount out"},{"code":6014,"name":"WeightsMustSumTo100","msg":"weights must sum to 100%"},{"code":6015,"name":"InvalidShareAmount","msg":"Invalid share amount"},{"code":6016,"name":"InvalidCommissionRate","msg":"Invalid commission rate"},{"code":6017,"name":"InvalidParentCommissionRate","msg":"Invalid parent commission rate"},{"code":6018,"name":"InvalidTrimRate","msg":"Invalid trim rate"},{"code":6019,"name":"InvalidChargeRate","msg":"Invalid charge rate"},{"code":6020,"name":"InvalidCommissionTemporaryTokenAccount","msg":"Invalid commission temporary token account"},{"code":6021,"name":"InvalidAccountsLength","msg":"Invalid accounts length"},{"code":6022,"name":"SwapAuthorityIsNotSigner","msg":"Swap authority is not signer"},{"code":6023,"name":"InvalidAuthorityPda","msg":"Invalid authority pda"},{"code":6024,"name":"InvalidSwapAuthority","msg":"Invalid swap authority"},{"code":6025,"name":"InvalidProgramId","msg":"Invalid program id"},{"code":6026,"name":"InvalidPool","msg":"Invalid pool"},{"code":6027,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6028,"name":"CalculationError","msg":"Calculation error"},{"code":6029,"name":"InvalidSanctumLstStateListData","msg":"Invalid sanctum lst state list data"},{"code":6030,"name":"InvalidSanctumLstStateListIndex","msg":"Invalid sanctum lst state list index"},{"code":6031,"name":"InvalidSanctumSwapAccounts","msg":"Invalid sanctum swap accounts"},{"code":6032,"name":"InvalidSwapAuthorityAccount","msg":"Invalid swap authority account"},{"code":6033,"name":"InvalidBridgeSeed","msg":"Bridge Seed Error"},{"code":6034,"name":"InvalidBundleInput","msg":"Invalid accounts and instruction length"},{"code":6035,"name":"InvalidPlatformFeeRate","msg":"Invalid platform fee rate"},{"code":6036,"name":"AmountOutMustBeGreaterThanZero","msg":"Amount out must be greater than 0"},{"code":6037,"name":"InvalidDampingTerm","msg":"Invalid DampingTerm"},{"code":6038,"name":"InvalidMint","msg":"Invalid mint"},{"code":6039,"name":"InvalidPlatformFeeAccount","msg":"Invalid platform fee account"},{"code":6040,"name":"InvalidTrimAccount","msg":"Invalid trim account"},{"code":6041,"name":"InvalidChargeAccount","msg":"Invalid charge account"},{"code":6042,"name":"InvalidPlatformFeeAmount","msg":"Invalid platform fee amount"},{"code":6043,"name":"InvalidFeeTokenAccount","msg":"Invalid fee token account"},{"code":6044,"name":"InvalidSaAuthority","msg":"Invalid sa authority"},{"code":6045,"name":"InvalidNodeFromAccounts","msg":"Invalid node from accounts"},{"code":6046,"name":"InvalidNodeToAccounts","msg":"Invalid node to accounts"},{"code":6047,"name":"InvalidSourceTokenAccount","msg":"Invalid source token account"},{"code":6048,"name":"InvalidTokenAccount","msg":"Invalid token account"},{"code":6049,"name":"InvalidDestinationTokenAccount","msg":"Invalid destination token account"},{"code":6050,"name":"CommissionAccountIsNone","msg":"Commission account is none"},{"code":6051,"name":"PlatformFeeAccountIsNone","msg":"Platform fee account is none"},{"code":6052,"name":"TrimAccountIsNone","msg":"Trim account is none"},{"code":6053,"name":"ChargeAccountIsNone","msg":"Charge account is none"},{"code":6054,"name":"InvalidFeeAccount","msg":"Invalid fee account"},{"code":6055,"name":"InvalidTokenOwner","msg":"Invalid token owner"},{"code":6056,"name":"SaAuthorityIsNone","msg":"Sa authority is none"},{"code":6057,"name":"SourceTokenSaIsNone","msg":"Source token sa is none"},{"code":6058,"name":"SourceTokenProgramIsNone","msg":"Source token program is none"},{"code":6059,"name":"DestinationTokenSaIsNone","msg":"Destination token sa is none"},{"code":6060,"name":"DestinationTokenProgramIsNone","msg":"Destination token program is none"},{"code":6061,"name":"ResultMustBeGreaterThanZero","msg":"Calculation result must be greater than zero"},{"code":6062,"name":"InvalidAccountData","msg":"Invalid account data"},{"code":6063,"name":"InvalidRfqParameters","msg":"Invalid RFQ parameters"},{"code":6064,"name":"TobAuthorityPdaRequired","msg":"TOB mode requires authority PDA"},{"code":6065,"name":"TobWsolSaRequired","msg":"TOB mode with WSOL fees requires wsol_sa account"},{"code":6066,"name":"InvalidWsolSa","msg":"Invalid WSOL SA account"},{"code":6067,"name":"InvalidCommissionAccount","msg":"Invalid commission account"},{"code":6068,"name":"InvalidActualAmountIn","msg":"Invalid actual amount in"},{"code":6069,"name":"UnexpectedSaTokenAccount","msg":"Unexpected SA token account in CPI"},{"code":6070,"name":"InvalidSourceTokenSaMint","msg":"Invalid source token sa mint"},{"code":6071,"name":"InvalidDestinationTokenSaMint","msg":"Invalid destination token sa mint"},{"code":6072,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6073,"name":"SaAuthorityLamportsDecreased","msg":"Sa authority lamports decreased"},{"code":6074,"name":"InvalidTokenProgram","msg":"Invalid token program"},{"code":6075,"name":"InvalidSigner","msg":"Invalid signer"},{"code":6076,"name":"InvalidAssociatedTokenProgram","msg":"Invalid associated token program"},{"code":6077,"name":"TokenProgramIsNone","msg":"Token program is none"},{"code":6078,"name":"AssociatedTokenProgramIsNone","msg":"Associated token program is none"},{"code":6079,"name":"SystemProgramIsNone","msg":"System program is none"},{"code":6080,"name":"InsufficientBalance","msg":"Insufficient balance for transfer"},{"code":6081,"name":"SolReceiverMustBeSystemAccount","msg":"SOL receiver must be a system account"},{"code":6082,"name":"SolReceiverRequiresAccCloseFlag","msg":"SOL receiver requires acc_close_flag to be true"},{"code":6083,"name":"DestinationMustBeWsolForSolReceiver","msg":"Destination must be wSOL when sol_receiver is specified"},{"code":6084,"name":"InvalidGoonfiParameters","msg":"Invalid goonfi parameters"},{"code":6085,"name":"AdapterAbort","msg":"Adapter abort"},{"code":6086,"name":"InconsistentFeeAccountTypes","msg":"Inconsistent fee account types"},{"code":6087,"name":"ReceiverMustBeTokenAccount","msg":"Receiver must be a token account"},{"code":6088,"name":"ReceiverMustBeWsolAccount","msg":"Receiver must be a WSOL token account"},{"code":6089,"name":"InconsistentCommissionAndTrimAccountTypes","msg":"The commission fee account and trim account are different types."},{"code":6090,"name":"NoAvailableNodeIndexForReturnToStart","msg":"No available node index to support returning to START_INDEX"},{"code":6091,"name":"InvalidTokenLedgerTokenAccount","msg":"Invalid token ledger token account"},{"code":6092,"name":"TokenLedgerDeltaCalculationFailure","msg":"Token ledger delta calculation failed"},{"code":6093,"name":"InvalidTokenAccountOwner","msg":"Token account wallet owner mismatch"},{"code":6094,"name":"CashbackFlagMismatch","msg":"Cashback flag mismatch"}],"types":[{"name":"Dex","type":{"kind":"enum","variants":[{"name":"SplTokenSwap"},{"name":"StableSwap"},{"name":"Whirlpool"},{"name":"MeteoraDynamicpool"},{"name":"RaydiumSwap"},{"name":"RaydiumStableSwap"},{"name":"RaydiumClmmSwap"},{"name":"AldrinExchangeV1"},{"name":"AldrinExchangeV2"},{"name":"LifinityV1"},{"name":"LifinityV2"},{"name":"RaydiumClmmSwapV2"},{"name":"FluxBeam"},{"name":"MeteoraDlmm"},{"name":"RaydiumCpmmSwap"},{"name":"OpenBookV2"},{"name":"WhirlpoolV2"},{"name":"Phoenix"},{"name":"ObricV2"},{"name":"SanctumAddLiq"},{"name":"SanctumRemoveLiq"},{"name":"SanctumNonWsolSwap"},{"name":"SanctumWsolSwap"},{"name":"PumpfunBuy","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"PumpfunSell","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"StabbleSwap"},{"name":"SanctumRouter"},{"name":"MeteoraVaultDeposit"},{"name":"MeteoraVaultWithdraw"},{"name":"Saros"},{"name":"MeteoraLst"},{"name":"Solfi"},{"name":"QualiaSwap"},{"name":"Zerofi"},{"name":"PumpfunammBuy","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"PumpfunammSell","fields":[{"name":"is_cash_back","type":"bool"}]},{"name":"Virtuals"},{"name":"VertigoBuy"},{"name":"VertigoSell"},{"name":"PerpetualsAddLiq"},{"name":"PerpetualsRemoveLiq"},{"name":"PerpetualsSwap"},{"name":"RaydiumLaunchpad"},{"name":"LetsBonkFun"},{"name":"Woofi"},{"name":"MeteoraDbc"},{"name":"MeteoraDlmmSwap2"},{"name":"MeteoraDAMMV2"},{"name":"Gavel"},{"name":"BoopfunBuy"},{"name":"BoopfunSell"},{"name":"MeteoraDbc2"},{"name":"GooseFX"},{"name":"Dooar"},{"name":"Numeraire"},{"name":"SaberDecimalWrapperDeposit"},{"name":"SaberDecimalWrapperWithdraw"},{"name":"SarosDlmm"},{"name":"OneDexSwap"},{"name":"Manifest"},{"name":"ByrealClmm"},{"name":"PancakeSwapV3Swap"},{"name":"PancakeSwapV3SwapV2"},{"name":"Tessera"},{"name":"SolRfq","fields":[{"name":"rfq_id","type":"u64"},{"name":"expected_maker_amount","type":"u64"},{"name":"expected_taker_amount","type":"u64"},{"name":"maker_send_amount","type":"u64"},{"name":"taker_send_amount","type":"u64"},{"name":"expiry","type":"u64"},{"name":"maker_use_native_sol","type":"bool"},{"name":"taker_use_native_sol","type":"bool"}]},{"name":"Humidifi"},{"name":"HeavenBuy"},{"name":"HeavenSell"},{"name":"SolfiV2"},{"name":"Goonfi"},{"name":"MoonitBuy"},{"name":"MoonitSell"},{"name":"RaydiumSwapV2"},{"name":"Whalestreet"},{"name":"SugarMoneyBuy","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"SugarMoneySell","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"MeteoraDAMMV2Swap2"},{"name":"AlphaQ"},{"name":"FutarchyAmm"},{"name":"PumpfunBuyV2"},{"name":"PumpfunSellV2"},{"name":"HumidifiSwap2","fields":[{"name":"swap_id","type":"u64"}]},{"name":"Scorch","fields":[{"name":"id","type":"u128"}]},{"name":"JupiterLendDeposit"},{"name":"JupiterLendRedeem"},{"name":"TaurusFi"},{"name":"BisonFi"},{"name":"GoonfiV2"},{"name":"Quantum"},{"name":"BoopfunBuy2"},{"name":"BoopfunSell2"},{"name":"ByrealClmm2"},{"name":"Dooar2"},{"name":"HeavenBuy2"},{"name":"HeavenSell2"},{"name":"MoonitBuy2"},{"name":"MoonitSell2"},{"name":"SaberDecimalWrapperDeposit2"},{"name":"SaberDecimalWrapperWithdraw2"},{"name":"ByrealPropAmm"},{"name":"SanctumPrefundSwapViaStake","fields":[{"name":"swap_id","type":"u64"}]},{"name":"AbyssAmm"},{"name":"Aquifer"},{"name":"WhalestreetV2","fields":[{"name":"auth_amount_in","type":"u64"},{"name":"auth","type":"u64"}]},{"name":"SolfiV2WithSig","fields":[{"name":"unix_timestamp","type":"u64"},{"name":"msg_amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"user_request_slot","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"}]},{"name":"FusionAmm"},{"name":"ScaleAmmBuy"},{"name":"ScaleAmmSell"},{"name":"ScaleVmmBuy"},{"name":"ScaleVmmSell"},{"name":"PumpfunBuy3"},{"name":"PumpfunSell3"},{"name":"PumpfunammBuy2"},{"name":"PumpfunammSell2"},{"name":"Riptide"},{"name":"ZerofiSwapV2"},{"name":"TaurusFiV2"},{"name":"SolRfqV2","fields":[{"name":"taker_side","type":{"defined":{"name":"RfqSide"}}},{"name":"rfq_id","type":"u64"},{"name":"expire_at","type":"i64"},{"name":"levels","type":{"vec":{"defined":{"name":"RfqLevel"}}}}]}]}},{"name":"PlatformFeeWrapUnwrapArgs","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"tob","type":"bool"}]}},{"name":"RfqLevel","type":{"kind":"struct","fields":[{"name":"base_atoms","type":"u64"},{"name":"quote_atoms","type":"u64"}]}},{"name":"RfqSide","repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"Route","type":{"kind":"struct","fields":[{"name":"dex","type":{"defined":{"name":"Dex"}}},{"name":"weight","type":"u16"},{"name":"index","type":"u8"}]}},{"name":"SwapArgs","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"routes","type":{"vec":{"defined":{"name":"Route"}}}}]}},{"name":"SwapArgsTokenLedger","docs":["Swap args for token-ledger swaps: no `amount_in` parameter.","`amount_in` is derived on-chain from `token_ledger` delta."],"type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"routes","type":{"vec":{"defined":{"name":"Route"}}}}]}},{"name":"SwapCpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"dex","type":{"defined":{"name":"Dex"}}},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"SwapTobV2CpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"total_commission_rate","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"parent_commission_amount","type":"u64"},{"name":"parent_commission_account","type":"pubkey"},{"name":"child_commission_rate","type":"u32"},{"name":"child_commission_amount","type":"u64"},{"name":"child_commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"}]}},{"name":"SwapTocV2CpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"total_commission_rate","type":"u32"},{"name":"parent_commission_rate","type":"u32"},{"name":"parent_commission_amount","type":"u64"},{"name":"parent_commission_account","type":"pubkey"},{"name":"child_commission_rate","type":"u32"},{"name":"child_commission_amount","type":"u64"},{"name":"child_commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"}]}},{"name":"SwapWithFeesCpiEvent2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"commission_rate","type":"u32"},{"name":"commission_amount","type":"u64"},{"name":"commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"}]}},{"name":"SwapWithFeesCpiEventEnhanced2","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"commission_rate","type":"u32"},{"name":"commission_amount","type":"u64"},{"name":"commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"},{"name":"charge_rate","type":"u16"},{"name":"charge_amount","type":"u64"},{"name":"charge_account","type":"pubkey"}]}},{"name":"TokenLedger","docs":["Token ledger PDA used to snapshot a token account balance within a transaction.","","Seeds: `[b\"token_ledger\", [index]]`, where `index = 0..=255` (u8)."],"type":{"kind":"struct","fields":[{"name":"token_account","type":"pubkey"},{"name":"amount","type":"u64"}]}}],"constants":[{"name":"SEED_SA","type":"bytes","value":"[111, 107, 120, 95, 115, 97]"}]} \ No newline at end of file diff --git a/idls/okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json b/idls/okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json new file mode 100644 index 0000000..723685a --- /dev/null +++ b/idls/okx_lab_v1.6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma.json @@ -0,0 +1 @@ +{"address":"6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma","metadata":{"name":"dex_solana","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"signer","writable":true,"signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"receiver","writable":true},{"name":"source_token_account","writable":true,"optional":true},{"name":"destination_token_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"address":"HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K"},{"name":"token_mint","optional":true},{"name":"token_program","optional":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_cashback_pumpfun","discriminator":[83,1,245,125,201,207,209,249],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","docs":["PumpFun transfers claimed SOL directly to this account (account[0] in the CPI)."],"writable":true,"address":"HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K"},{"name":"user_volume_accumulator","docs":["Holds native SOL accumulated as cashback; emptied by PumpFun during claim."],"writable":true},{"name":"receiver","docs":["after PumpFun deposits it there."],"writable":true},{"name":"event_authority","address":"Ce6TQqeHC9p8KetsN6JsjHK7UTZk7nasjjnr7XxXp9F1"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pumpfun_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[]},{"name":"claim_cashback_pumpswap","discriminator":[253,242,176,173,217,78,100,25],"accounts":[{"name":"signer","signer":true,"address":"CjoV5B96reuCfPh2rRK11G1QptG97jZdyZArTn3EN1Mj"},{"name":"sa_authority","writable":true,"address":"HV1KXxWFaSeriyFvXyx48FqG9BoFbfinB8njCJonqP7K"},{"name":"user_volume_accumulator","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"spl_token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"uva_wsol_ata","writable":true},{"name":"sa_wsol_ata","docs":["PumpSwap requires account[5] to be a token account owned by authority_pda","(same owner as user_volume_accumulator). WSOL is deposited here by PumpSwap,","then forwarded to receiver_wsol_ata via a second SPL transfer."],"writable":true},{"name":"receiver_wsol_ata","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"event_authority","address":"GS4CU59F31iL7aR2Q8zVS8DRrcRnXX1yjQ66TqNVQnaR"},{"name":"pumpswap_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"}],"args":[]},{"name":"create_token_account","discriminator":[147,241,123,100,244,132,174,118],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"}]},{"name":"create_token_account_with_seed","discriminator":[125,191,239,140,66,8,9,228],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner"},{"name":"token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"token_mint"},{"kind":"account","path":"owner"},{"kind":"arg","path":"seed"}]}},{"name":"token_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"bump","type":"u8"},{"name":"seed","type":"u32"}]},{"name":"proxy_swap","discriminator":[19,44,130,148,72,56,44,238],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"sa_authority","optional":true,"pda":{"seeds":[{"kind":"const","value":[111,107,120,95,115,97]}]}},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"data","type":{"defined":{"name":"SwapArgs"}}},{"name":"order_id","type":"u64"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"}],"args":[{"name":"data","type":{"defined":{"name":"SwapArgs"}}},{"name":"order_id","type":"u64"}]},{"name":"swap_tob_v3","discriminator":[14,191,44,246,142,225,224,157],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"trim_rate","type":"u8"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_tob_v3_enhanced","discriminator":[236,71,155,68,198,98,14,118],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"trim_rate","type":"u8"},{"name":"charge_rate","type":"u16"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_tob_v3_with_receiver","docs":["Swap ToB with optional specified receiver","- For normal token swaps: sol_receiver should be None","- For swap to SOL with custom receiver: sol_receiver should be Some and acc_close_flag must be true"],"discriminator":[63,114,246,131,51,2,247,29],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"name":"sol_receiver","docs":["Optional SOL receiver account","- None: normal swap or SOL stays with payer","- Some: SOL receiver when converting wSOL -> SOL"],"writable":true,"optional":true}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"trim_rate","type":"u8"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_v3","discriminator":[240,224,38,33,176,31,241,175],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"swap_v3_with_cpi_event","discriminator":[184,104,79,156,107,182,120,138],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"source_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"source_mint"},{"name":"destination_mint"},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"sa_authority","writable":true,"optional":true},{"name":"source_token_sa","writable":true,"optional":true},{"name":"destination_token_sa","writable":true,"optional":true},{"name":"source_token_program","optional":true},{"name":"destination_token_program","optional":true},{"name":"associated_token_program","optional":true,"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","optional":true,"address":"11111111111111111111111111111111"},{"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":"args","type":{"defined":{"name":"SwapArgs"}}},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"order_id","type":"u64"}]},{"name":"wrap_unwrap_v3","discriminator":[180,178,191,54,70,8,13,224],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]},{"name":"wrap_unwrap_v3_with_receiver","docs":["Wrap/Unwrap with optional specified receiver","- Wrap (SOL -> WSOL): receiver is WSOL token account (ATA)","- Unwrap (WSOL -> SOL): receiver is system account (EOA)","Transfer amount:","- From fee: amount_in","- To fee: amount_in - fees"],"discriminator":[70,211,190,165,47,40,213,95],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"payer_wsol_account","writable":true},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"temp_wsol_account","writable":true,"optional":true,"pda":{"seeds":[{"kind":"const","value":[116,101,109,112,95,119,115,111,108]},{"kind":"account","path":"payer"}]}},{"name":"commission_account","writable":true,"optional":true},{"name":"platform_fee_account","writable":true,"optional":true},{"name":"authority_pda","docs":["Used for signing fee transfers from authority_pda (SOL) or wsol_sa (WSOL)"],"writable":true,"optional":true},{"name":"wsol_sa","docs":["This is the authority_pda's associated token account for WSOL"],"writable":true,"optional":true},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"receiver","docs":["- Wrap: WSOL token account (ATA) to receive WSOL","- Unwrap: System account (EOA) to receive SOL"],"writable":true}],"args":[{"name":"args","type":{"defined":{"name":"PlatformFeeWrapUnwrapArgs"}}}]}],"events":[{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"SwapWithFeesCpiEvent","discriminator":[189,97,67,12,37,209,247,29]}],"errors":[{"code":6000,"name":"TooManyHops","msg":"Too many hops"},{"code":6001,"name":"MinReturnNotReached","msg":"Min return not reached"},{"code":6002,"name":"AmountInMustBeGreaterThanZero","msg":"amount_in must be greater than 0"},{"code":6003,"name":"InvalidExpectAmountOut","msg":"invalid expect amount out"},{"code":6004,"name":"AmountsAndRoutesMustHaveTheSameLength","msg":"amounts and routes must have the same length"},{"code":6005,"name":"TotalAmountsMustBeEqualToAmountIn","msg":"total_amounts must be equal to amount_in"},{"code":6006,"name":"DexesAndWeightsMustHaveTheSameLength","msg":"dexes and weights must have the same length"},{"code":6007,"name":"WeightsMustSumTo100","msg":"weights must sum to 100"},{"code":6008,"name":"InvalidSourceTokenAccount","msg":"Invalid source token account"},{"code":6009,"name":"InvalidDestinationTokenAccount","msg":"Invalid destination token account"},{"code":6010,"name":"InvalidTokenAccount","msg":"Invalid token account"},{"code":6011,"name":"InvalidCommissionRate","msg":"Invalid commission rate"},{"code":6012,"name":"InvalidTrimRate","msg":"Invalid trim rate"},{"code":6013,"name":"InvalidChargeRate","msg":"Invalid charge rate"},{"code":6014,"name":"InvalidCommissionTokenAccount","msg":"Invalid commission token account"},{"code":6015,"name":"InvalidCommissionTemporaryTokenAccount","msg":"Invalid commission temporary token account"},{"code":6016,"name":"InvalidAccountsLength","msg":"Invalid accounts length"},{"code":6017,"name":"InvalidHopAccounts","msg":"Invalid hop accounts"},{"code":6018,"name":"InvalidHopFromAccount","msg":"Invalid hop from account"},{"code":6019,"name":"SwapAuthorityIsNotSigner","msg":"Swap authority is not signer"},{"code":6020,"name":"InvalidAuthorityPda","msg":"Invalid authority pda"},{"code":6021,"name":"InvalidSwapAuthority","msg":"Invalid swap authority"},{"code":6022,"name":"InvalidProgramId","msg":"Invalid program id"},{"code":6023,"name":"InvalidPool","msg":"Invalid pool"},{"code":6024,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6025,"name":"CalculationError","msg":"Calculation error"},{"code":6026,"name":"InvalidSanctumLstStateListData","msg":"Invalid sanctum lst state list data"},{"code":6027,"name":"InvalidSanctumLstStateListIndex","msg":"Invalid sanctum lst state list index"},{"code":6028,"name":"InvalidSanctumSwapAccounts","msg":"Invalid sanctum swap accounts"},{"code":6029,"name":"InvalidSwapAuthorityAccounts","msg":"Invalid swap authority account"},{"code":6030,"name":"InvalidBridgeSeed","msg":"Bridge Seed Error"},{"code":6031,"name":"InvalidBundleInput","msg":"Invalid accounts and instruction length"},{"code":6032,"name":"MissingSaAccount","msg":"SA is required"},{"code":6033,"name":"InvalidPlatformFeeRate","msg":"Invalid platform fee rate"},{"code":6034,"name":"AmountOutMustBeGreaterThanZero","msg":"Amount out must be greater than 0"},{"code":6035,"name":"InvalidDampingTerm","msg":"Invalid DampingTerm"},{"code":6036,"name":"InvalidMint","msg":"Invalid mint"},{"code":6037,"name":"InvalidPlatformFeeAmount","msg":"Invalid platform fee amount"},{"code":6038,"name":"InvalidFeeTokenAccount","msg":"Invalid fee token account"},{"code":6039,"name":"InvalidSaAuthority","msg":"Invalid sa authority"},{"code":6040,"name":"CommissionAccountIsNone","msg":"Commission account is none"},{"code":6041,"name":"PlatformFeeAccountIsNone","msg":"Platform fee account is none"},{"code":6042,"name":"TrimAccountIsNone","msg":"Trim account is none"},{"code":6043,"name":"ChargeAccountIsNone","msg":"Charge account is none"},{"code":6044,"name":"InvalidFeeAccount","msg":"Invalid fee account"},{"code":6045,"name":"InvalidSourceTokenSa","msg":"Invalid source token sa"},{"code":6046,"name":"SaAuthorityIsNone","msg":"Sa authority is none"},{"code":6047,"name":"SourceTokenSaIsNone","msg":"Source token sa is none"},{"code":6048,"name":"SourceTokenProgramIsNone","msg":"Source token program is none"},{"code":6049,"name":"DestinationTokenSaIsNone","msg":"Destination token sa is none"},{"code":6050,"name":"DestinationTokenProgramIsNone","msg":"Destination token program is none"},{"code":6051,"name":"ResultMustBeGreaterThanZero","msg":"Calculation result must be greater than zero"},{"code":6052,"name":"InvalidAccountData","msg":"Invalid account data"},{"code":6053,"name":"InvalidRfqParameters","msg":"Invalid RFQ parameters"},{"code":6054,"name":"TobAuthorityPdaRequired","msg":"TOB mode requires authority PDA"},{"code":6055,"name":"TobWsolSaRequired","msg":"TOB mode with WSOL fees requires wsol_sa account"},{"code":6056,"name":"InvalidWsolSa","msg":"Invalid WSOL SA account"},{"code":6057,"name":"InvalidTrimAccount","msg":"Invalid trim account"},{"code":6058,"name":"InvalidChargeAccount","msg":"Invalid charge account"},{"code":6059,"name":"InvalidCommissionAccount","msg":"Invalid commission account"},{"code":6060,"name":"InvalidPlatformFeeAccount","msg":"Invalid platform fee account"},{"code":6061,"name":"InvalidActualAmountIn","msg":"Invalid actual amount in"},{"code":6062,"name":"UnexpectedSaTokenAccount","msg":"Unexpected SA token account in CPI"},{"code":6063,"name":"InvalidSourceTokenSaMint","msg":"Invalid source token sa mint"},{"code":6064,"name":"InvalidDestinationTokenSaMint","msg":"Invalid destination token sa mint"},{"code":6065,"name":"AdapterAbort","msg":"Adapter abort"},{"code":6066,"name":"InsufficientFunds","msg":"Insufficient funds"},{"code":6067,"name":"InvalidDiffLamports","msg":"Invalid diff lamports"},{"code":6068,"name":"InvalidTokenProgram","msg":"Invalid token program"},{"code":6069,"name":"InvalidSigner","msg":"Invalid signer"},{"code":6070,"name":"InvalidAssociatedTokenProgram","msg":"Invalid associated token program"},{"code":6071,"name":"SolReceiverMustBeSystemAccount","msg":"SOL receiver must be a system account"},{"code":6072,"name":"InsufficientBalance","msg":"Insufficient balance for transfer"},{"code":6073,"name":"SolReceiverRequiresAccCloseFlag","msg":"SOL receiver requires acc_close_flag to be true"},{"code":6074,"name":"DestinationMustBeWsolForSolReceiver","msg":"Destination must be wSOL when sol_receiver is specified"},{"code":6075,"name":"InvalidGoonfiParameters","msg":"Invalid Goonfi parameters"},{"code":6076,"name":"InvalidTrimAmount","msg":"Invalid trim amount"},{"code":6077,"name":"ReceiverMustBeTokenAccount","msg":"Receiver must be a token account for wrap operation"},{"code":6078,"name":"ReceiverMustBeWsolAccount","msg":"Receiver must be a WSOL token account for wrap operation"},{"code":6079,"name":"TokenProgramIsNone","msg":"Token program is none"},{"code":6080,"name":"AssociatedTokenProgramIsNone","msg":"Associated token program is none"},{"code":6081,"name":"SystemProgramIsNone","msg":"System program is none"}],"types":[{"name":"Dex","type":{"kind":"enum","variants":[{"name":"SplTokenSwap"},{"name":"StableSwap"},{"name":"Whirlpool"},{"name":"MeteoraDynamicpool"},{"name":"RaydiumSwap"},{"name":"RaydiumStableSwap"},{"name":"RaydiumClmmSwap"},{"name":"AldrinExchangeV1"},{"name":"AldrinExchangeV2"},{"name":"LifinityV1"},{"name":"LifinityV2"},{"name":"RaydiumClmmSwapV2"},{"name":"FluxBeam"},{"name":"MeteoraDlmm"},{"name":"RaydiumCpmmSwap"},{"name":"OpenBookV2"},{"name":"WhirlpoolV2"},{"name":"Phoenix"},{"name":"ObricV2"},{"name":"SanctumAddLiq"},{"name":"SanctumRemoveLiq"},{"name":"SanctumNonWsolSwap"},{"name":"SanctumWsolSwap"},{"name":"PumpfunBuy"},{"name":"PumpfunSell"},{"name":"StabbleSwap"},{"name":"SanctumRouter"},{"name":"MeteoraVaultDeposit"},{"name":"MeteoraVaultWithdraw"},{"name":"Saros"},{"name":"MeteoraLst"},{"name":"Solfi"},{"name":"QualiaSwap"},{"name":"Zerofi"},{"name":"PumpfunammBuy"},{"name":"PumpfunammSell"},{"name":"Virtuals"},{"name":"VertigoBuy"},{"name":"VertigoSell"},{"name":"PerpetualsAddLiq"},{"name":"PerpetualsRemoveLiq"},{"name":"PerpetualsSwap"},{"name":"RaydiumLaunchpad"},{"name":"LetsBonkFun"},{"name":"Woofi"},{"name":"MeteoraDbc"},{"name":"MeteoraDlmmSwap2"},{"name":"MeteoraDAMMV2"},{"name":"Gavel"},{"name":"BoopfunBuy"},{"name":"BoopfunSell"},{"name":"MeteoraDbc2"},{"name":"GooseFX"},{"name":"Dooar"},{"name":"Numeraire"},{"name":"SaberDecimalWrapperDeposit"},{"name":"SaberDecimalWrapperWithdraw"},{"name":"SarosDlmm"},{"name":"OneDexSwap"},{"name":"Manifest"},{"name":"ByrealClmm"},{"name":"PancakeSwapV3Swap"},{"name":"PancakeSwapV3SwapV2"},{"name":"Tessera"},{"name":"SolRfq","fields":[{"name":"rfq_id","type":"u64"},{"name":"expected_maker_amount","type":"u64"},{"name":"expected_taker_amount","type":"u64"},{"name":"maker_send_amount","type":"u64"},{"name":"taker_send_amount","type":"u64"},{"name":"expiry","type":"u64"},{"name":"maker_use_native_sol","type":"bool"},{"name":"taker_use_native_sol","type":"bool"}]},{"name":"PumpfunBuy2"},{"name":"PumpfunammBuy2"},{"name":"Humidifi"},{"name":"HeavenBuy"},{"name":"HeavenSell"},{"name":"SolfiV2"},{"name":"PumpfunBuy3"},{"name":"PumpfunSell3"},{"name":"PumpfunammBuy3"},{"name":"PumpfunammSell3"},{"name":"Goonfi"},{"name":"MoonitBuy"},{"name":"MoonitSell"},{"name":"RaydiumSwapV2"},{"name":"Whalestreet"},{"name":"SugarMoneyBuy","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"SugarMoneySell","fields":[{"name":"bonding_curve_bump","type":"u8"},{"name":"bonding_curve_sol_associated_account_bump","type":"u8"}]},{"name":"MeteoraDAMMV2Swap2"},{"name":"AlphaQ"},{"name":"FutarchyAmm"},{"name":"PumpfunSell2"},{"name":"HumidifiSwap2","fields":[{"name":"swap_id","type":"u64"}]},{"name":"Scorch","fields":[{"name":"id","type":"u128"}]},{"name":"JupiterLendDeposit"},{"name":"JupiterLendRedeem"},{"name":"TaurusFi"},{"name":"BisonFi"},{"name":"GoonfiV2"},{"name":"Quantum"},{"name":"BoopfunBuy2"},{"name":"BoopfunSell2"},{"name":"ByrealClmm2"},{"name":"Dooar2"},{"name":"HeavenBuy2"},{"name":"HeavenSell2"},{"name":"MoonitBuy2"},{"name":"MoonitSell2"},{"name":"SaberDecimalWrapperDeposit2"},{"name":"SaberDecimalWrapperWithdraw2"},{"name":"ByrealPropAmm"},{"name":"SanctumPrefundSwapViaStake","fields":[{"name":"swap_id","type":"u64"}]},{"name":"AbyssAmm"},{"name":"Aquifer"},{"name":"WhalestreetV2","fields":[{"name":"auth_amount_in","type":"u64"},{"name":"auth","type":"u64"}]},{"name":"SolfiV2WithSig","fields":[{"name":"unix_timestamp","type":"u64"},{"name":"msg_amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"slippage","type":"u16"},{"name":"user_request_slot","type":"u64"},{"name":"signature","type":{"array":["u8",64]}},{"name":"recovery_id","type":"u8"}]}]}},{"name":"PlatformFeeWrapUnwrapArgs","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"commission_info","type":"u32"},{"name":"platform_fee_rate","type":"u16"},{"name":"tob","type":"bool"}]}},{"name":"Route","type":{"kind":"struct","fields":[{"name":"dexes","type":{"vec":{"defined":{"name":"Dex"}}}},{"name":"weights","type":"bytes"}]}},{"name":"SwapArgs","type":{"kind":"struct","fields":[{"name":"amount_in","type":"u64"},{"name":"expect_amount_out","type":"u64"},{"name":"min_return","type":"u64"},{"name":"amounts","type":{"vec":"u64"}},{"name":"routes","type":{"vec":{"vec":{"defined":{"name":"Route"}}}}}]}},{"name":"SwapEvent","type":{"kind":"struct","fields":[{"name":"dex","type":{"defined":{"name":"Dex"}}},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]}},{"name":"SwapWithFeesCpiEvent","type":{"kind":"struct","fields":[{"name":"order_id","type":"u64"},{"name":"source_mint","type":"pubkey"},{"name":"destination_mint","type":"pubkey"},{"name":"source_token_account_owner","type":"pubkey"},{"name":"destination_token_account_owner","type":"pubkey"},{"name":"amount_in","type":"u64"},{"name":"source_token_change","type":"u64"},{"name":"destination_token_change","type":"u64"},{"name":"commission_direction","type":"bool"},{"name":"commission_rate","type":"u32"},{"name":"commission_amount","type":"u64"},{"name":"commission_account","type":"pubkey"},{"name":"platform_fee_rate","type":"u16"},{"name":"platform_fee_amount","type":"u64"},{"name":"platform_fee_account","type":"pubkey"},{"name":"trim_rate","type":"u8"},{"name":"trim_amount","type":"u64"},{"name":"trim_account","type":"pubkey"}]}}],"constants":[{"name":"SEED_SA","type":"bytes","value":"[111, 107, 120, 95, 115, 97]"}]} \ No newline at end of file diff --git a/idls/ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json b/idls/ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json new file mode 100644 index 0000000..c58d355 --- /dev/null +++ b/idls/ondo_gm.XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm.json @@ -0,0 +1 @@ +{"address":"XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm","metadata":{"name":"ondo_gm","version":"0.1.0","spec":"0.1.0","description":"Ondo Finance Global Markets"},"instructions":[{"name":"add_to_whitelist","docs":["Add an address to the whitelist","Signer must have the ADMIN_ROLE_WHITELIST role"],"discriminator":[157,211,52,54,144,81,5,55],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account that has the authority to add an address to the whitelist"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_WHITELIST` role","# PDA Seeds","- ADMIN_ROLE_WHITELIST","- The authority's address",""],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,87,104,105,116,101,108,105,115,116]},{"kind":"account","path":"authority"}]}},{"name":"whitelist","docs":["The Whitelist account being created","# PDA Seeds","- WHITELIST_SEED","- Address being whitelisted"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"arg","path":"address_to_whitelist"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"address_to_whitelist","type":"pubkey"}]},{"name":"batch_close_attestation_accounts","docs":["Batch close attestation accounts","","Accounts to close are passed via remaining_accounts, constraints:","1. Accounts must be marked writable","2. No other accounts should present in `remaining_accounts`","3. Each attestation account must be created by the recipient","4. Each attestation must be older than 30 seconds","Unpermissioned"],"discriminator":[73,167,240,82,80,48,205,207],"accounts":[{"name":"closer","docs":["The user closing the attestation accounts"],"signer":true},{"name":"recipient","docs":["The recipient of the lamports from closed attestation accounts","Must be the creator of each attestation"],"writable":true},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"burn_usdon","docs":["Burn USDon tokens (admin function)","Signer must have the BURNER_ROLE_USDON role"],"discriminator":[173,55,240,198,34,223,191,82],"accounts":[{"name":"authority","docs":["The account with the authority to burn USDon tokens"],"writable":true,"signer":true},{"name":"permanent_delegate","docs":["The permanent delegate PDA (also the mint authority)","# PDA Seeds","- MINT_AUTHORITY_SEED",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"usdon_manager_state","docs":["The USDonManagerState account containing USDon configuration","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has either the `BURNER_ROLE_USDON` role","or the `ADMIN_ROLE_USDON` role","# PDA Seeds","- Role seed (from the account's role field)","- The authority's address"],"pda":{"seeds":[{"kind":"account","path":"authority_role_account.role","account":"Roles"},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The USDon mint"],"writable":true},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"destination","docs":["The token account to burn tokens from"],"writable":true}],"args":[{"name":"amount","type":"u64"}]},{"name":"close_attestation_account","docs":["Close a single attestation account","","The attestation account must be older than 30 seconds to be closed.","The rent from the closed account is returned to the recipient (original creator).","Unpermissioned"],"discriminator":[201,34,214,89,249,220,97,101],"accounts":[{"name":"closer","docs":["The user closing the attestation account"],"signer":true},{"name":"attestation","docs":["The attestation account to close","# PDA Seeds","- ATTESTATION_ID_SEED","- _attestation_id"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"_attestation_id"}]}},{"name":"recipient","docs":["The recipient of the lamports from the closed attestation account","Must be the creator of the attestation",""],"writable":true},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"_attestation_id","type":{"array":["u8",16]}}]},{"name":"enable_oracle_price","docs":["Enable or disable oracle price for USDon","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[31,98,115,216,241,185,41,109],"accounts":[{"name":"authority","docs":["The account with the authority to execute the operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account to be modified","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"is_enabled","type":"bool"}]},{"name":"grant_gmtoken_factory_role","docs":["Grants the specified GM Token Factory role to the user","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[219,108,46,79,46,104,74,179],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant a GM Token Factory role"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_gmtoken_manager_role","docs":["Grant a GM Token Manager role","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[245,248,145,72,159,93,154,176],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant GM Token Manager roles"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_GMTOKEN_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_gmtoken_role","docs":["Grants the specified GMToken role to the user","Signer must have the ADMIN_ROLE_GMTOKEN role"],"discriminator":[80,114,198,5,12,2,84,105],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant GM Token roles"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN` role","# PDA Seeds","- ADMIN_ROLE_GMTOKEN","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new Roles account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_role","docs":["Grants the specified role to a user","The signer must be the upgrade authority of the program"],"discriminator":[218,234,128,15,82,33,236,253],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant roles, must be the program upgrade authority"],"signer":true},{"name":"role_to_grant","docs":["The Roles account to be initialized","# PDA Seeds","- The role seed (from RoleType)","- The user's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"program","docs":["The Ondo Global Markets program"],"address":"XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm"},{"name":"program_data","docs":["The ProgramData account of the Ondo Global Markets program"]}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_sanity_configurer_role","docs":["Grant a configurer role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[22,112,48,145,46,77,61,33],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant the configurer role"],"signer":true},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `ADMIN_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_sanity_setter_role","docs":["Grant a setter role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[209,154,110,150,18,113,63,227],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant the setter role"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `RoleType::ADMIN_ROLE_ONDO_SANITY_CHECK`","- `authority` (the authority's address)"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The role account to be initialized for the user","# PDA Seeds","- `role.seed()` (the seed for the setter role)","- `user` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"grant_usdon_role","docs":["Grants the specified USDon role to a user","Signer must have the GUARDIAN_USDON role"],"discriminator":[107,112,6,81,156,182,208,9],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to grant the role"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `GUARDIAN_USDON` role","# PDA Seeds","- GUARDIAN_USDON","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[71,117,97,114,100,105,97,110,85,83,68,111,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_grant","docs":["The new `Roles` account being created for the user","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"role"},{"kind":"arg","path":"user"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"user","type":"pubkey"}]},{"name":"init_mint","docs":["Initialize a new GM token mint (without permanent delegate)","Signer must have the DEPLOYER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[126,176,233,16,66,117,209,125],"accounts":[{"name":"payer","docs":["The payer account funding the mint account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to deploy new GM tokens"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the user has `DEPLOYER_ROLE_GMTOKEN_FACTORY`","# PDA Seeds","- `DEPLOYER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[68,101,112,108,111,121,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The new mint account to be initialized",""],"writable":true,"signer":true},{"name":"mint_authority","docs":["The mint authority PDA that will control the mint","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account containing factory configuration","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"freeze_authority","type":"pubkey"}]},{"name":"init_mint_delegate","docs":["Initialize a new token mint with permanent delegate (for USDon)","Signer must have the DEPLOYER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[66,23,77,148,164,53,165,83],"accounts":[{"name":"payer","docs":["The payer account funding the mint account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to deploy new tokens"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `DEPLOYER_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `DEPLOYER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[68,101,112,108,111,121,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The new mint account to be initialized with permanent delegate",""],"writable":true,"signer":true},{"name":"mint_authority","docs":["The mint authority PDA that will control the mint and act as permanent delegate","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account containing factory configuration","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"freeze_authority","type":"pubkey"}]},{"name":"initialize_gmtoken_manager","docs":["Initialize the GM token manager state","","Sets up the manager with pause states for factory, redemptions, and minting,","and configures the secp256k1 attestation signer address.","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[118,57,145,134,233,31,145,47],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize the GM Token Manager"],"signer":true},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be initialized","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"factory_paused","type":"bool"},{"name":"redemptions_paused","type":"bool"},{"name":"minting_paused","type":"bool"},{"name":"attestation_signer_secp","type":{"array":["u8",20]}},{"name":"trading_hours_offset","type":"i64"}]},{"name":"initialize_sanity_check","docs":["Initialize sanity check parameters for a token","","Sets up price deviation and time delay checks to ensure safe trading.","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[99,169,10,74,68,74,22,72],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize the sanity check"],"signer":true},{"name":"sanity_check","docs":["The sanity check account to be initialized","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- `mint` (the mint address of the GM Token for which the sanity check is being initialized)"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `RoleType::ADMIN_ROLE_ONDO_SANITY_CHECK`","- `authority` (the authority's address)"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint for which the sanity check is being initialized"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"last_price","type":"u64"},{"name":"allowed_deviation_bps","type":"u64"},{"name":"max_time_delay","type":"i64"}]},{"name":"initialize_token_limit","docs":["Initialize token-level rate limits","","Sets rate limits for the token and default limits for users trading this token.","Signer must have the DEPLOYER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[187,218,162,146,4,49,163,240],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize token limit accounts"],"signer":true},{"name":"mint","docs":["The GM Token or USDon mint"]},{"name":"token_limit","docs":["The `TokenLimit` account to be initialized","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `DEPLOYER_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `DEPLOYER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[68,101,112,108,111,121,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"default_user_rate_limit","type":{"option":"u64"}},{"name":"default_limit_window","type":{"option":"u64"}}]},{"name":"initialize_usdon_manager","docs":["Initialize the USDon manager state","","Sets up the manager with the USDon mint, initial price, oracle configuration,","and vault addresses for USDC and USDon tokens.","Signer must have the GUARDIAN_USDON role"],"discriminator":[9,32,232,105,2,166,13,47],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize the USDon Manager"],"signer":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"usdon_mint","docs":["The USDon mint account","Must be initialized with mint authority as `mint_authority`","and use the token-2022 program"]},{"name":"usdon_vault","docs":["The USDon vault token account","Must be the ATA for `usdon_mint` owned by `usdon_manager_state`"],"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"const","value":[6,221,246,225,238,117,143,222,24,66,93,188,228,108,205,218,182,26,252,77,131,185,13,39,254,189,249,40,216,161,139,252]},{"kind":"account","path":"usdon_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdc_vault","docs":["The USDC vault token account","Must be the ATA for USDC mint owned by `usdon_manager_state`"],"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[198,250,122,243,190,219,173,58,61,101,243,106,171,201,116,49,177,187,228,194,210,246,224,228,124,166,2,3,69,47,93,97]}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdon_manager_state","docs":["The USDonManagerState account to be initialized","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `GUARDIAN_USDON` role","# PDA Seeds","- GUARDIAN_USDON","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[71,117,97,114,100,105,97,110,85,83,68,111,110]},{"kind":"account","path":"authority"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"oracle_price_enabled","type":"bool"},{"name":"oracle_price_max_age","type":"u64"},{"name":"usdc_price_update_address","type":"pubkey"}]},{"name":"initialize_user","docs":["Initialize a user account with optional rate limits"],"discriminator":[111,17,185,250,60,122,38,254],"accounts":[{"name":"payer","docs":["Pays for account creation"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to initialize an `OndoUser` account"],"signer":true},{"name":"user","docs":["The user for whom the OndoUser account is being initialized"]},{"name":"mint","docs":["The GM Token mint associated with the OndoUser account"]},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"ondo_user","docs":["The `OndoUser` account to be initialized","# PDA seeds:","- `ONDO_USER_SEED`","- User's address,","- The GM Token's mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}}]},{"name":"mint_gm","docs":["Mint GM tokens directly (admin function)","Signer must have the MINTER_ROLE_GMTOKEN role"],"discriminator":[117,223,58,111,44,36,16,43],"accounts":[{"name":"payer","docs":["Pays for destination account if needed"],"writable":true,"signer":true},{"name":"authority","docs":["The account with the authority to mint GM Tokens,"],"signer":true},{"name":"user","docs":["The user receiving the minted tokens"]},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `MINTER_ROLE_GMTOKEN` role","# PDA Seeds","- `MINTER_ROLE_GMTOKEN`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[77,105,110,116,101,114,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"oracle_sanity_check","docs":["The `OracleSanityCheck` account validating oracle price updates","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","docs":["The GM Token mint to mint from"],"writable":true,"relations":["oracle_sanity_check"]},{"name":"destination","docs":["The destination token account to mint tokens to"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdon_manager_state","docs":["The `USDonManagerState` account for validation","# PDA Seeds","- `USDON_MANAGER_STATE_SEED`"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"amount","type":"u64"}]},{"name":"mint_usdon","docs":["Mint USDon tokens (admin function)","Signer must have the MINTER_ROLE_USDON role"],"discriminator":[178,178,234,133,225,144,48,129],"accounts":[{"name":"authority","docs":["The account with the authority to mint USDon tokens"],"writable":true,"signer":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"usdon_manager_state","docs":["The USDonManagerState account containing USDon configuration","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has either the `MINTER_ROLE_USDON`","or `ADMIN_ROLE_USDON` role","# PDA Seeds","- Role seed (from the account's role field)","- The authority's address"],"pda":{"seeds":[{"kind":"account","path":"authority_role_account.role","account":"Roles"},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The USDon mint"],"writable":true},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"destination","docs":["The destination token account to mint tokens to"],"writable":true}],"args":[{"name":"amount","type":"u64"}]},{"name":"mint_with_usdc","docs":["Mint GM tokens by paying with USDC","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[128,28,133,173,71,142,185,206],"accounts":[{"name":"user","docs":["The user performing the USDC swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"spl_token_program","docs":["The legacy SPL Token program","Required when performing swaps between USDC and USDon tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"usdc_price_update","docs":["The oracle price update account for USDC/USD price feed","Provides real-time price data for USDC token","Used in swap operations to calculate exchange rates","Must be recent (within oracle_price_max_age) to ensure price accuracy","`has_one` ensures that this account matches the expected oracle account stored in the `usdon_manager_state`."],"relations":["usdon_manager_state"]},{"name":"usdc_vault","docs":["The USDC vault storing USDC tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"spl_token_program"},{"kind":"account","path":"usdc_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdc_mint"},{"name":"user_usdc_token_account","docs":["The user's USDC token account"],"writable":true},{"name":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"mint_with_usdon","docs":["Mint GM tokens by paying with USDon","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[25,116,92,45,43,188,95,58],"accounts":[{"name":"user","docs":["The user performing the USDon swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"pause_global_minting","docs":["Pause all mints globally","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[191,70,149,85,20,141,242,239],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_global_minting_admin","docs":["Pause minting globally (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[20,43,34,201,214,148,151,75],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_global_redemption","docs":["Pause all redemption globally","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[169,5,1,19,183,71,133,147],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_global_redemption_admin","docs":["Pause redemption globally (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[77,80,68,48,7,94,111,183],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_token","docs":["Pause all transfers for a GM token by invoking the pausable token extension","Signer must have the PAUSER_ROLE_GMTOKEN role"],"discriminator":[226,150,72,211,159,51,226,39],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"writable":true,"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint to pause"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA that has pausable authority","# PDA Seeds","- MINT_AUTHORITY_SEED",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","docs":["The token program (Token-2022)"]}],"args":[]},{"name":"pause_token_factory","docs":["Pause the GM token factory","Signer must have the PAUSER_ROLE_GMTOKEN_FACTORY role"],"discriminator":[79,227,221,11,182,89,193,150],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_token_factory_admin","docs":["Pause the GM token factory (admin version)","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[244,155,26,17,39,152,51,18],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"pause_token_minting","docs":["Pause minting for a specific token","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[105,219,64,183,163,148,17,126],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"pause_token_minting_admin","docs":["Pause mints for a specific token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[8,3,163,16,201,93,94,145],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"pause_token_redemption","docs":["Pause redemptions for a specific token","Signer must have the PAUSER_ROLE_GMTOKEN_MANAGER role"],"discriminator":[232,134,32,8,70,234,54,216],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `PAUSER_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `PAUSER_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[80,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"pause_token_redemption_admin","docs":["Pause redemptions for a specific token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[62,162,192,223,22,143,110,191],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"redeem_for_usdc","docs":["Redeem GM tokens for USDC","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[150,9,215,220,255,157,74,78],"accounts":[{"name":"user","docs":["The user performing the USDC swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"spl_token_program","docs":["The legacy SPL Token program","Required when performing swaps between USDC and USDon tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"usdc_price_update","docs":["The oracle price update account for USDC/USD price feed","Provides real-time price data for USDC token","Used in swap operations to calculate exchange rates","Must be recent (within oracle_price_max_age) to ensure price accuracy","`has_one` ensures that this account matches the expected oracle account stored in the `usdon_manager_state`."],"relations":["usdon_manager_state"]},{"name":"usdc_vault","docs":["The USDC vault storing USDC tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"spl_token_program"},{"kind":"account","path":"usdc_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdc_mint"},{"name":"user_usdc_token_account","docs":["The user's USDC token account"],"writable":true},{"name":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"redeem_for_usdon","docs":["Redeem GM tokens for USDon","","Requires a valid attestation with price, amount, and expiration."],"discriminator":[231,121,93,33,143,252,82,13],"accounts":[{"name":"user","docs":["The user performing the USDon swap, pays for account creation if needed"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token mint involved in the swap"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA","# PDA Seeds","- MINT_AUTHORITY_SEED","Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"ondo_user","docs":["The OndoUser account tracking user-specific state for this mint","# PDA Seeds","- ONDO_USER_SEED","- User's address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"user"},{"kind":"account","path":"mint"}]}},{"name":"token_limit_account","docs":["The TokenLimit account enforcing mint/burn limits for the GM Token","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"sanity_check_account","docs":["The OracleSanityCheck account validating oracle price updates","# PDA Seeds","- ORACLE_SANITY_CHECK_SEED","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}},{"name":"user_token_account","docs":["The user's associated token account for the GM Token"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"attestation_id_account","docs":["The attestation ID account preventing attestation reuse","# PDA Seeds","- ATTESTATION_ID_SEED","- Attestation ID (16-byte array)","Existence means the attestation has been used."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,116,116,101,115,116,97,116,105,111,110,95,105,100]},{"kind":"arg","path":"attestation_id"}]}},{"name":"whitelist","docs":["The Whitelist account verifying the user is authorized","# PDA Seeds","- WHITELIST_SEED","- User's address","Validated in instruction handler - returns UserNotWhitelisted if not initialized."],"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"account","path":"user"}]}},{"name":"token_program","docs":["The token program (Token-2022)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["The associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"usdon_vault","docs":["The USDon vault storing USDon tokens received from users during swaps"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"usdon_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"usdon_mint","docs":["The USDon mint (Token-2022)"],"writable":true},{"name":"user_usdon_token_account","docs":["The user's USDon token account"],"writable":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account managing GM Token operations","- Stores protocol parameters like factory, redemption, and minting paused.","# PDA Seeds","- GMTOKEN_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}},{"name":"instructions","address":"Sysvar1nstructions1111111111111111111111111"},{"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":"attestation_id","type":{"array":["u8",16]}},{"name":"price","type":"u64"},{"name":"amount","type":"u64"},{"name":"expiration","type":"i64"}]},{"name":"remove_from_whitelist","docs":["Remove an address from the whitelist","Signer must have the ADMIN_ROLE_WHITELIST role"],"discriminator":[7,144,216,239,243,236,193,235],"accounts":[{"name":"authority","docs":["The account with the authority to remove an address from the whitelist"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the Whitelist account"],"writable":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_WHITELIST` role","# PDA Seeds","- `ADMIN_ROLE_WHITELIST`","- The authority's address",""],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,87,104,105,116,101,108,105,115,116]},{"kind":"account","path":"authority"}]}},{"name":"whitelist","docs":["The Whitelist account being closed","# PDA Seeds","- `WHITELIST_SEED`","- Address being removed from whitelist"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,116,101,108,105,115,116]},{"kind":"arg","path":"address_to_remove"}]}}],"args":[{"name":"address_to_remove","type":"pubkey"}]},{"name":"resume_global_minting","docs":["Resume all mints globally","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[18,40,173,140,250,6,10,207],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"resume_global_redemption","docs":["Resume all redemption globally","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[80,47,24,168,44,185,215,97],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"resume_token","docs":["Resume all transfers for a GM token by invoking the pausable token extension to remove a pause.","Signer must have the UNPAUSER_ROLE_GMTOKEN role"],"discriminator":[173,116,46,190,81,191,249,83],"accounts":[{"name":"authority","docs":["The account with the authority to execute the resume operation"],"writable":true,"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `UNPAUSER_ROLE_GMTOKEN` role","# PDA Seeds","- `UNPAUSER_ROLE_GMTOKEN`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[85,110,112,97,117,115,101,114,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint to resume"],"writable":true},{"name":"mint_authority","docs":["The mint authority PDA that has pausable authority","# PDA Seeds","- `MINT_AUTHORITY_SEED`",""],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"token_program","docs":["The token program (Token-2022)"]}],"args":[]},{"name":"resume_token_factory","docs":["Resume the GM token factory","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[235,37,239,145,244,212,31,37],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[]},{"name":"resume_token_minting","docs":["Resume mints for a token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[188,102,226,249,194,29,81,248],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"resume_token_redemption","docs":["Resume redemptions for a token (admin function)","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[152,249,213,178,85,141,122,45],"accounts":[{"name":"authority","docs":["The account with the authority to execute the pause/unpause operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_limit_account","docs":["The `TokenLimit` account for the specific GM Token to pause/unpause","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"token_limit_account.mint","account":"TokenLimit"}]}}],"args":[]},{"name":"retrieve_tokens","docs":["Retrieve (withdraw) tokens from a vault controlled by the USDon manager","","Allows admins to withdraw any tokens (USDC, USDon, etc.) from vaults","owned by the usdon_manager_state PDA.","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[208,194,68,55,183,22,93,135],"accounts":[{"name":"authority","docs":["The account with the authority to execute the retrieval operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account used as authority for vault operations","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"token_mint","docs":["The mint of the token being retrieved"]},{"name":"source_vault","docs":["The source vault token account (must be owned by usdon_manager_state)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"usdon_manager_state"},{"kind":"account","path":"token_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"destination","docs":["The destination token account to receive the tokens"],"writable":true},{"name":"token_program","docs":["The token program (SPL Token or Token-2022)"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"revoke_gmtoken_factory_role","docs":["Revokes the specified GM Token Factory role from the user","Signer must have the ADMIN_ROLE_GMTOKEN_FACTORY role"],"discriminator":[214,48,33,96,99,36,94,198],"accounts":[{"name":"authority","docs":["The account with the authority to revoke a GM Token Factory role"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the account"],"writable":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_FACTORY` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_FACTORY`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,70,97,99,116,111,114,121]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_gmtoken_manager_role","docs":["Revoke a role from the GM token manager","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[202,63,132,81,219,242,100,90],"accounts":[{"name":"authority","docs":["The account with the authority to revoke GM Token Manager roles"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the Roles account"],"writable":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_gmtoken_role","docs":["Revokes the specified GMToken role from the user","Signer must have the ADMIN_ROLE_GMTOKEN role"],"discriminator":[108,55,0,39,40,39,103,144],"accounts":[{"name":"recipient","docs":["The recipient of the closed account lamports"],"writable":true},{"name":"authority","docs":["The account with the authority to revoke GM Token roles"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN` role","# PDA Seeds","- ADMIN_ROLE_GMTOKEN","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}}],"args":[]},{"name":"revoke_role","docs":["Revoke a role by closing the Roles account and reclaim rent","Signer must be the upgrade authority of the program"],"discriminator":[179,232,2,180,48,227,82,7],"accounts":[{"name":"recipient","docs":["Receives funds from account closure"],"writable":true},{"name":"authority","docs":["The account with the authority to revoke roles, must be the program upgrade authority"],"signer":true},{"name":"role_to_revoke","docs":["The Roles account to be closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"arg","path":"_role"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"},{"name":"program","docs":["The Ondo Global Markets program"],"address":"XzTT4XB8m7sLD2xi6snefSasaswsKCxx5Tifjondogm"},{"name":"program_data","docs":["The ProgramData account of the Ondo Global Markets program"]}],"args":[{"name":"_role","type":{"defined":{"name":"RoleType"}}}]},{"name":"revoke_sanity_configurer_role","docs":["Revoke a configurer role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[170,122,0,190,220,165,67,86],"accounts":[{"name":"recipient","docs":["Receives the lamports from closing the Roles account"],"writable":true},{"name":"authority","docs":["The account with the authority to revoke the configurer role"],"signer":true},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `ADMIN_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the configurer role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_sanity_setter_role","docs":["Revoke a setter role for sanity check","Signer must have the ADMIN_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[224,165,35,213,84,53,9,229],"accounts":[{"name":"recipient","docs":["Receives the lamports from closing the Roles account"],"writable":true},{"name":"authority","docs":["The account that has the authority to revoke the setter role"],"signer":true},{"name":"authority_role_account","docs":["The role account of the admin","# PDA Seeds","- `RoleType::ADMIN_ROLE_ONDO_SANITY_CHECK`","- `authority` (the authority's address)"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The role account to be closed","# PDA Seeds","- `role_to_revoke.role.seed()` (the seed for the setter role)","- `role_to_revoke.address` (the user's address)"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"revoke_usdon_role","docs":["Revokes the specified USDon role from a user","Signer must have the GUARDIAN_USDON role"],"discriminator":[231,35,217,203,112,165,182,69],"accounts":[{"name":"authority","docs":["The account with the authority to revoke a role"],"signer":true},{"name":"recipient","docs":["Receives the lamports from closing the `Roles` account"],"writable":true},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `GUARDIAN_USDON` role","# PDA Seeds","- GUARDIAN_USDON","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[71,117,97,114,100,105,97,110,85,83,68,111,110]},{"kind":"account","path":"authority"}]}},{"name":"role_to_revoke","docs":["The Roles account being closed","# PDA Seeds","- Role seed (from RoleType)","- User's address"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"role_to_revoke.role","account":"Roles"},{"kind":"account","path":"role_to_revoke.address","account":"Roles"}]}}],"args":[]},{"name":"set_allowed_deviation_bps","docs":["Set allowed price deviation in basis points","Signer must have the CONFIGURER_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[46,36,29,85,194,180,86,124],"accounts":[{"name":"authority","docs":["The account with the authority to configure the sanity check"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `CONFIGURER_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `CONFIGURER_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[67,111,110,102,105,103,117,114,101,114,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint"]},{"name":"sanity_check_account","docs":["The OracleSanityCheck account to be configured","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"allowed_deviation_bps","type":"u64"}]},{"name":"set_attestation_signer_secp","docs":["Update the secp256k1 attestation signer address","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[121,157,129,65,181,51,55,0],"accounts":[{"name":"authority","docs":["The account with the authority to execute the unpause/configuration operation"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The `GmTokenManagerState` account to be modified","# PDA Seeds","- `GMTOKEN_MANAGER_STATE_SEED`"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"attestation_signer_secp","type":{"array":["u8",20]}}]},{"name":"set_last_price","docs":["Update the last price in sanity check","Signer must have the SETTER_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[58,56,189,177,199,145,145,43],"accounts":[{"name":"authority","docs":["The account with the authority to set the last price"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `SETTER_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `SETTER_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[83,101,116,116,101,114,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint"]},{"name":"sanity_check_account","docs":["The `OracleSanityCheck` account to be updated","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"last_price","type":"u64"}]},{"name":"set_max_time_delay","docs":["Set maximum time delay for sanity check","Signer must have the CONFIGURER_ROLE_ONDO_SANITY_CHECK role"],"discriminator":[145,127,145,218,239,173,252,9],"accounts":[{"name":"authority","docs":["The account with the authority to configure the sanity check"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `CONFIGURER_ROLE_ONDO_SANITY_CHECK` role","# PDA Seeds","- `CONFIGURER_ROLE_ONDO_SANITY_CHECK`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[67,111,110,102,105,103,117,114,101,114,82,111,108,101,79,110,100,111,83,97,110,105,116,121,67,104,101,99,107]},{"kind":"account","path":"authority"}]}},{"name":"mint","docs":["The GM Token mint"]},{"name":"sanity_check_account","docs":["The OracleSanityCheck account to be configured","# PDA Seeds","- `ORACLE_SANITY_CHECK_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,97,110,105,116,121,95,99,104,101,99,107]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"max_time_delay","type":"i64"}]},{"name":"set_ondo_user_limits","docs":["Set rate limit for a user","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[86,133,101,215,245,143,28,159],"accounts":[{"name":"authority","docs":["The account with the authority to set user limits"],"signer":true},{"name":"mint","docs":["The GM Token mint"],"relations":["token_limit"]},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}},{"name":"ondo_user","docs":["The `OndoUser` account to update","# PDA Seeds","- `ONDO_USER_SEED`","- User's owner address","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[79,110,100,111,85,115,101,114]},{"kind":"account","path":"ondo_user.owner","account":"OndoUser"},{"kind":"account","path":"mint"}]}},{"name":"token_limit","docs":["The TokenLimit account","# PDA Seeds","- TOKEN_LIMIT_ACCOUNT_SEED","- Mint address"],"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}}],"args":[{"name":"rate_limit","type":"u64"},{"name":"limit_window","type":"u64"}]},{"name":"set_oracle_price_max_age","docs":["Set the maximum age for oracle price data. When USDC oracle prices are more stale than `oracle_price_max_age`","swaps will halt.","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[198,173,23,10,148,48,248,61],"accounts":[{"name":"authority","docs":["The account with the authority to execute the operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account to be modified","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"oracle_price_max_age","type":"u64"}]},{"name":"set_token_limit","docs":["Update token-level rate limits","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER role"],"discriminator":[216,80,182,245,223,87,77,53],"accounts":[{"name":"authority","docs":["The account with the authority to update token limits"],"writable":true,"signer":true},{"name":"mint","docs":["The GM Token or USDon mint"]},{"name":"token_limit","docs":["The `TokenLimit` account to be updated","# PDA Seeds","- `TOKEN_LIMIT_ACCOUNT_SEED`","- Mint address"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110]},{"kind":"account","path":"mint"}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER`","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,71,77,84,111,107,101,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"default_user_rate_limit","type":{"option":"u64"}},{"name":"default_user_limit_window","type":{"option":"u64"}}]},{"name":"set_trading_hours_offset","docs":["Set the trading hours offset","Signer must have the ADMIN_ROLE_GMTOKEN_MANAGER or ISSUANCE_HOURS_ROLE role"],"discriminator":[65,114,20,50,234,67,255,126],"accounts":[{"name":"authority","docs":["The account with the authority to set the trading hours offset"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `ADMIN_ROLE_GMTOKEN_MANAGER` role","# PDA Seeds","- `ADMIN_ROLE_GMTOKEN_MANAGER` or `ISSUANCE_HOURS_ROLE`","- The authority's address"],"pda":{"seeds":[{"kind":"account","path":"authority_role_account.role","account":"Roles"},{"kind":"account","path":"authority"}]}},{"name":"gmtoken_manager_state","docs":["The GmTokenManagerState account to be modified"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,109,116,111,107,101,110,95,109,97,110,97,103,101,114]}]}}],"args":[{"name":"new_trading_hours_offset","type":"i64"}]},{"name":"set_usdc_price_update_address","docs":["Set the USDC price update address","Signer must have the ADMIN_ROLE_USDON_MANAGER role"],"discriminator":[12,142,252,201,224,148,254,32],"accounts":[{"name":"authority","docs":["The account with the authority to execute the operation"],"signer":true},{"name":"usdon_manager_state","docs":["The USDonManagerState account to be modified","# PDA Seeds","- USDON_MANAGER_STATE_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"authority_role_account","docs":["The Roles account verifying the authority has the `ADMIN_ROLE_USDON_MANAGER` role","# PDA Seeds","- ADMIN_ROLE_USDON_MANAGER","- The authority's address"],"pda":{"seeds":[{"kind":"const","value":[65,100,109,105,110,82,111,108,101,85,83,68,111,110,77,97,110,97,103,101,114]},{"kind":"account","path":"authority"}]}}],"args":[{"name":"new_price_update_address","type":"pubkey"}]},{"name":"update_scaled_ui_multiplier","docs":["Update the UI multiplier for token display","Signer must have the UPDATE_MULTIPLIER_ROLE role"],"discriminator":[96,212,189,168,220,27,240,70],"accounts":[{"name":"authority","docs":["The account with the authority to update the multiplier"],"writable":true,"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has the `UPDATE_MULTIPLIER_ROLE` role"],"pda":{"seeds":[{"kind":"const","value":[85,112,100,97,116,101,77,117,108,116,105,112,108,105,101,114,82,111,108,101]},{"kind":"account","path":"authority"}]}},{"name":"mint_authority","docs":["Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","docs":["The mint whose scaled UI multiplier is being updated"],"writable":true},{"name":"usdon_manager_state","docs":["The USDon manager state account, validates that the mint is not the USDon mint"],"pda":{"seeds":[{"kind":"const","value":[117,115,100,111,110,95,109,97,110,97,103,101,114]}]}},{"name":"token_program","docs":["The token program (should be the spl_token_2022 program)"]}],"args":[{"name":"new_multiplier","type":"f64"},{"name":"timestamp","type":"i64"}]},{"name":"update_token_metadata","docs":["Update a token's metadata (name, symbol, URI)","Signer must have the UPDATE_METADATA_ROLE role"],"discriminator":[243,6,8,23,126,181,251,158],"accounts":[{"name":"payer","docs":["Pays for fees if needed"],"writable":true,"signer":true},{"name":"authority","docs":["The operator updating the metadata, if multisig then this is different to the payer","Otherwise, the operator is the same as the payer"],"signer":true},{"name":"authority_role_account","docs":["The `Roles` account verifying the authority has `UPDATE_METADATA_ROLE` role"],"pda":{"seeds":[{"kind":"const","value":[85,112,100,97,116,101,77,101,116,97,100,97,116,97,82,111,108,101]},{"kind":"account","path":"authority"}]}},{"name":"mint_authority","docs":["Does not need to be checked for correctness as it is uninitialized."],"pda":{"seeds":[{"kind":"const","value":[109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"mint","docs":["The mint whose metadata is being updated"],"writable":true},{"name":"token_program","docs":["The token program (should be the spl_token_2022 program)"]},{"name":"system_program","docs":["The system program"],"address":"11111111111111111111111111111111"}],"args":[{"name":"new_name","type":{"option":"string"}},{"name":"new_symbol","type":{"option":"string"}},{"name":"new_uri","type":{"option":"string"}}]}],"accounts":[{"name":"Attestation","discriminator":[152,125,183,86,36,146,121,73]},{"name":"GMTokenManagerState","discriminator":[120,3,104,163,207,32,156,24]},{"name":"OndoUser","discriminator":[20,5,255,14,176,93,189,142]},{"name":"OracleSanityCheck","discriminator":[27,186,33,40,113,34,206,76]},{"name":"Roles","discriminator":[177,37,17,201,242,158,212,65]},{"name":"TokenLimit","discriminator":[130,254,128,120,255,3,217,51]},{"name":"USDonManagerState","discriminator":[4,39,95,41,51,43,174,91]},{"name":"Whitelist","discriminator":[204,176,52,79,146,121,54,247]}],"events":[{"name":"GMTokenDeployed","discriminator":[155,46,81,223,209,203,89,46]},{"name":"GMTokenMintingPaused","discriminator":[215,17,82,34,76,211,151,22]},{"name":"GMTokenPaused","discriminator":[147,68,57,240,27,46,44,201]},{"name":"GMTokenRedemptionPaused","discriminator":[246,249,230,73,152,65,61,214]},{"name":"RateLimitTokenSet","discriminator":[133,18,77,154,53,236,197,235]},{"name":"RateLimitUserSet","discriminator":[175,49,222,84,192,105,171,129]},{"name":"RoleGranted","discriminator":[220,183,89,228,143,63,246,58]},{"name":"RoleRevoked","discriminator":[167,183,52,229,126,206,62,61]},{"name":"SanityCheckSet","discriminator":[9,207,117,155,44,153,31,234]},{"name":"SanityCheckUpdated","discriminator":[173,97,103,183,67,230,249,1]},{"name":"SetTradingHoursOffset","discriminator":[122,8,3,44,200,105,217,208]},{"name":"TokenFactoryPaused","discriminator":[24,185,192,62,218,128,226,103]},{"name":"TokenManagerMintingPaused","discriminator":[96,11,118,59,8,78,247,254]},{"name":"TokenManagerRedemptionPaused","discriminator":[66,222,165,60,32,59,135,161]},{"name":"TokensRetrieved","discriminator":[217,35,1,89,38,122,145,187]},{"name":"TradeExecuted","discriminator":[41,110,64,129,60,79,179,80]},{"name":"UserAddedToWhitelist","discriminator":[206,139,181,72,116,111,42,42]},{"name":"UserRemovedFromWhitelist","discriminator":[106,223,245,11,213,150,2,15]}],"errors":[{"code":6000,"name":"MissingOrMismatchedSecpIx","msg":"Missing or mismatched secp256k1 verification instruction"},{"code":6001,"name":"MalformedSecpIx","msg":"Malformed secp256k1 instruction"},{"code":6002,"name":"WrongSigCount","msg":"Wrong signature count"},{"code":6003,"name":"WrongDigestLen","msg":"Expected 32-byte hash"},{"code":6004,"name":"DigestMismatch","msg":"Digest mismatch"},{"code":6005,"name":"AddressMismatch","msg":"Recovered address mismatch"}],"types":[{"name":"Attestation","docs":["Attestation account to track consumed attestations","each consumed attestation is stored in its own account"],"type":{"kind":"struct","fields":[{"name":"attestation_id","type":{"array":["u8",16]}},{"name":"creator","type":"pubkey"},{"name":"created_at","type":"i64"},{"name":"bump","type":"u8"}]}},{"name":"GMTokenDeployed","docs":["Event emitted when a GM Token is deployed","Fields:","- gm_token: The public key of the deployed GM Token"],"type":{"kind":"struct","fields":[{"name":"gm_token","type":"pubkey"}]}},{"name":"GMTokenManagerState","docs":["GM Token Manager State account - tracks global state for GM Token operations"],"type":{"kind":"struct","fields":[{"name":"execution_id","type":{"option":"u128"}},{"name":"factory_paused","type":"bool"},{"name":"redemption_paused","type":"bool"},{"name":"minting_paused","type":"bool"},{"name":"bump","type":"u8"},{"name":"attestation_signer_secp","docs":["Ethereum address (20 bytes) for secp256k1 signature verification","Used to verify attestation signatures for buy/sell operations","All zeros ([0u8; 20]) means not set"],"type":{"array":["u8",20]}},{"name":"trading_hours_offset","docs":["Trading hours offset from UTC in seconds","Positive values are east of UTC, negative values are west of UTC"],"type":"i64"}]}},{"name":"GMTokenMintingPaused","docs":["Event emitted when minting for a GM Token is paused or unpaused","Fields:","- is_paused: Boolean indicating if minting/redemptions are paused","- token: The address of the GM Token","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"token","type":"pubkey"},{"name":"pauser","type":"pubkey"}]}},{"name":"GMTokenPaused","docs":["Event emitted when a GM Token is paused/unpaused at the mint-level","Fields:","- is_paused: Boolean indicating whether the token is paused","- token: The address of the GM Token","- pauser: The address of the operator who performed the pause/unpaused action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"token","type":"pubkey"},{"name":"pauser","type":"pubkey"}]}},{"name":"GMTokenRedemptionPaused","docs":["Event emitted redemptions for a GM Token are paused or unpaused","Fields:","- is_paused: Boolean indicating if redemptions are paused","- token: The address of the GM Token","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"token","type":"pubkey"},{"name":"pauser","type":"pubkey"}]}},{"name":"OndoUser","docs":["OndoUser state account - tracks user-specific data for a GM Token"],"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"mint_capacity_used","type":{"option":"u64"}},{"name":"mint_last_updated","type":{"option":"i64"}},{"name":"redeem_capacity_used","type":{"option":"u64"}},{"name":"redeem_last_updated","type":{"option":"i64"}},{"name":"bump","type":"u8"}]}},{"name":"OracleSanityCheck","docs":["OracleSanityCheck state account - tracks sanity check parameters for a specific mint"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"last_price","type":"u64"},{"name":"allowed_deviation_bps","type":"u64"},{"name":"max_time_delay","type":"i64"},{"name":"price_last_updated","type":"i64"},{"name":"bump","type":"u8"}]}},{"name":"RateLimitTokenSet","docs":["Event emitted when a rate limit is set for a token","Fields:","- token: The public key of the token for which the rate limit is set","- limit: The rate limit value","- limit_window: The time window for the rate limit"],"type":{"kind":"struct","fields":[{"name":"token","type":"pubkey"},{"name":"limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}}]}},{"name":"RateLimitUserSet","docs":["Event emitted when a rate limit is set for a user","Fields:","- user: The public key of the user for whom the rate limit is set","- limit: The rate limit value"],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"limit","type":"u64"}]}},{"name":"RoleGranted","docs":["Event emitted when a role is granted to a user","Fields:","- role: The role that was granted","- grantee: The public key of the user who was granted the role","- granter: The public key of the user who granted the role"],"type":{"kind":"struct","fields":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"grantee","type":"pubkey"},{"name":"granter","type":"pubkey"}]}},{"name":"RoleRevoked","docs":["Event emitted when a role is revoked from a user","Fields:","- role: The role that was revoked","- grantee: The public key of the user who had the role revoked","- revoker: The public key of the user who revoked the role"],"type":{"kind":"struct","fields":[{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"grantee","type":"pubkey"},{"name":"revoker","type":"pubkey"}]}},{"name":"RoleType","type":{"kind":"enum","variants":[{"name":"MinterRoleUSDon"},{"name":"BurnerRoleUSDon"},{"name":"AdminRoleUSDon"},{"name":"AdminRoleUSDonManager"},{"name":"GuardianUSDon"},{"name":"DeployerRoleGMTokenFactory"},{"name":"PauserRoleGMTokenFactory"},{"name":"AdminRoleGMTokenFactory"},{"name":"MinterRoleGMToken"},{"name":"AdminRoleGMToken"},{"name":"PauserRoleGMTokenManager"},{"name":"PauserRoleGMToken"},{"name":"UnpauserRoleGMToken"},{"name":"AdminRoleGMTokenManager"},{"name":"IssuanceHoursRole"},{"name":"SetterRoleOndoSanityCheck"},{"name":"ConfigurerRoleOndoSanityCheck"},{"name":"AdminRoleOndoSanityCheck"},{"name":"AdminRoleWhitelist"},{"name":"UpdateMultiplierRole"},{"name":"UpdateMetadataRole"}]}},{"name":"Roles","docs":["Roles state account - tracks role assignments for addresses"],"type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"role","type":{"defined":{"name":"RoleType"}}},{"name":"bump","type":"u8"}]}},{"name":"SanityCheckSet","docs":["Event emitted when a sanity check is set for a mint","Fields:","- mint: The public key of the mint for which the sanity check is set","- allowed_deviation_bps: The allowed deviation in basis points","- max_time_delay: The maximum time delay for the sanity check"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"allowed_deviation_bps","type":"u64"},{"name":"max_time_delay","type":"i64"}]}},{"name":"SanityCheckUpdated","docs":["Event emitted when a sanity check is updated for a mint","Fields:","- mint: The public key of the mint for which the sanity check is updated","- last_price: The last recorded price (optional)","- allowed_deviation_bps: The allowed deviation in basis points (optional)","- max_time_delay: The maximum time delay for the sanity check (optional)"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"last_price","type":{"option":"u64"}},{"name":"allowed_deviation_bps","type":{"option":"u64"}},{"name":"max_time_delay","type":{"option":"i64"}}]}},{"name":"SetTradingHoursOffset","docs":["Event emitted when the trading hours offset is set","Fields:","- prev_trading_hours_offset: The previous trading hours offset","- new_trading_hours_offset: The new trading hours offset"],"type":{"kind":"struct","fields":[{"name":"prev_trading_hours_offset","type":"i64"},{"name":"new_trading_hours_offset","type":"i64"}]}},{"name":"TokenFactoryPaused","docs":["Event emitted when the Token Factory is paused or unpaused","Fields:","- is_paused: Boolean indicating if the Token Factory is paused","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"pauser","type":"pubkey"}]}},{"name":"TokenLimit","docs":["TokenLimit state account - tracks global token limit parameters for a specific GM Token"],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"rate_limit","type":{"option":"u64"}},{"name":"limit_window","type":{"option":"u64"}},{"name":"mint_capacity_used","type":{"option":"u64"}},{"name":"mint_last_updated","type":{"option":"i64"}},{"name":"redeem_capacity_used","type":{"option":"u64"}},{"name":"redeem_last_updated","type":{"option":"i64"}},{"name":"redemption_paused","type":"bool"},{"name":"minting_paused","type":"bool"},{"name":"default_user_rate_limit","type":{"option":"u64"}},{"name":"default_user_limit_window","type":{"option":"u64"}},{"name":"bump","type":"u8"}]}},{"name":"TokenManagerMintingPaused","docs":["Event emitted when GM Token minting is globally paused or unpaused","Fields:","- is_paused: Boolean indicating if the minting is globally paused","- pauser: The address of the user who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"pauser","type":"pubkey"}]}},{"name":"TokenManagerRedemptionPaused","docs":["Event emitted when GM Token redemptions are globally paused or unpaused","Fields:","- is_paused: Boolean indicating if redemptions are globally paused","- pauser: The address of the operator who performed the pause/unpause action"],"type":{"kind":"struct","fields":[{"name":"is_paused","type":"bool"},{"name":"pauser","type":"pubkey"}]}},{"name":"TokensRetrieved","docs":["Event emitted when tokens are retrieved (withdrawn) from a vault by an admin","Fields:","- token: The public key of the token mint being withdrawn","- to: The destination address receiving the tokens","- amount: The amount of tokens withdrawn","- authority: The public key of the admin who executed the withdrawal"],"type":{"kind":"struct","fields":[{"name":"token","type":"pubkey"},{"name":"to","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"authority","type":"pubkey"}]}},{"name":"TradeExecuted","docs":["Event emitted when a trade is executed","Fields:","- execution_id: The unique identifier of the trade execution"],"type":{"kind":"struct","fields":[{"name":"execution_id","type":"u128"}]}},{"name":"USDonManagerState","docs":["USDonManagerState state account - tracks global configuration for the USDon stablecoin system"],"type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"usdon_mint","type":"pubkey"},{"name":"oracle_price_enabled","type":"bool"},{"name":"oracle_price_max_age","type":"u64"},{"name":"usdc_price_update","type":"pubkey"},{"name":"usdc_vault","type":"pubkey"},{"name":"usdon_vault","type":"pubkey"},{"name":"bump","type":"u8"}]}},{"name":"UserAddedToWhitelist","docs":["Event emitted when a user is added to the whitelist","Fields:","- user: The public key of the user being added to the whitelist","- added_by: The public key of the admin who added the user to the whitelist"],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"added_by","type":"pubkey"}]}},{"name":"UserRemovedFromWhitelist","docs":["Event emitted when a user is removed from the whitelist","Fields:","- user: The public key of the user being removed from the whitelist","- removed_by: The public key of the admin who removed the user from the whitelist"],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"removed_by","type":"pubkey"}]}},{"name":"Whitelist","docs":["Whitelist account - tracks whitelisted addresses.","","Used as a marker account - presence of the account indicates whitelisting."],"type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/idls/openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json b/idls/openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json new file mode 100644 index 0000000..4869fc9 --- /dev/null +++ b/idls/openbook_v2.opnb2LAfJYbRMAHHvqjCwQxanZn7ReEHp1k81EohpZb.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"openbook_v2","instructions":[{"name":"createMarket","docs":["Create a [`Market`](crate::state::Market) for a given token pair."],"accounts":[{"name":"market","isMut":true,"isSigner":true},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false,"docs":["Accounts are initialized by client,","anchor discriminator is set first when ix exits,"]},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"baseMint","isMut":false,"isSigner":false},{"name":"quoteMint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"collectFeeAdmin","isMut":false,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":false,"isOptional":true},{"name":"consumeEventsAdmin","isMut":false,"isSigner":false,"isOptional":true},{"name":"closeMarketAdmin","isMut":false,"isSigner":false,"isOptional":true},{"name":"eventAuthority","isMut":false,"isSigner":false},{"name":"program","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"},{"name":"oracleConfig","type":{"defined":"OracleConfigParams"}},{"name":"quoteLotSize","type":"i64"},{"name":"baseLotSize","type":"i64"},{"name":"makerFee","type":"i64"},{"name":"takerFee","type":"i64"},{"name":"timeExpiry","type":"i64"}]},{"name":"closeMarket","docs":["Close a [`Market`](crate::state::Market) (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createOpenOrdersIndexer","docs":["Create an [`OpenOrdersIndexer`](crate::state::OpenOrdersIndexer) account."],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"closeOpenOrdersIndexer","docs":["Close an [`OpenOrdersIndexer`](crate::state::OpenOrdersIndexer) account."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createOpenOrdersAccount","docs":["Create an [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"delegateAccount","isMut":false,"isSigner":false,"isOptional":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"name","type":"string"}]},{"name":"closeOpenOrdersAccount","docs":["Close an [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"openOrdersIndexer","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"placeOrder","docs":["Place an order.","","Different types of orders have different effects on the order book,","as described in [`PlaceOrderType`](crate::state::PlaceOrderType).","","`price_lots` refers to the price in lots: the number of quote lots","per base lot. It is ignored for `PlaceOrderType::Market` orders.","","`expiry_timestamp` is a unix timestamp for when this order should","expire. If 0 is passed in, the order will never expire. If the time","is in the past, the instruction is skipped. Timestamps in the future","are reduced to now + 65,535s.","","`limit` determines the maximum number of orders from the book to fill,","and can be used to limit CU spent. When the limit is reached, processing","stops and the instruction succeeds."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"PlaceOrderArgs"}}],"returns":{"option":"u128"}},{"name":"editOrder","docs":["Edit an order."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"expectedCancelSize","type":"i64"},{"name":"placeOrder","type":{"defined":"PlaceOrderArgs"}}],"returns":{"option":"u128"}},{"name":"editOrderPegged","docs":["Edit an order pegged."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"expectedCancelSize","type":"i64"},{"name":"placeOrder","type":{"defined":"PlaceOrderPeggedArgs"}}],"returns":{"option":"u128"}},{"name":"placeOrders","docs":["Place multiple orders"],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"ordersType","type":{"defined":"PlaceOrderType"}},{"name":"bids","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"asks","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"limit","type":"u8"}],"returns":{"vec":{"option":"u128"}}},{"name":"cancelAllAndPlaceOrders","docs":["Cancel orders and place multiple orders."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"ordersType","type":{"defined":"PlaceOrderType"}},{"name":"bids","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"asks","type":{"vec":{"defined":"PlaceMultipleOrdersArgs"}}},{"name":"limit","type":"u8"}],"returns":{"vec":{"option":"u128"}}},{"name":"placeOrderPegged","docs":["Place an oracle-peg order."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"marketVault","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"PlaceOrderPeggedArgs"}}],"returns":{"option":"u128"}},{"name":"placeTakeOrder","docs":["Place an order that shall take existing liquidity off of the book, not","add a new order off the book.","","This type of order allows for instant token settlement for the taker."],"accounts":[{"name":"signer","isMut":true,"isSigner":true},{"name":"penaltyPayer","isMut":true,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"oracleA","isMut":false,"isSigner":false,"isOptional":true},{"name":"oracleB","isMut":false,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrdersAdmin","isMut":false,"isSigner":true,"isOptional":true}],"args":[{"name":"args","type":{"defined":"PlaceTakeOrderArgs"}}]},{"name":"consumeEvents","docs":["Process up to `limit` [events](crate::state::AnyEvent).","","When a user places a 'take' order, they do not know beforehand which","market maker will have placed the 'make' order that they get executed","against. This prevents them from passing in a market maker's","[`OpenOrdersAccount`](crate::state::OpenOrdersAccount), which is needed","to credit/debit the relevant tokens to/from the maker. As such, Openbook","uses a 'crank' system, where `place_order` only emits events, and","`consume_events` handles token settlement.","","Currently, there are two types of events: [`FillEvent`](crate::state::FillEvent)s","and [`OutEvent`](crate::state::OutEvent)s.","","A `FillEvent` is emitted when an order is filled, and it is handled by","debiting whatever the taker is selling from the taker and crediting","it to the maker, and debiting whatever the taker is buying from the","maker and crediting it to the taker. Note that *no tokens are moved*,","these are just debits and credits to each party's [`Position`](crate::state::Position).","","An `OutEvent` is emitted when a limit order needs to be removed from","the book during a `place_order` invocation, and it is handled by","crediting whatever the maker would have sold (quote token in a bid,","base token in an ask) back to the maker."],"accounts":[{"name":"consumeEventsAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"market","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false}],"args":[{"name":"limit","type":"u64"}]},{"name":"consumeGivenEvents","docs":["Process the [events](crate::state::AnyEvent) at the given positions."],"accounts":[{"name":"consumeEventsAdmin","isMut":false,"isSigner":true,"isOptional":true},{"name":"market","isMut":true,"isSigner":false},{"name":"eventHeap","isMut":true,"isSigner":false}],"args":[{"name":"slots","type":{"vec":"u64"}}]},{"name":"cancelOrder","docs":["Cancel an order by its `order_id`.","","Note that this doesn't emit an [`OutEvent`](crate::state::OutEvent) because a","maker knows that they will be passing in their own [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"orderId","type":"u128"}]},{"name":"cancelOrderByClientOrderId","docs":["Cancel an order by its `client_order_id`.","","Note that this doesn't emit an [`OutEvent`](crate::state::OutEvent) because a","maker knows that they will be passing in their own [`OpenOrdersAccount`](crate::state::OpenOrdersAccount)."],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"clientOrderId","type":"u64"}],"returns":"i64"},{"name":"cancelAllOrders","docs":["Cancel up to `limit` orders, optionally filtering by side"],"accounts":[{"name":"signer","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"sideOption","type":{"option":{"defined":"Side"}}},{"name":"limit","type":"u8"}]},{"name":"deposit","docs":["Deposit a certain amount of `base` and `quote` lamports into one's","[`Position`](crate::state::Position).","","Makers might wish to `deposit`, rather than have actual tokens moved for","each trade, in order to reduce CUs."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"baseAmount","type":"u64"},{"name":"quoteAmount","type":"u64"}]},{"name":"refill","docs":["Refill a certain amount of `base` and `quote` lamports. The amount being passed is the","total lamports that the [`Position`](crate::state::Position) will have.","","Makers might wish to `refill`, rather than have actual tokens moved for","each trade, in order to reduce CUs."],"accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"baseAmount","type":"u64"},{"name":"quoteAmount","type":"u64"}]},{"name":"settleFunds","docs":["Withdraw any available tokens."],"accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"penaltyPayer","isMut":true,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"settleFundsExpired","docs":["Withdraw any available tokens when the market is expired (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"owner","isMut":true,"isSigner":true},{"name":"penaltyPayer","isMut":true,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"marketBaseVault","isMut":true,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"userBaseAccount","isMut":true,"isSigner":false},{"name":"userQuoteAccount","isMut":true,"isSigner":false},{"name":"referrerAccount","isMut":true,"isSigner":false,"isOptional":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"sweepFees","docs":["Sweep fees, as a [`Market`](crate::state::Market)'s admin."],"accounts":[{"name":"collectFeeAdmin","isMut":false,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"marketAuthority","isMut":false,"isSigner":false},{"name":"marketQuoteVault","isMut":true,"isSigner":false},{"name":"tokenReceiverAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setDelegate","docs":["Update the [`delegate`](crate::state::OpenOrdersAccount::delegate) of an open orders account."],"accounts":[{"name":"owner","isMut":true,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"delegateAccount","isMut":false,"isSigner":false,"isOptional":true}],"args":[]},{"name":"setMarketExpired","docs":["Set market to expired before pruning orders and closing the market (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"market","isMut":true,"isSigner":false}],"args":[]},{"name":"pruneOrders","docs":["Remove orders from the book when the market is expired (only","[`close_market_admin`](crate::state::Market::close_market_admin))."],"accounts":[{"name":"closeMarketAdmin","isMut":false,"isSigner":true},{"name":"openOrdersAccount","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false}],"args":[{"name":"limit","type":"u8"}]},{"name":"stubOracleCreate","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"owner","isMut":false,"isSigner":true},{"name":"oracle","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"f64"}]},{"name":"stubOracleClose","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"oracle","isMut":true,"isSigner":false},{"name":"solDestination","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"stubOracleSet","accounts":[{"name":"owner","isMut":false,"isSigner":true},{"name":"oracle","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"f64"}]}],"accounts":[{"name":"Market","type":{"kind":"struct","fields":[{"name":"bump","docs":["PDA bump"],"type":"u8"},{"name":"baseDecimals","docs":["Number of decimals used for the base token.","","Used to convert the oracle's price into a native/native price."],"type":"u8"},{"name":"quoteDecimals","type":"u8"},{"name":"padding1","type":{"array":["u8",5]}},{"name":"marketAuthority","type":"publicKey"},{"name":"timeExpiry","docs":["No expiry = 0. Market will expire and no trading allowed after time_expiry"],"type":"i64"},{"name":"collectFeeAdmin","docs":["Admin who can collect fees from the market"],"type":"publicKey"},{"name":"openOrdersAdmin","docs":["Admin who must sign off on all order creations"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"consumeEventsAdmin","docs":["Admin who must sign off on all event consumptions"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"closeMarketAdmin","docs":["Admin who can set market expired, prune orders and close the market"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"name","docs":["Name. Trailing zero bytes are ignored."],"type":{"array":["u8",16]}},{"name":"bids","docs":["Address of the BookSide account for bids"],"type":"publicKey"},{"name":"asks","docs":["Address of the BookSide account for asks"],"type":"publicKey"},{"name":"eventHeap","docs":["Address of the EventHeap account"],"type":"publicKey"},{"name":"oracleA","docs":["Oracles account address"],"type":{"defined":"NonZeroPubkeyOption"}},{"name":"oracleB","type":{"defined":"NonZeroPubkeyOption"}},{"name":"oracleConfig","docs":["Oracle configuration"],"type":{"defined":"OracleConfig"}},{"name":"quoteLotSize","docs":["Number of quote native in a quote lot. Must be a power of 10.","","Primarily useful for increasing the tick size on the market: A lot price","of 1 becomes a native price of quote_lot_size/base_lot_size becomes a","ui price of quote_lot_size*base_decimals/base_lot_size/quote_decimals."],"type":"i64"},{"name":"baseLotSize","docs":["Number of base native in a base lot. Must be a power of 10.","","Example: If base decimals for the underlying asset is 6, base lot size","is 100 and and base position lots is 10_000 then base position native is","1_000_000 and base position ui is 1."],"type":"i64"},{"name":"seqNum","docs":["Total number of orders seen"],"type":"u64"},{"name":"registrationTime","docs":["Timestamp in seconds that the market was registered at."],"type":"i64"},{"name":"makerFee","docs":["Fees","","Fee (in 10^-6) when matching maker orders.","maker_fee < 0 it means some of the taker_fees goes to the maker","maker_fee > 0, it means no taker_fee to the maker, and maker fee goes to the referral"],"type":"i64"},{"name":"takerFee","docs":["Fee (in 10^-6) for taker orders, always >= 0."],"type":"i64"},{"name":"feesAccrued","docs":["Total fees accrued in native quote"],"type":"u128"},{"name":"feesToReferrers","docs":["Total fees settled in native quote"],"type":"u128"},{"name":"referrerRebatesAccrued","docs":["Referrer rebates to be distributed"],"type":"u64"},{"name":"feesAvailable","docs":["Fees generated and available to withdraw via sweep_fees"],"type":"u64"},{"name":"makerVolume","docs":["Cumulative maker volume (same as taker volume) in quote native units"],"type":"u128"},{"name":"takerVolumeWoOo","docs":["Cumulative taker volume in quote native units due to place take orders"],"type":"u128"},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"marketBaseVault","type":"publicKey"},{"name":"baseDepositTotal","type":"u64"},{"name":"marketQuoteVault","type":"publicKey"},{"name":"quoteDepositTotal","type":"u64"},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"OpenOrdersAccount","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"market","type":"publicKey"},{"name":"name","type":{"array":["u8",32]}},{"name":"delegate","type":{"defined":"NonZeroPubkeyOption"}},{"name":"accountNum","type":"u32"},{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"padding","type":{"array":["u8",2]}},{"name":"position","type":{"defined":"Position"}},{"name":"openOrders","type":{"array":[{"defined":"OpenOrder"},24]}}]}},{"name":"OpenOrdersIndexer","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"createdCounter","type":"u32"},{"name":"addresses","type":{"vec":"publicKey"}}]}},{"name":"StubOracle","type":{"kind":"struct","fields":[{"name":"owner","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"price","type":"f64"},{"name":"lastUpdateTs","type":"i64"},{"name":"lastUpdateSlot","type":"u64"},{"name":"deviation","type":"f64"},{"name":"reserved","type":{"array":["u8",104]}}]}},{"name":"BookSide","type":{"kind":"struct","fields":[{"name":"roots","type":{"array":[{"defined":"OrderTreeRoot"},2]}},{"name":"reservedRoots","type":{"array":[{"defined":"OrderTreeRoot"},4]}},{"name":"reserved","type":{"array":["u8",256]}},{"name":"nodes","type":{"defined":"OrderTreeNodes"}}]}},{"name":"EventHeap","docs":["Container for the different EventTypes.","","Events are stored in a fixed-array of nodes. Free nodes are connected by a single-linked list","starting at free_head while used nodes form a circular doubly-linked list starting at","used_head."],"type":{"kind":"struct","fields":[{"name":"header","type":{"defined":"EventHeapHeader"}},{"name":"nodes","type":{"array":[{"defined":"EventNode"},600]}},{"name":"reserved","type":{"array":["u8",64]}}]}}],"types":[{"name":"NonZeroPubkeyOption","docs":["Like `Option`, but implemented for `Pubkey` to be used with `zero_copy`"],"type":{"kind":"struct","fields":[{"name":"key","type":"publicKey"}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"bidsBaseLots","docs":["Base lots in open bids"],"type":"i64"},{"name":"asksBaseLots","docs":["Base lots in open asks"],"type":"i64"},{"name":"baseFreeNative","type":"u64"},{"name":"quoteFreeNative","type":"u64"},{"name":"lockedMakerFees","type":"u64"},{"name":"referrerRebatesAvailable","type":"u64"},{"name":"penaltyHeapCount","docs":["Count of ixs when events are added to the heap","To avoid this, send remaining accounts in order to process the events"],"type":"u64"},{"name":"makerVolume","docs":["Cumulative maker volume in quote native units (display only)"],"type":"u128"},{"name":"takerVolume","docs":["Cumulative taker volume in quote native units (display only)"],"type":"u128"},{"name":"bidsQuoteLots","docs":["Quote lots in open bids"],"type":"i64"},{"name":"reserved","type":{"array":["u8",64]}}]}},{"name":"OpenOrder","type":{"kind":"struct","fields":[{"name":"id","type":"u128"},{"name":"clientId","type":"u64"},{"name":"lockedPrice","docs":["Price at which user's assets were locked"],"type":"i64"},{"name":"isFree","type":"u8"},{"name":"sideAndTree","type":"u8"},{"name":"padding","type":{"array":["u8",6]}}]}},{"name":"OracleConfig","type":{"kind":"struct","fields":[{"name":"confFilter","type":"f64"},{"name":"maxStalenessSlots","type":"i64"},{"name":"reserved","type":{"array":["u8",72]}}]}},{"name":"OracleConfigParams","type":{"kind":"struct","fields":[{"name":"confFilter","type":"f32"},{"name":"maxStalenessSlots","type":{"option":"u32"}}]}},{"name":"EventHeapHeader","type":{"kind":"struct","fields":[{"name":"freeHead","type":"u16"},{"name":"usedHead","type":"u16"},{"name":"count","type":"u16"},{"name":"padd","type":"u16"},{"name":"seqNum","type":"u64"}]}},{"name":"EventNode","type":{"kind":"struct","fields":[{"name":"next","type":"u16"},{"name":"prev","type":"u16"},{"name":"pad","type":{"array":["u8",4]}},{"name":"event","type":{"defined":"AnyEvent"}}]}},{"name":"AnyEvent","type":{"kind":"struct","fields":[{"name":"eventType","type":"u8"},{"name":"padding","type":{"array":["u8",143]}}]}},{"name":"FillEvent","type":{"kind":"struct","fields":[{"name":"eventType","type":"u8"},{"name":"takerSide","type":"u8"},{"name":"makerOut","type":"u8"},{"name":"makerSlot","type":"u8"},{"name":"padding","type":{"array":["u8",4]}},{"name":"timestamp","type":"u64"},{"name":"seqNum","type":"u64"},{"name":"maker","type":"publicKey"},{"name":"makerTimestamp","type":"u64"},{"name":"taker","type":"publicKey"},{"name":"takerClientOrderId","type":"u64"},{"name":"price","type":"i64"},{"name":"pegLimit","type":"i64"},{"name":"quantity","type":"i64"},{"name":"makerClientOrderId","type":"u64"},{"name":"reserved","type":{"array":["u8",8]}}]}},{"name":"OutEvent","type":{"kind":"struct","fields":[{"name":"eventType","type":"u8"},{"name":"side","type":"u8"},{"name":"ownerSlot","type":"u8"},{"name":"padding0","type":{"array":["u8",5]}},{"name":"timestamp","type":"u64"},{"name":"seqNum","type":"u64"},{"name":"owner","type":"publicKey"},{"name":"quantity","type":"i64"},{"name":"padding1","type":{"array":["u8",80]}}]}},{"name":"InnerNode","docs":["InnerNodes and LeafNodes compose the binary tree of orders.","","Each InnerNode has exactly two children, which are either InnerNodes themselves,","or LeafNodes. The children share the top `prefix_len` bits of `key`. The left","child has a 0 in the next bit, and the right a 1."],"type":{"kind":"struct","fields":[{"name":"tag","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"prefixLen","docs":["number of highest `key` bits that all children share","e.g. if it's 2, the two highest bits of `key` will be the same on all children"],"type":"u32"},{"name":"key","docs":["only the top `prefix_len` bits of `key` are relevant"],"type":"u128"},{"name":"children","docs":["indexes into `BookSide::nodes`"],"type":{"array":["u32",2]}},{"name":"childEarliestExpiry","docs":["The earliest expiry timestamp for the left and right subtrees.","","Needed to be able to find and remove expired orders without having to","iterate through the whole bookside."],"type":{"array":["u64",2]}},{"name":"reserved","type":{"array":["u8",40]}}]}},{"name":"LeafNode","docs":["LeafNodes represent an order in the binary tree"],"type":{"kind":"struct","fields":[{"name":"tag","docs":["NodeTag"],"type":"u8"},{"name":"ownerSlot","docs":["Index into the owning OpenOrdersAccount's OpenOrders"],"type":"u8"},{"name":"timeInForce","docs":["Time in seconds after `timestamp` at which the order expires.","A value of 0 means no expiry."],"type":"u16"},{"name":"padding","type":{"array":["u8",4]}},{"name":"key","docs":["The binary tree key, see new_node_key()"],"type":"u128"},{"name":"owner","docs":["Address of the owning OpenOrdersAccount"],"type":"publicKey"},{"name":"quantity","docs":["Number of base lots to buy or sell, always >=1"],"type":"i64"},{"name":"timestamp","docs":["The time the order was placed"],"type":"u64"},{"name":"pegLimit","docs":["If the effective price of an oracle pegged order exceeds this limit,","it will be considered invalid and may be removed.","","Only applicable in the oracle_pegged OrderTree"],"type":"i64"},{"name":"clientOrderId","docs":["User defined id for this order, used in FillEvents"],"type":"u64"}]}},{"name":"AnyNode","type":{"kind":"struct","fields":[{"name":"tag","type":"u8"},{"name":"data","type":{"array":["u8",87]}}]}},{"name":"OrderTreeRoot","type":{"kind":"struct","fields":[{"name":"maybeNode","type":"u32"},{"name":"leafCount","type":"u32"}]}},{"name":"OrderTreeNodes","docs":["A binary tree on AnyNode::key()","","The key encodes the price in the top 64 bits."],"type":{"kind":"struct","fields":[{"name":"orderTreeType","type":"u8"},{"name":"padding","type":{"array":["u8",3]}},{"name":"bumpIndex","type":"u32"},{"name":"freeListLen","type":"u32"},{"name":"freeListHead","type":"u32"},{"name":"reserved","type":{"array":["u8",512]}},{"name":"nodes","type":{"array":[{"defined":"AnyNode"},1024]}}]}},{"name":"I80F48","docs":["Nothing in Rust shall use these types. They only exist so that the Anchor IDL","knows about them and typescript can deserialize it."],"type":{"kind":"struct","fields":[{"name":"val","type":"i128"}]}},{"name":"PlaceOrderArgs","type":{"kind":"struct","fields":[{"name":"side","type":{"defined":"Side"}},{"name":"priceLots","type":"i64"},{"name":"maxBaseLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"clientOrderId","type":"u64"},{"name":"orderType","type":{"defined":"PlaceOrderType"}},{"name":"expiryTimestamp","type":"u64"},{"name":"selfTradeBehavior","type":{"defined":"SelfTradeBehavior"}},{"name":"limit","type":"u8"}]}},{"name":"PlaceMultipleOrdersArgs","type":{"kind":"struct","fields":[{"name":"priceLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"expiryTimestamp","type":"u64"}]}},{"name":"PlaceOrderPeggedArgs","type":{"kind":"struct","fields":[{"name":"side","type":{"defined":"Side"}},{"name":"priceOffsetLots","type":"i64"},{"name":"pegLimit","type":"i64"},{"name":"maxBaseLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"clientOrderId","type":"u64"},{"name":"orderType","type":{"defined":"PlaceOrderType"}},{"name":"expiryTimestamp","type":"u64"},{"name":"selfTradeBehavior","type":{"defined":"SelfTradeBehavior"}},{"name":"limit","type":"u8"}]}},{"name":"PlaceTakeOrderArgs","type":{"kind":"struct","fields":[{"name":"side","type":{"defined":"Side"}},{"name":"priceLots","type":"i64"},{"name":"maxBaseLots","type":"i64"},{"name":"maxQuoteLotsIncludingFees","type":"i64"},{"name":"orderType","type":{"defined":"PlaceOrderType"}},{"name":"limit","type":"u8"}]}},{"name":"OracleType","type":{"kind":"enum","variants":[{"name":"Pyth"},{"name":"Stub"},{"name":"SwitchboardV1"},{"name":"SwitchboardV2"},{"name":"RaydiumCLMM"}]}},{"name":"OrderState","type":{"kind":"enum","variants":[{"name":"Valid"},{"name":"Invalid"},{"name":"Skipped"}]}},{"name":"BookSideOrderTree","type":{"kind":"enum","variants":[{"name":"Fixed"},{"name":"OraclePegged"}]}},{"name":"EventType","type":{"kind":"enum","variants":[{"name":"Fill"},{"name":"Out"}]}},{"name":"NodeTag","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"InnerNode"},{"name":"LeafNode"},{"name":"FreeNode"},{"name":"LastFreeNode"}]}},{"name":"PlaceOrderType","type":{"kind":"enum","variants":[{"name":"Limit"},{"name":"ImmediateOrCancel"},{"name":"PostOnly"},{"name":"Market"},{"name":"PostOnlySlide"}]}},{"name":"PostOrderType","type":{"kind":"enum","variants":[{"name":"Limit"},{"name":"PostOnly"},{"name":"PostOnlySlide"}]}},{"name":"SelfTradeBehavior","docs":["Self trade behavior controls how taker orders interact with resting limit orders of the same account.","This setting has no influence on placing a resting or oracle pegged limit order that does not match","immediately, instead it's the responsibility of the user to correctly configure his taker orders."],"type":{"kind":"enum","variants":[{"name":"DecrementTake"},{"name":"CancelProvide"},{"name":"AbortTransaction"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Bid"},{"name":"Ask"}]}},{"name":"SideAndOrderTree","docs":["SideAndOrderTree is a storage optimization, so we don't need two bytes for the data"],"type":{"kind":"enum","variants":[{"name":"BidFixed"},{"name":"AskFixed"},{"name":"BidOraclePegged"},{"name":"AskOraclePegged"}]}},{"name":"OrderParams","type":{"kind":"enum","variants":[{"name":"Market"},{"name":"ImmediateOrCancel","fields":[{"name":"price_lots","type":"i64"}]},{"name":"Fixed","fields":[{"name":"price_lots","type":"i64"},{"name":"order_type","type":{"defined":"PostOrderType"}}]},{"name":"OraclePegged","fields":[{"name":"price_offset_lots","type":"i64"},{"name":"order_type","type":{"defined":"PostOrderType"}},{"name":"peg_limit","type":"i64"}]}]}},{"name":"OrderTreeType","type":{"kind":"enum","variants":[{"name":"Bids"},{"name":"Asks"}]}}],"events":[{"name":"DepositLog","fields":[{"name":"openOrdersAccount","type":"publicKey","index":false},{"name":"signer","type":"publicKey","index":false},{"name":"baseAmount","type":"u64","index":false},{"name":"quoteAmount","type":"u64","index":false}]},{"name":"FillLog","fields":[{"name":"market","type":"publicKey","index":false},{"name":"takerSide","type":"u8","index":false},{"name":"makerSlot","type":"u8","index":false},{"name":"makerOut","type":"bool","index":false},{"name":"timestamp","type":"u64","index":false},{"name":"seqNum","type":"u64","index":false},{"name":"maker","type":"publicKey","index":false},{"name":"makerClientOrderId","type":"u64","index":false},{"name":"makerFee","type":"u64","index":false},{"name":"makerTimestamp","type":"u64","index":false},{"name":"taker","type":"publicKey","index":false},{"name":"takerClientOrderId","type":"u64","index":false},{"name":"takerFeeCeil","type":"u64","index":false},{"name":"price","type":"i64","index":false},{"name":"quantity","type":"i64","index":false}]},{"name":"MarketMetaDataLog","fields":[{"name":"market","type":"publicKey","index":false},{"name":"name","type":"string","index":false},{"name":"baseMint","type":"publicKey","index":false},{"name":"quoteMint","type":"publicKey","index":false},{"name":"baseDecimals","type":"u8","index":false},{"name":"quoteDecimals","type":"u8","index":false},{"name":"baseLotSize","type":"i64","index":false},{"name":"quoteLotSize","type":"i64","index":false}]},{"name":"TotalOrderFillEvent","fields":[{"name":"side","type":"u8","index":false},{"name":"taker","type":"publicKey","index":false},{"name":"totalQuantityPaid","type":"u64","index":false},{"name":"totalQuantityReceived","type":"u64","index":false},{"name":"fees","type":"u64","index":false}]},{"name":"SetDelegateLog","fields":[{"name":"openOrdersAccount","type":"publicKey","index":false},{"name":"delegate","type":{"option":"publicKey"},"index":false}]},{"name":"SettleFundsLog","fields":[{"name":"openOrdersAccount","type":"publicKey","index":false},{"name":"baseNative","type":"u64","index":false},{"name":"quoteNative","type":"u64","index":false},{"name":"referrerRebate","type":"u64","index":false},{"name":"referrer","type":{"option":"publicKey"},"index":false}]},{"name":"SweepFeesLog","fields":[{"name":"market","type":"publicKey","index":false},{"name":"amount","type":"u64","index":false},{"name":"receiver","type":"publicKey","index":false}]},{"name":"OpenOrdersPositionLog","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"openOrdersAccountNum","type":"u32","index":false},{"name":"market","type":"publicKey","index":false},{"name":"bidsBaseLots","type":"i64","index":false},{"name":"bidsQuoteLots","type":"i64","index":false},{"name":"asksBaseLots","type":"i64","index":false},{"name":"baseFreeNative","type":"u64","index":false},{"name":"quoteFreeNative","type":"u64","index":false},{"name":"lockedMakerFees","type":"u64","index":false},{"name":"referrerRebatesAvailable","type":"u64","index":false},{"name":"makerVolume","type":"u128","index":false},{"name":"takerVolume","type":"u128","index":false}]}],"errors":[{"code":6000,"name":"SomeError","msg":""},{"code":6001,"name":"InvalidInputNameLength","msg":"Name lenght above limit"},{"code":6002,"name":"InvalidInputMarketExpired","msg":"Market cannot be created as expired"},{"code":6003,"name":"InvalidInputMarketFees","msg":"Taker fees should be positive and if maker fees are negative, greater or equal to their abs value"},{"code":6004,"name":"InvalidInputLots","msg":"Lots cannot be negative"},{"code":6005,"name":"InvalidInputLotsSize","msg":"Lots size above market limits"},{"code":6006,"name":"InvalidInputOrdersAmounts","msg":"Input amounts above limits"},{"code":6007,"name":"InvalidInputCancelSize","msg":"Price lots should be greater than zero"},{"code":6008,"name":"InvalidInputPriceLots","msg":"Expected cancel size should be greater than zero"},{"code":6009,"name":"InvalidInputPegLimit","msg":"Peg limit should be greater than zero"},{"code":6010,"name":"InvalidInputOrderType","msg":"The order type is invalid. A taker order must be Market or ImmediateOrCancel"},{"code":6011,"name":"InvalidInputOrderId","msg":"Order id cannot be zero"},{"code":6012,"name":"InvalidInputHeapSlots","msg":"Slot above heap limit"},{"code":6013,"name":"InvalidOracleTypes","msg":"Cannot combine two oracles of different providers"},{"code":6014,"name":"InvalidSecondOracle","msg":"Cannot configure secondary oracle without primary"},{"code":6015,"name":"NoCloseMarketAdmin","msg":"This market does not have a `close_market_admin` and thus cannot be closed."},{"code":6016,"name":"InvalidCloseMarketAdmin","msg":"The signer of this transaction is not this market's `close_market_admin`."},{"code":6017,"name":"InvalidOpenOrdersAdmin","msg":"The `open_orders_admin` required by this market to sign all instructions that creates orders is missing or is not valid"},{"code":6018,"name":"InvalidConsumeEventsAdmin","msg":"The `consume_events_admin` required by this market to sign all instructions that consume events is missing or is not valid"},{"code":6019,"name":"InvalidMarketVault","msg":"Provided `market_vault` is invalid"},{"code":6020,"name":"IndexerActiveOO","msg":"Cannot be closed due to the existence of open orders accounts"},{"code":6021,"name":"OraclePegInvalidOracleState","msg":"Cannot place a peg order due to invalid oracle state"},{"code":6022,"name":"UnknownOracleType","msg":"oracle type cannot be determined"},{"code":6023,"name":"OracleConfidence","msg":"an oracle does not reach the confidence threshold"},{"code":6024,"name":"OracleStale","msg":"an oracle is stale"},{"code":6025,"name":"OrderIdNotFound","msg":"Order id not found on the orderbook"},{"code":6026,"name":"EventHeapContainsElements","msg":"Event heap contains elements and market can't be closed"},{"code":6027,"name":"InvalidOrderPostIOC","msg":"ImmediateOrCancel is not a PostOrderType"},{"code":6028,"name":"InvalidOrderPostMarket","msg":"Market is not a PostOrderType"},{"code":6029,"name":"WouldSelfTrade","msg":"would self trade"},{"code":6030,"name":"MarketHasExpired","msg":"The Market has already expired."},{"code":6031,"name":"InvalidPriceLots","msg":"Price lots should be greater than zero"},{"code":6032,"name":"InvalidOraclePrice","msg":"Oracle price above market limits"},{"code":6033,"name":"MarketHasNotExpired","msg":"The Market has not expired yet."},{"code":6034,"name":"NoOwnerOrDelegate","msg":"No correct owner or delegate."},{"code":6035,"name":"NoOwner","msg":"No correct owner"},{"code":6036,"name":"OpenOrdersFull","msg":"No free order index in open orders account"},{"code":6037,"name":"BookContainsElements","msg":"Book contains elements"},{"code":6038,"name":"OpenOrdersOrderNotFound","msg":"Could not find order in user account"},{"code":6039,"name":"InvalidPostAmount","msg":"Amount to post above book limits"},{"code":6040,"name":"DisabledOraclePeg","msg":"Oracle peg orders are not enabled for this market"},{"code":6041,"name":"NonEmptyMarket","msg":"Cannot close a non-empty market"},{"code":6042,"name":"NonEmptyOpenOrdersPosition","msg":"Cannot close a non-empty open orders account"}]} \ No newline at end of file diff --git a/idls/orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json b/idls/orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json new file mode 100644 index 0000000..2c861b2 --- /dev/null +++ b/idls/orca_wavebreak.waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF.json @@ -0,0 +1 @@ +{"version":"1.1.5","name":"orca_wavebreak_program","instructions":[{"name":"PermissionConsumeTopLevel","accounts":[{"name":"consumer","isMut":true,"isSigner":true,"docs":["The consumer of the permission"]},{"name":"permissionConfig","isMut":false,"isSigner":false,"docs":["The permission config account"]},{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The permission program account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"instructions","isMut":false,"isSigner":false,"docs":["Sysvar instructions"]}],"args":[{"name":"permissionMessage","type":{"defined":"PermissionMessage"}},{"name":"permissionSignature","type":{"defined":"PermissionSignature"}}],"discriminant":{"type":"u8","value":0}},{"name":"PermissionConsumeCpi","accounts":[{"name":"consumer","isMut":true,"isSigner":true,"docs":["The consumer of the permission"]},{"name":"consumerProgramAuthority","isMut":false,"isSigner":true,"docs":["Any pda of the consumer program"]},{"name":"permissionConfig","isMut":false,"isSigner":false,"docs":["The permission config account"]},{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The permission program account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"permissionMessage","type":{"defined":"PermissionMessage"}},{"name":"permissionSignature","type":{"defined":"PermissionSignature"}},{"name":"consumerProgramAuthoritySeeds","type":{"vec":"bytes"}}],"discriminant":{"type":"u8","value":1}},{"name":"PermissionConfigInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to initialize a permission config"]},{"name":"permissionConfig","isMut":true,"isSigner":false,"docs":["The permission config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"permissionAuthority","type":{"defined":"PermissionSigner"}},{"name":"consumerProgram","type":"publicKey"}],"discriminant":{"type":"u8","value":2}},{"name":"PermissionConfigUpdate","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to update a permission config"]},{"name":"permissionConfig","isMut":true,"isSigner":false,"docs":["The permission config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"update","type":{"defined":"PermissionConfigUpdateType"}}],"discriminant":{"type":"u8","value":3}},{"name":"PermissionConfigClose","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to close a permission config"]},{"name":"permissionConfig","isMut":true,"isSigner":false,"docs":["The permission config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[],"discriminant":{"type":"u8","value":4}},{"name":"PermissionRevoke","accounts":[{"name":"funder","isMut":true,"isSigner":true,"docs":["The funder of the consumed permission PDA"]},{"name":"permissionConfig","isMut":false,"isSigner":false,"docs":["The permission config account"]},{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The consumed permission account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"permissionMessage","type":{"defined":"PermissionMessage"}},{"name":"permissionSignature","type":{"defined":"PermissionSignature"}}],"discriminant":{"type":"u8","value":5}},{"name":"PermissionRefund","accounts":[{"name":"consumedPermission","isMut":true,"isSigner":false,"docs":["The consumed permission account"]},{"name":"refundDestination","isMut":true,"isSigner":false,"docs":["The destination to refund the rent to"]}],"args":[],"discriminant":{"type":"u8","value":6}},{"name":"ReservedPermissionA","accounts":[],"args":[],"discriminant":{"type":"u8","value":7}},{"name":"TokenBuyExactIn","accounts":[{"name":"buyer","isMut":true,"isSigner":true,"docs":["The buyer of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the buyer"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the buyer"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountIn","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":8}},{"name":"TokenBuyExactOut","accounts":[{"name":"buyer","isMut":true,"isSigner":true,"docs":["The buyer of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the buyer"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the buyer"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountOut","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":9}},{"name":"TokenSellExactIn","accounts":[{"name":"seller","isMut":true,"isSigner":true,"docs":["The seller of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the seller"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the seller"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountIn","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":10}},{"name":"TokenSellExactOut","accounts":[{"name":"seller","isMut":true,"isSigner":true,"docs":["The seller of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseAta","isMut":true,"isSigner":false,"docs":["The base token ata for the seller"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"quoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata for the seller"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the base token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]}],"args":[{"name":"amountOut","type":"u64"},{"name":"allowPartialFill","type":"bool"},{"name":"priceThreshold","type":{"option":{"tuple":["u64","u64"]}}}],"discriminant":{"type":"u8","value":11}},{"name":"TokenRefund","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The signer's quote token ata account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"signerBaseAta","isMut":true,"isSigner":false,"docs":["The signer's base token ata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]}],"args":[],"discriminant":{"type":"u8","value":12}},{"name":"ReservedTokenY","accounts":[],"args":[],"discriminant":{"type":"u8","value":13}},{"name":"ReservedTokenZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":14}},{"name":"ReservedTokenA","accounts":[],"args":[],"discriminant":{"type":"u8","value":15}},{"name":"AuthorityConfigInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority of the config"]},{"name":"authorityConfig","isMut":true,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[],"discriminant":{"type":"u8","value":16}},{"name":"AuthorityConfigGrant","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to update the config"]},{"name":"authorityConfig","isMut":true,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"account","type":"publicKey"},{"name":"privileges","type":{"vec":{"defined":"Privilege"}}}],"discriminant":{"type":"u8","value":17}},{"name":"AuthorityConfigRevoke","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to update the config"]},{"name":"authorityConfig","isMut":true,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"account","type":"publicKey"},{"name":"privileges","type":{"vec":{"defined":"Privilege"}}}],"discriminant":{"type":"u8","value":18}},{"name":"ReservedAuthorityConfigY","accounts":[],"args":[],"discriminant":{"type":"u8","value":19}},{"name":"ReservedAuthorityConfigZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":20}},{"name":"ReservedAuthorityConfigA","accounts":[],"args":[],"discriminant":{"type":"u8","value":21}},{"name":"ReservedAuthorityConfigB","accounts":[],"args":[],"discriminant":{"type":"u8","value":22}},{"name":"ReservedAuthorityConfigC","accounts":[],"args":[],"discriminant":{"type":"u8","value":23}},{"name":"MintConfigInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to initialize a mint config"]},{"name":"mintConfig","isMut":true,"isSigner":false,"docs":["The mint config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]}],"args":[{"name":"tokenMint","type":"publicKey"},{"name":"instructionDiscriminator","type":"u8"}],"discriminant":{"type":"u8","value":24}},{"name":"MintConfigClose","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to close a mint config"]},{"name":"mintConfig","isMut":true,"isSigner":false,"docs":["The mint config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[],"discriminant":{"type":"u8","value":25}},{"name":"MintConfigUpdate","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to update a mint config"]},{"name":"mintConfig","isMut":true,"isSigner":false,"docs":["The mint config account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]}],"args":[{"name":"update","type":{"defined":"MintConfigUpdateType"}}],"discriminant":{"type":"u8","value":26}},{"name":"ReservedMintConfigY","accounts":[],"args":[],"discriminant":{"type":"u8","value":27}},{"name":"ReservedMintConfigZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":28}},{"name":"ReservedMintConfigA","accounts":[],"args":[],"discriminant":{"type":"u8","value":29}},{"name":"ReservedMintConfigB","accounts":[],"args":[],"discriminant":{"type":"u8","value":30}},{"name":"ReservedMintConfigC","accounts":[],"args":[],"discriminant":{"type":"u8","value":31}},{"name":"GraduateWhirlpool","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"lpAuthority","isMut":false,"isSigner":false,"docs":["The lp authority of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata account"]},{"name":"lpAuthorityQuoteAta","isMut":true,"isSigner":false,"docs":["The lp authority quote token ata account"]},{"name":"whirlpoolQuoteVault","isMut":true,"isSigner":false,"docs":["The whirlpool quote vault account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"baseVault","isMut":true,"isSigner":false,"docs":["The config base vault account"]},{"name":"lpAuthorityBaseAta","isMut":true,"isSigner":false,"docs":["The lp authority base token ata account"]},{"name":"whirlpoolBaseVault","isMut":true,"isSigner":false,"docs":["The whirlpool base vault account"]},{"name":"whirlpoolConfig","isMut":false,"isSigner":false,"docs":["The whirlpool config account"]},{"name":"feeTier","isMut":false,"isSigner":false,"docs":["The fee tier account"]},{"name":"whirlpool","isMut":true,"isSigner":false,"docs":["The whirlpool account"]},{"name":"oracle","isMut":true,"isSigner":false,"docs":["The whirlpool oracle account"]},{"name":"position","isMut":true,"isSigner":false,"docs":["The position account"]},{"name":"positionMint","isMut":true,"isSigner":false,"docs":["The position mint account"]},{"name":"positionTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account for the bonding curve"]},{"name":"lpAuthorityTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account for the lp authority"]},{"name":"lowerTickArray","isMut":true,"isSigner":false,"docs":["The lower tick array account"]},{"name":"upperTickArray","isMut":true,"isSigner":false,"docs":["The upper tick array account"]},{"name":"quoteTokenBadge","isMut":false,"isSigner":false,"docs":["The quote token badge account"]},{"name":"baseTokenBadge","isMut":false,"isSigner":false,"docs":["The base token badge account"]},{"name":"whirlpoolInitAuthority","isMut":false,"isSigner":false,"docs":["The whirlpool init authority account"]},{"name":"whirlpoolUpdateAuthority","isMut":false,"isSigner":false,"docs":["The whirlpool update authority account"]},{"name":"lockConfig","isMut":true,"isSigner":false,"docs":["The lock config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]},{"name":"token22Program","isMut":false,"isSigner":false,"docs":["The token 22 program"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["The memo program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["The rent sysvar"]}],"args":[],"discriminant":{"type":"u8","value":32}},{"name":"GraduateManual","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"destination","isMut":false,"isSigner":false,"docs":["The destination of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote vault account"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The quote token ata account"]},{"name":"destinationQuoteAta","isMut":true,"isSigner":false,"docs":["The destination quote ata account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base mint account"]},{"name":"destinationBaseAta","isMut":true,"isSigner":false,"docs":["The destination base ata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program account"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program account"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program account"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program account"]}],"args":[],"discriminant":{"type":"u8","value":33}},{"name":"ReservedGraduateX","accounts":[],"args":[],"discriminant":{"type":"u8","value":34}},{"name":"ReservedGraduateY","accounts":[],"args":[],"discriminant":{"type":"u8","value":35}},{"name":"ReservedGraduateZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":36}},{"name":"ReservedGraduateA","accounts":[],"args":[],"discriminant":{"type":"u8","value":37}},{"name":"ReservedGraduateB","accounts":[],"args":[],"discriminant":{"type":"u8","value":38}},{"name":"ReservedGraduateC","accounts":[],"args":[],"discriminant":{"type":"u8","value":39}},{"name":"CreateLockedlaunch","accounts":[{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":true,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"mintConfig","isMut":false,"isSigner":false,"docs":["The base token mint config account"]},{"name":"metadata","isMut":true,"isSigner":false,"docs":["The metadata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"metaplexProgram","isMut":false,"isSigner":false,"docs":["The metaplex metadata program"]}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}],"discriminant":{"type":"u8","value":40}},{"name":"CreateLaunch","accounts":[{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":true,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"mintConfig","isMut":false,"isSigner":false,"docs":["The base token mint config account"]},{"name":"metadata","isMut":true,"isSigner":false,"docs":["The metadata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"metaplexProgram","isMut":false,"isSigner":false,"docs":["The metaplex metadata program"]}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"startPrice","type":{"option":"u128"}},{"name":"endPrice","type":{"option":"u128"}},{"name":"controlPoints","type":{"option":{"array":["u16",4]}}},{"name":"graduationTarget","type":{"option":"u64"}},{"name":"graduationMethods","type":{"option":{"array":[{"defined":"GraduationMethod"},8]}}},{"name":"launchTime","type":{"option":"i64"}},{"name":"graduationTime","type":{"option":"i64"}},{"name":"baseAllocationBps","type":{"option":"u16"}}],"discriminant":{"type":"u8","value":41}},{"name":"CreatePresale","accounts":[{"name":"creator","isMut":true,"isSigner":true,"docs":["The creator of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":true,"isSigner":true,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"mintConfig","isMut":false,"isSigner":false,"docs":["The base token mint config account"]},{"name":"metadata","isMut":true,"isSigner":false,"docs":["The metadata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"metaplexProgram","isMut":false,"isSigner":false,"docs":["The metaplex metadata program"]}],"args":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"tokenPrice","type":{"option":"u128"}},{"name":"graduationTarget","type":{"option":"u64"}},{"name":"graduationMethods","type":{"option":{"array":[{"defined":"GraduationMethod"},8]}}},{"name":"launchTime","type":{"option":"i64"}},{"name":"graduationTime","type":{"option":"i64"}},{"name":"minReserveBps","type":{"option":"u16"}},{"name":"baseAllocationBps","type":{"option":"u16"}}],"discriminant":{"type":"u8","value":42}},{"name":"ReservedCreateY","accounts":[],"args":[],"discriminant":{"type":"u8","value":43}},{"name":"ReservedCreateZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":44}},{"name":"ReservedCreateA","accounts":[],"args":[],"discriminant":{"type":"u8","value":45}},{"name":"ReservedCreateB","accounts":[],"args":[],"discriminant":{"type":"u8","value":46}},{"name":"ReservedCreateC","accounts":[],"args":[],"discriminant":{"type":"u8","value":47}},{"name":"BondingCurveInitialize","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority that is allowed to initialize a bonding curve"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":false,"isSigner":false,"docs":["The token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the new token"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The token program for the quote token"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]}],"args":[{"name":"startPrice","type":"u128"},{"name":"endPrice","type":"u128"},{"name":"controlPoints","type":{"array":["u16",4]}},{"name":"creator","type":"publicKey"},{"name":"graduationMethods","type":{"array":[{"defined":"GraduationMethod"},8]}},{"name":"swapFeeBps","type":"u16"},{"name":"quoteFeeBps","type":"u16"},{"name":"baseFeeBps","type":"u16"},{"name":"launchTime","type":"i64"},{"name":"creatorReward","type":"u64"},{"name":"graduationReward","type":"u64"},{"name":"graduationTarget","type":"u64"},{"name":"graduationTime","type":"i64"},{"name":"minReserveBps","type":"u16"},{"name":"buyRequiresPermission","type":"bool"},{"name":"buyPermissionBitmap","type":{"array":["u8",32]}},{"name":"sellRequiresPermission","type":"bool"},{"name":"sellPermissionBitmap","type":{"array":["u8",32]}},{"name":"maxBuyAmount","type":"u64"},{"name":"maxSellAmount","type":"u64"},{"name":"retainMintAuthority","type":"bool"},{"name":"baseAllocationBps","type":"u16"}],"discriminant":{"type":"u8","value":48}},{"name":"BondingCurveCollectFees","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["The fee authority of the program"]},{"name":"feeAuthorityAta","isMut":true,"isSigner":false,"docs":["The fee authority associated token account"]},{"name":"bondingCurve","isMut":false,"isSigner":false,"docs":["The bonding curve account"]},{"name":"baseMint","isMut":false,"isSigner":false,"docs":["The base token mint account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]}],"args":[],"discriminant":{"type":"u8","value":49}},{"name":"BondingCurveGraduate","accounts":[{"name":"signer","isMut":true,"isSigner":true,"docs":["The signer of the transaction"]},{"name":"creator","isMut":true,"isSigner":false,"docs":["The creator of the token"]},{"name":"feeAuthority","isMut":true,"isSigner":false,"docs":["The fee authority of the token"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"signerQuoteAta","isMut":true,"isSigner":false,"docs":["The signer's quote token ata account"]},{"name":"creatorQuoteAta","isMut":true,"isSigner":false,"docs":["The creator's quote token ata account"]},{"name":"feeAuthorityQuoteAta","isMut":true,"isSigner":false,"docs":["The fee authority's quote token ata account"]},{"name":"baseMint","isMut":true,"isSigner":false,"docs":["The base token mint account"]},{"name":"creatorBaseAta","isMut":true,"isSigner":false,"docs":["The creator's base token ata account"]},{"name":"feeAuthorityBaseAta","isMut":true,"isSigner":false,"docs":["The fee authority's base token ata account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["System program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]}],"args":[],"discriminant":{"type":"u8","value":50}},{"name":"BondingCurveClose","accounts":[{"name":"authority","isMut":false,"isSigner":true,"docs":["The authority that is allowed to close a bonding curve"]},{"name":"creator","isMut":true,"isSigner":false,"docs":["The creator of the bonding curve"]},{"name":"feeAuthority","isMut":false,"isSigner":false,"docs":["The fee authority of the bonding curve"]},{"name":"bondingCurve","isMut":true,"isSigner":false,"docs":["The bonding curve account"]},{"name":"quoteMint","isMut":false,"isSigner":false,"docs":["The quote token mint account"]},{"name":"quoteVault","isMut":true,"isSigner":false,"docs":["The quote token vault"]},{"name":"feeAuthorityQuoteAta","isMut":true,"isSigner":false,"docs":["The fee authority's quote token ata account"]},{"name":"baseMint","isMut":false,"isSigner":false,"docs":["The base token mint account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"quoteTokenProgram","isMut":false,"isSigner":false,"docs":["The quote token program"]},{"name":"baseTokenProgram","isMut":false,"isSigner":false,"docs":["The base token program"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The associated token account program"]}],"args":[],"discriminant":{"type":"u8","value":51}},{"name":"ReservedBondingCurveX","accounts":[],"args":[],"discriminant":{"type":"u8","value":52}},{"name":"ReservedBondingCurveY","accounts":[],"args":[],"discriminant":{"type":"u8","value":53}},{"name":"ReservedBondingCurveZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":54}},{"name":"ReservedBondingCurveA","accounts":[],"args":[],"discriminant":{"type":"u8","value":55}},{"name":"LpHarvest","accounts":[{"name":"lpAuthority","isMut":true,"isSigner":true,"docs":["The authority of the lp escrow account"]},{"name":"lpEscrow","isMut":false,"isSigner":false,"docs":["The LP escrow account"]},{"name":"whirlpool","isMut":true,"isSigner":false,"docs":["The whirlpool account"]},{"name":"position","isMut":true,"isSigner":false,"docs":["The position account"]},{"name":"positionTokenAccount","isMut":false,"isSigner":false,"docs":["The position token account"]},{"name":"lowerTickArray","isMut":false,"isSigner":false,"docs":["The lower tick array account"]},{"name":"upperTickArray","isMut":false,"isSigner":false,"docs":["The upper tick array account"]},{"name":"tokenAMint","isMut":true,"isSigner":false,"docs":["The token mint a account"]},{"name":"tokenBMint","isMut":true,"isSigner":false,"docs":["The token mint b account"]},{"name":"tokenAAta","isMut":true,"isSigner":false,"docs":["The token owner a account"]},{"name":"tokenBAta","isMut":true,"isSigner":false,"docs":["The token owner b account"]},{"name":"tokenAVault","isMut":true,"isSigner":false,"docs":["The token vault a account"]},{"name":"tokenBVault","isMut":true,"isSigner":false,"docs":["The token vault b account"]},{"name":"reward1Mint","isMut":false,"isSigner":false,"docs":["The reward mint 1 account"]},{"name":"reward2Mint","isMut":false,"isSigner":false,"docs":["The reward mint 2 account"]},{"name":"reward3Mint","isMut":false,"isSigner":false,"docs":["The reward mint 3 account"]},{"name":"reward1Ata","isMut":true,"isSigner":false,"docs":["The reward owner 1 account"]},{"name":"reward2Ata","isMut":true,"isSigner":false,"docs":["The reward owner 2 account"]},{"name":"reward3Ata","isMut":true,"isSigner":false,"docs":["The reward owner 3 account"]},{"name":"reward1Vault","isMut":true,"isSigner":false,"docs":["The reward vault 1 account"]},{"name":"reward2Vault","isMut":true,"isSigner":false,"docs":["The reward vault 2 account"]},{"name":"reward3Vault","isMut":true,"isSigner":false,"docs":["The reward vault 3 account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"tokenAProgram","isMut":false,"isSigner":false,"docs":["The token a program"]},{"name":"tokenBProgram","isMut":false,"isSigner":false,"docs":["The token b program"]},{"name":"reward1TokenProgram","isMut":false,"isSigner":false,"docs":["The token reward 1 program"]},{"name":"reward2TokenProgram","isMut":false,"isSigner":false,"docs":["The token reward 2 program"]},{"name":"reward3TokenProgram","isMut":false,"isSigner":false,"docs":["The token reward 3 program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["The memo program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]}],"args":[],"discriminant":{"type":"u8","value":56}},{"name":"LpTransfer","accounts":[{"name":"lpAuthority","isMut":true,"isSigner":true,"docs":["The authority of the lp escrow account"]},{"name":"newLpAuthority","isMut":false,"isSigner":false,"docs":["The new authority of the lp escrow account"]},{"name":"lpEscrow","isMut":false,"isSigner":false,"docs":["The lp escrow account"]},{"name":"newLpEscrow","isMut":false,"isSigner":false,"docs":["The new lp escrow account"]},{"name":"positionMint","isMut":false,"isSigner":false,"docs":["The position mint account"]},{"name":"position","isMut":false,"isSigner":false,"docs":["The position account"]},{"name":"positionTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account"]},{"name":"newPositionTokenAccount","isMut":true,"isSigner":false,"docs":["The new position token account"]},{"name":"lockConfig","isMut":true,"isSigner":false,"docs":["The lock config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"token22Program","isMut":false,"isSigner":false,"docs":["The token 22 program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]}],"args":[],"discriminant":{"type":"u8","value":57}},{"name":"LpTakeover","accounts":[{"name":"authority","isMut":true,"isSigner":true,"docs":["The authority account"]},{"name":"authorityConfig","isMut":false,"isSigner":false,"docs":["The authority config account"]},{"name":"lpAuthority","isMut":false,"isSigner":false,"docs":["The authority of the lp escrow account"]},{"name":"newLpAuthority","isMut":false,"isSigner":false,"docs":["The new authority of the lp escrow account"]},{"name":"lpEscrow","isMut":false,"isSigner":false,"docs":["The lp escrow account"]},{"name":"newLpEscrow","isMut":false,"isSigner":false,"docs":["The new lp escrow account"]},{"name":"positionMint","isMut":false,"isSigner":false,"docs":["The position mint account"]},{"name":"position","isMut":false,"isSigner":false,"docs":["The position account"]},{"name":"positionTokenAccount","isMut":true,"isSigner":false,"docs":["The position token account"]},{"name":"newPositionTokenAccount","isMut":true,"isSigner":false,"docs":["The new position token account"]},{"name":"lockConfig","isMut":true,"isSigner":false,"docs":["The lock config account"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["The system program"]},{"name":"token22Program","isMut":false,"isSigner":false,"docs":["The token 22 program"]},{"name":"ataProgram","isMut":false,"isSigner":false,"docs":["The ata program"]},{"name":"whirlpoolProgram","isMut":false,"isSigner":false,"docs":["The whirlpool program"]}],"args":[],"discriminant":{"type":"u8","value":58}},{"name":"ReservedLpX","accounts":[],"args":[],"discriminant":{"type":"u8","value":59}},{"name":"ReservedLpY","accounts":[],"args":[],"discriminant":{"type":"u8","value":60}},{"name":"ReservedLpZ","accounts":[],"args":[],"discriminant":{"type":"u8","value":61}},{"name":"ReservedLpA","accounts":[],"args":[],"discriminant":{"type":"u8","value":62}},{"name":"ReservedLpB","accounts":[],"args":[],"discriminant":{"type":"u8","value":63}}],"accounts":[{"name":"AuthorityConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"authorities","type":{"array":[{"defined":"ProgramAuthority"},64]}}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"baseMint","type":"publicKey"},{"name":"quoteMint","type":"publicKey"},{"name":"creator","type":"publicKey"},{"name":"retainMintAuthority","type":"bool"},{"name":"buyRequiresPermission","type":"bool"},{"name":"buyPermissionBitmap","type":{"array":["u8",32]}},{"name":"sellRequiresPermission","type":"bool"},{"name":"sellPermissionBitmap","type":{"array":["u8",32]}},{"name":"quoteFeeBps","type":"u16"},{"name":"baseFeeBps","type":"u16"},{"name":"controlPoints","type":{"array":["u16",4]}},{"name":"startPrice","type":"u128"},{"name":"endPrice","type":"u128"},{"name":"quoteAmount","type":"u64"},{"name":"baseAmount","type":"u64"},{"name":"launchTime","type":"i64"},{"name":"creatorReward","type":"u64"},{"name":"graduationTarget","type":"u64"},{"name":"graduationTime","type":"i64"},{"name":"graduationReward","type":"u64"},{"name":"maxBuyAmount","type":"u64"},{"name":"maxSellAmount","type":"u64"},{"name":"swapFeeBps","type":"u16"},{"name":"baseAllocationBps","type":"u16"},{"name":"graduationMethods","type":{"array":[{"defined":"GraduationMethodData"},8]}},{"name":"minReserveBps","type":"u16"},{"name":"padding1","type":{"array":["u8",2]}},{"name":"premintedSupply","type":"u64"},{"name":"padding2","type":{"array":["u8",728]}}]}},{"name":"MintConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"instructionDiscriminator","type":"u8"},{"name":"quoteMint","type":"publicKey"},{"name":"createRequiresPermission","type":"bool"},{"name":"createPermissionBitmap","type":{"array":["u8",32]}},{"name":"defaultBuyRequiresPermission","type":"bool"},{"name":"defaultBuyPermissionBitmap","type":{"array":["u8",32]}},{"name":"defaultSellRequiresPermission","type":"bool"},{"name":"defaultSellPermissionBitmap","type":{"array":["u8",32]}},{"name":"padding1","type":{"array":["u8",3]}},{"name":"defaultCreatorReward","type":"u64"},{"name":"defaultGraduationReward","type":"u64"},{"name":"defaultGraduationTarget","type":"u64"},{"name":"defaultMaxBuyAmount","type":"u64"},{"name":"defaultMaxSellAmount","type":"u64"},{"name":"defaultStartPrice","type":"u128"},{"name":"defaultEndPrice","type":"u128"},{"name":"defaultControlPoints","type":{"array":["u16",4]}},{"name":"defaultSwapFeeBps","type":"u16"},{"name":"defaultQuoteFeeBps","type":"u16"},{"name":"defaultBaseFeeBps","type":"u16"},{"name":"padding2","type":{"array":["u8",1826]}}]}},{"name":"PermissionConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"consumerProgram","type":"publicKey"},{"name":"allowedSigners","type":{"array":[{"defined":"PermissionSigner"},3]}},{"name":"padding","type":{"array":["u8",124]}}]}},{"name":"ConsumedPermission","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"defined":"AccountDiscriminator"}},{"name":"padding1","type":{"array":["u8",7]}},{"name":"safeToCloseSlot","type":"u64"},{"name":"refundDestination","type":"publicKey"},{"name":"padding2","type":{"array":["u8",16]}}]}}],"types":[{"name":"MetaplexMetadata","type":{"kind":"struct","fields":[{"name":"discriminator","type":"u8"},{"name":"updateAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"data","type":{"defined":"MetaplexData"}},{"name":"primarySaleHappened","type":"bool"},{"name":"mutable","type":"bool"},{"name":"editionNonce","type":{"option":"u8"}},{"name":"tokenStandard","type":{"option":{"defined":"MetaplexTokenStandard"}}},{"name":"collection","type":{"option":{"defined":"MetaplexCollection"}}},{"name":"uses","type":{"option":{"defined":"MetaplexUses"}}},{"name":"collectionDetails","type":{"option":{"defined":"MetaplexCollectionDetails"}}},{"name":"programmableConfig","type":{"option":{"defined":"MetaplexProgrammableConfig"}}}]}},{"name":"MetaplexData","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"sellerFeeBasisPoints","type":"u16"},{"name":"creators","type":{"option":{"vec":{"defined":"MetaplexCreator"}}}}]}},{"name":"MetaplexCreator","type":{"kind":"struct","fields":[{"name":"address","type":"publicKey"},{"name":"verified","type":"bool"},{"name":"share","type":"u8"}]}},{"name":"MetaplexCollection","type":{"kind":"struct","fields":[{"name":"verified","type":"bool"},{"name":"key","type":"publicKey"}]}},{"name":"MetaplexUses","type":{"kind":"struct","fields":[{"name":"useMethod","type":{"defined":"MetaplexUseMethod"}},{"name":"remaining","type":"u64"},{"name":"total","type":"u64"}]}},{"name":"TokenMint","type":{"kind":"struct","fields":[{"name":"mintAuthorityFlag","type":"u32"},{"name":"mintAuthority","type":"publicKey"},{"name":"supply","type":"u64"},{"name":"decimals","type":"u8"},{"name":"isInitialized","type":"bool"},{"name":"freezeAuthorityFlag","type":"u32"},{"name":"freezeAuthority","type":"publicKey"}]}},{"name":"TokenAccount","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"owner","type":"publicKey"},{"name":"amount","type":"u64"},{"name":"delegateFlag","type":"u32"},{"name":"delegate","type":"publicKey"},{"name":"state","type":{"defined":"TokenAccountState"}},{"name":"isNativeFlag","type":"u32"},{"name":"nativeAmount","type":"u64"},{"name":"delegateAmount","type":"u64"},{"name":"closeAuthorityFlag","type":"u32"},{"name":"closeAuthority","type":"publicKey"}]}},{"name":"TokenMetadata","type":{"kind":"struct","fields":[{"name":"updateAuthority","type":"publicKey"},{"name":"mint","type":"publicKey"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"additionalMetadata","type":{"vec":{"tuple":["string","string"]}}}]}},{"name":"TokenMetadataPointer","type":{"kind":"struct","fields":[{"name":"updateAuthority","type":"publicKey"},{"name":"metadataAddress","type":"publicKey"}]}},{"name":"WhirlpoolFeeTier","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpoolConfig","type":"publicKey"},{"name":"tickSpacing","type":"u16"},{"name":"defaultFeeRate","type":"u16"}]}},{"name":"WhirlpoolAdaptiveFeeTier","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpoolConfig","type":"publicKey"},{"name":"feeTierIndex","type":"u16"},{"name":"tickSpacing","type":"u16"},{"name":"initializePoolAuthority","type":"publicKey"},{"name":"delegatedFeeAuthority","type":"publicKey"},{"name":"defaultBaseFeeRate","type":"u16"},{"name":"filterPeriod","type":"u16"},{"name":"decayPeriod","type":"u16"},{"name":"reductionFactor","type":"u16"},{"name":"adaptiveFeeControlFactor","type":"u32"},{"name":"maxVolatilityAccumulator","type":"u32"},{"name":"tickGroupSize","type":"u16"},{"name":"majorSwapThresholdTicks","type":"u16"}]}},{"name":"WhirlpoolConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"feeAuthority","type":"publicKey"},{"name":"collectProtocolFeesAuthority","type":"publicKey"},{"name":"rewardEmissionsSuperAuthority","type":"publicKey"},{"name":"defaultProtocolFeeRate","type":"u16"},{"name":"featureFlags","type":"u16"}]}},{"name":"Whirlpool","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpoolConfig","type":"publicKey"},{"name":"whirlpoolBump","type":"u8"},{"name":"tickSpacing","type":"u16"},{"name":"feeTierIndex","type":"u16"},{"name":"feeRate","type":"u16"},{"name":"protocolFeeRate","type":"u16"},{"name":"liquidity","type":"u128"},{"name":"sqrtPrice","type":"u128"},{"name":"tickCurrentIndex","type":"i32"},{"name":"protocolFeeOwedA","type":"u64"},{"name":"protocolFeeOwedB","type":"u64"},{"name":"tokenAMint","type":"publicKey"},{"name":"tokenAVault","type":"publicKey"},{"name":"feeGrowthGlobalA","type":"u128"},{"name":"tokenBMint","type":"publicKey"},{"name":"tokenBVault","type":"publicKey"},{"name":"feeGrowthGlobalB","type":"u128"},{"name":"rewardLastUpdatedTimestamp","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"WhirlpoolRewardInfo"},3]}}]}},{"name":"WhirlpoolRewardInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"},{"name":"vault","type":"publicKey"},{"name":"authority","type":"publicKey"},{"name":"emissionsPerSecondX64","type":"u128"},{"name":"growthGlobalX64","type":"u128"}]}},{"name":"WhirlpoolLockConfig","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"position","type":"publicKey"},{"name":"positionOwner","type":"publicKey"},{"name":"whirlpool","type":"publicKey"},{"name":"lockedTimestamp","type":"u64"},{"name":"lockType","type":{"defined":"LockTypeLabel"}}]}},{"name":"WhirlpoolPosition","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"whirlpool","type":"publicKey"},{"name":"positionMint","type":"publicKey"},{"name":"liquidity","type":"u128"},{"name":"tickLowerIndex","type":"i32"},{"name":"tickUpperIndex","type":"i32"},{"name":"feeGrowthCheckpointA","type":"u128"},{"name":"feeOwedA","type":"u64"},{"name":"feeGrowthCheckpointB","type":"u128"},{"name":"feeOwedB","type":"u64"},{"name":"rewardInfos","type":{"array":[{"defined":"WhirlpoolPositionRewardInfo"},3]}}]}},{"name":"WhirlpoolPositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growthInsideCheckpoint","type":"u128"},{"name":"amountOwed","type":"u64"}]}},{"name":"WhirlpoolTickArray","type":{"kind":"struct","fields":[{"name":"discriminator","type":{"array":["u8",8]}},{"name":"startTickIndex","type":"i32"},{"name":"ticks","type":{"array":["u8",9944]}},{"name":"whirlpool","type":"publicKey"}]}},{"name":"ProgramAuthority","type":{"kind":"struct","fields":[{"name":"key","type":"publicKey"},{"name":"privileges","type":{"array":["u8",32]}}]}},{"name":"GraduationMethodData","type":{"kind":"struct","fields":[{"name":"label","type":{"defined":"GraduationMethodLabel"}},{"name":"graduated","type":"bool"},{"name":"feeTierIndex","type":"u16"},{"name":"splitBps","type":"u16"},{"name":"destination","type":"publicKey"},{"name":"unlocked","type":"bool"},{"name":"padding","type":{"array":["u8",89]}}]}},{"name":"PermissionSigner","type":{"kind":"struct","fields":[{"name":"bytes","type":{"array":["u8",33]}}]}},{"name":"PermissionSignature","type":{"kind":"struct","fields":[{"name":"recoveryId","type":"u8"},{"name":"bytes","type":{"array":["u8",64]}}]}},{"name":"MetaplexTokenStandard","type":{"kind":"enum","variants":[{"name":"NonFungible"},{"name":"FungibleAsset"},{"name":"Fungible"},{"name":"NonFungibleEdition"},{"name":"ProgrammableNonFungible"},{"name":"ProgrammableNonFungibleEdition"}]}},{"name":"MetaplexUseMethod","type":{"kind":"enum","variants":[{"name":"Burn"},{"name":"Multiple"},{"name":"Single"}]}},{"name":"MetaplexCollectionDetails","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"size","type":"u64"}]},{"name":"V2","fields":[{"name":"padding","type":{"array":["u8",8]}}]}]}},{"name":"MetaplexProgrammableConfig","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"rule_set","type":{"option":"publicKey"}}]}]}},{"name":"TokenAccountState","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized"},{"name":"Frozen"}]}},{"name":"LockTypeLabel","type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"BondingCurveCreationType","type":{"kind":"enum","variants":[{"name":"Manual"},{"name":"Launch"},{"name":"Lockedlaunch"},{"name":"Presale"}]}},{"name":"Event","type":{"kind":"enum","variants":[{"name":"BondingCurveCreated","fields":[{"name":"creation_type","type":{"defined":"BondingCurveCreationType"}},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"creator","type":"publicKey"},{"name":"start_price","type":"u128"},{"name":"end_price","type":"u128"},{"name":"control_points","type":{"array":["u16",4]}},{"name":"swap_fee_bps","type":"u16"},{"name":"quote_fee_bps","type":"u16"},{"name":"base_fee_bps","type":"u16"},{"name":"base_allocation_bps","type":"u16"},{"name":"launch_time","type":"i64"},{"name":"creator_reward","type":"u64"},{"name":"graduation_methods","type":{"array":[{"defined":"GraduationMethodData"},8]}},{"name":"graduation_target","type":"u64"},{"name":"graduation_time","type":"i64"},{"name":"graduation_reward","type":"u64"},{"name":"retain_mint_authority","type":"bool"},{"name":"min_reserve_bps","type":"u16"},{"name":"buy_requires_permission","type":"bool"},{"name":"buy_permission_bitmap","type":{"array":["u8",32]}},{"name":"max_buy_amount","type":"u64"},{"name":"sell_requires_permission","type":"bool"},{"name":"sell_permission_bitmap","type":{"array":["u8",32]}},{"name":"max_sell_amount","type":"u64"},{"name":"quote_token_program","type":"publicKey"},{"name":"base_token_program","type":"publicKey"},{"name":"quote_token_decimals","type":"u8"},{"name":"base_token_decimals","type":"u8"}]},{"name":"TokenBought","fields":[{"name":"buyer","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"price_before","type":"u128"},{"name":"price_after","type":"u128"},{"name":"quote_amount_before","type":"u64"},{"name":"quote_amount_after","type":"u64"},{"name":"base_amount_before","type":"u64"},{"name":"base_amount_after","type":"u64"},{"name":"protocol_fee","type":"u64"}]},{"name":"TokenSold","fields":[{"name":"seller","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"price_before","type":"u128"},{"name":"price_after","type":"u128"},{"name":"quote_amount_before","type":"u64"},{"name":"quote_amount_after","type":"u64"},{"name":"base_amount_before","type":"u64"},{"name":"base_amount_after","type":"u64"},{"name":"protocol_fee","type":"u64"}]},{"name":"TokenRefunded","fields":[{"name":"signer","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"price","type":"u128"},{"name":"quote_amount","type":"u64"},{"name":"base_amount","type":"u64"}]},{"name":"BondingCurveGraduated","fields":[{"name":"graduator","type":"publicKey"},{"name":"base_mint","type":"publicKey"},{"name":"quote_mint","type":"publicKey"},{"name":"final_price","type":"u128"},{"name":"graduation_methods","type":{"array":[{"defined":"GraduationMethodData"},8]}}]},{"name":"BondingCurveClosed","fields":[{"name":"bonding_curve","type":"publicKey"}]}]}},{"name":"MintConfigUpdateType","type":{"kind":"enum","variants":[{"name":"DefaultCreatorReward","fields":["u64"]},{"name":"DefaultGraduationReward","fields":["u64"]},{"name":"DefaultGraduationTarget","fields":["u64"]},{"name":"DefaultMaxBuyAmount","fields":["u64"]},{"name":"DefaultMaxSellAmount","fields":["u64"]},{"name":"DefaultBuyPermissionBitmap","fields":[{"option":{"array":["u8",32]}}]},{"name":"DefaultSellPermissionBitmap","fields":[{"option":{"array":["u8",32]}}]},{"name":"CreatePermissionBitmap","fields":[{"option":{"array":["u8",32]}}]},{"name":"PriceCurve","fields":["u128","u128",{"array":["u16",4]}]},{"name":"DefaultSwapFeeBps","fields":["u16"]},{"name":"DefaultBaseFeeBps","fields":["u16"]},{"name":"DefaultQuoteFeeBps","fields":["u16"]}]}},{"name":"PermissionConfigUpdateType","type":{"kind":"enum","variants":[{"name":"AllowedSigner1","fields":[{"defined":"PermissionSigner"}]},{"name":"AllowedSigner2","fields":[{"defined":"PermissionSigner"}]},{"name":"AllowedSigner3","fields":[{"defined":"PermissionSigner"}]}]}},{"name":"AccountDiscriminator","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Closed"},{"name":"BondingCurve"},{"name":"AuthorityConfig"},{"name":"PermissionConfig"},{"name":"ConsumedPermission"},{"name":"MintConfig"}]}},{"name":"Privilege","type":{"kind":"enum","variants":[{"name":"AuthorityConfigUpdate"},{"name":"ReceiveProtocolFees"},{"name":"MintConfigInitialize"},{"name":"MintConfigUpdate"},{"name":"MintConfigClose"},{"name":"PermissionConfigInitialize"},{"name":"PermissionConfigUpdate"},{"name":"PermissionConfigClose"},{"name":"BondingCurveInitialize"},{"name":"BondingCurveUpdate"},{"name":"BondingCurveClose"},{"name":"ExecuteLpTakeover"}]}},{"name":"GraduationMethodLabel","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Whirlpool"},{"name":"Manual"}]}},{"name":"GraduationMethod","type":{"kind":"enum","variants":[{"name":"None"},{"name":"Whirlpool","fields":[{"name":"split_bps","type":"u16"},{"name":"fee_tier_index","type":"u16"},{"name":"destination","type":"publicKey"},{"name":"unlocked","type":"bool"}]},{"name":"Manual","fields":[{"name":"split_bps","type":"u16"},{"name":"destination","type":"publicKey"}]}]}},{"name":"PermissionMessage","type":{"kind":"enum","variants":[{"name":"V1","fields":[{"name":"nonce","type":"u64"},{"name":"consumer_program","type":"publicKey"},{"name":"permission_signer","type":{"defined":"PermissionSigner"}},{"name":"permission_subject","type":"publicKey"},{"name":"valid_until","type":"u64"},{"name":"permission_type","type":"u8"},{"name":"instruction_discriminators","type":{"vec":"bytes"}}]}]}}],"errors":[{"code":6000,"name":"InvalidAccountRole","msg":"Invalid account role"},{"code":6001,"name":"IncorrectAccountAddress","msg":"Incorrect account address"},{"code":6002,"name":"PermissionActive","msg":"Permission still active"},{"code":6003,"name":"PermissionExpired","msg":"Permission expired"},{"code":6004,"name":"PermissionInvalidSignature","msg":"Permission invalid signature"},{"code":6005,"name":"WhirlpoolError","msg":"Error from whirlpool lib"},{"code":6006,"name":"UnknownInstructionDiscriminator","msg":"Unknown instruction discriminator"},{"code":6007,"name":"IncorrectProgramId","msg":"Incorrect program id"},{"code":6008,"name":"NotEnoughAccountKeys","msg":"Not enough account keys"},{"code":6009,"name":"ArithmeticError","msg":"Arithmetic error"},{"code":6010,"name":"QuoteError","msg":"Error calculating quote from math-lib"},{"code":6011,"name":"SlippageExceeded","msg":"Slippage exceeded"},{"code":6012,"name":"PriceError","msg":"Error calculating token price"},{"code":6013,"name":"GraduationConditionsNotMet","msg":"Token has not met graduation conditions"},{"code":6014,"name":"WhirlpoolAlreadyExists","msg":"Whirlpool already exists"},{"code":6015,"name":"IncorrectGraduationInstruction","msg":"Incorrect graduation instruction"},{"code":6016,"name":"BondingCurveNotExpired","msg":"Bonding curve is still active"},{"code":6017,"name":"InsufficientTokensForGraduation","msg":"Insufficient tokens for graduation"},{"code":6018,"name":"MissingPermissionConsumeInstruction","msg":"Missing permission consume instruction"},{"code":6019,"name":"BondingCurveNotActive","msg":"Bonding curve is either not launched yet or is ready to be graduated"},{"code":6020,"name":"InvalidPriceCurve","msg":"Invalid price curve"},{"code":6021,"name":"GraduationMethodNotCalled","msg":"Graduation method not called"},{"code":6022,"name":"InvalidAccountData","msg":"Invalid account data"},{"code":6023,"name":"InvalidSeeds","msg":"Invalid seeds"},{"code":6024,"name":"IncorrectOwner","msg":"Account is not owned by the right program"},{"code":6025,"name":"InvalidInstructionData","msg":"Invalid instruction data"},{"code":6026,"name":"ReservedX","msg":"Reserved for future use"},{"code":6027,"name":"MissingPrivileges","msg":"An account does not have the required privileges"},{"code":6028,"name":"NoMoreAuthoritySlots","msg":"No more authority slots"},{"code":6029,"name":"EmitEventError","msg":"Event serialization failed"}],"metadata":{"origin":"shank","address":"waveQX2yP3H1pVU8djGvEHmYg8uamQ84AuyGtpsrXTF"}} \ No newline at end of file diff --git a/idls/orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json b/idls/orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json new file mode 100644 index 0000000..7a4dee9 --- /dev/null +++ b/idls/orca_whirlpool.whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc.json @@ -0,0 +1 @@ +{"address":"whirLbMiicVdio4qvUfM5KAg6Ct8VwpYzGff3uctyCc","metadata":{"name":"whirlpool","version":"0.9.0","spec":"0.1.0"},"instructions":[{"name":"close_bundled_position","discriminator":[41,36,216,245,27,85,103,67],"accounts":[{"name":"bundled_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,117,110,100,108,101,100,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_bundle.position_bundle_mint","account":"PositionBundle"},{"kind":"arg","path":"bundle_index"}]}},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"receiver","writable":true}],"args":[{"name":"bundle_index","type":"u16"}]},{"name":"close_position","discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true},{"name":"position_token_account","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"close_position_with_token_extensions","discriminator":[1,182,135,59,155,25,99,223],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true},{"name":"position_token_account","writable":true},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"collect_fees","discriminator":[164,152,207,99,30,186,19,182],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"collect_fees_v2","discriminator":[207,117,95,191,229,180,226,15],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"collect_protocol_fees","discriminator":[22,67,23,98,150,178,70,220],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_destination_a","writable":true},{"name":"token_destination_b","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"collect_protocol_fees_v2","discriminator":[103,128,222,134,114,200,22,200],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"token_destination_a","writable":true},{"name":"token_destination_b","writable":true},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"collect_reward","discriminator":[70,5,132,87,86,235,177,34],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"reward_owner_account","writable":true},{"name":"reward_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"collect_reward_v2","discriminator":[177,107,37,180,160,19,49,209],"accounts":[{"name":"whirlpool","relations":["position"]},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"reward_owner_account","writable":true},{"name":"reward_mint"},{"name":"reward_vault","writable":true},{"name":"reward_token_program"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"decrease_liquidity","discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_min_a","type":"u64"},{"name":"token_min_b","type":"u64"}]},{"name":"decrease_liquidity_v2","discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_min_a","type":"u64"},{"name":"token_min_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"delete_position_bundle","discriminator":[100,25,99,2,217,239,124,173],"accounts":[{"name":"position_bundle","writable":true},{"name":"position_bundle_mint","writable":true},{"name":"position_bundle_token_account","writable":true},{"name":"position_bundle_owner","signer":true},{"name":"receiver","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"delete_token_badge","discriminator":[53,146,68,8,18,117,17,185],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension","token_badge"]},{"name":"whirlpools_config_extension"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint"}]}},{"name":"receiver","writable":true}],"args":[]},{"name":"idl_include","discriminator":[223,253,121,121,60,193,129,31],"accounts":[{"name":"tick_array"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"increase_liquidity","discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"}]},{"name":"increase_liquidity_by_token_amounts_v2","discriminator":[239,251,9,124,210,198,53,43],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"method","type":{"defined":{"name":"IncreaseLiquidityMethod"}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"increase_liquidity_v2","discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_lower","writable":true},{"name":"tick_array_upper","writable":true}],"args":[{"name":"liquidity_amount","type":"u128"},{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"initialize_adaptive_fee_tier","discriminator":[77,99,208,200,141,123,117,48],"accounts":[{"name":"whirlpools_config"},{"name":"adaptive_fee_tier","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,116,105,101,114]},{"kind":"account","path":"whirlpools_config"},{"kind":"arg","path":"fee_tier_index"}]}},{"name":"funder","writable":true,"signer":true},{"name":"fee_authority","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"fee_tier_index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"initialize_pool_authority","type":"pubkey"},{"name":"delegated_fee_authority","type":"pubkey"},{"name":"default_base_fee_rate","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"}]},{"name":"initialize_config","discriminator":[208,127,21,1,194,190,196,70],"accounts":[{"name":"config","writable":true,"signer":true},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"reward_emissions_super_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"initialize_config_extension","discriminator":[55,9,53,9,114,57,209,52],"accounts":[{"name":"config"},{"name":"config_extension","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,111,110,102,105,103,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"config"}]}},{"name":"funder","writable":true,"signer":true},{"name":"fee_authority","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_dynamic_tick_array","discriminator":[41,33,165,200,120,231,142,50],"accounts":[{"name":"whirlpool"},{"name":"funder","writable":true,"signer":true},{"name":"tick_array","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"whirlpool"},{"kind":"arg","path":"start_tick_index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"start_tick_index","type":"i32"},{"name":"idempotent","type":"bool"}]},{"name":"initialize_fee_tier","discriminator":[183,74,156,160,112,2,42,30],"accounts":[{"name":"config"},{"name":"fee_tier","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,116,105,101,114]},{"kind":"account","path":"config"},{"kind":"arg","path":"tick_spacing"}]}},{"name":"funder","writable":true,"signer":true},{"name":"fee_authority","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"tick_spacing","type":"u16"},{"name":"default_fee_rate","type":"u16"}]},{"name":"initialize_pool","discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"whirlpools_config","relations":["fee_tier"]},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,114,108,112,111,111,108]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"},{"kind":"account","path":"token_mint_b"},{"kind":"arg","path":"tick_spacing"}]}},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"fee_tier"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"bumps","type":{"defined":{"name":"WhirlpoolBumps"}}},{"name":"tick_spacing","type":"u16"},{"name":"initial_sqrt_price","type":"u128"}]},{"name":"initialize_pool_v2","discriminator":[207,45,87,242,27,63,204,67],"accounts":[{"name":"whirlpools_config","relations":["fee_tier"]},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_badge_a","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"}]}},{"name":"token_badge_b","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_b"}]}},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,114,108,112,111,111,108]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"},{"kind":"account","path":"token_mint_b"},{"kind":"arg","path":"tick_spacing"}]}},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"fee_tier"},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"tick_spacing","type":"u16"},{"name":"initial_sqrt_price","type":"u128"}]},{"name":"initialize_pool_with_adaptive_fee","discriminator":[143,94,96,76,172,124,119,199],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_badge_a","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"}]}},{"name":"token_badge_b","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_b"}]}},{"name":"funder","writable":true,"signer":true},{"name":"initialize_pool_authority","signer":true},{"name":"whirlpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[119,104,105,114,108,112,111,111,108]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint_a"},{"kind":"account","path":"token_mint_b"},{"kind":"account","path":"adaptive_fee_tier.fee_tier_index","account":"AdaptiveFeeTier"}]}},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool"}]}},{"name":"token_vault_a","writable":true,"signer":true},{"name":"token_vault_b","writable":true,"signer":true},{"name":"adaptive_fee_tier"},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"initial_sqrt_price","type":"u128"},{"name":"trade_enable_timestamp","type":{"option":"u64"}}]},{"name":"initialize_position_bundle","discriminator":[117,45,241,149,24,18,194,65],"accounts":[{"name":"position_bundle","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,98,117,110,100,108,101]},{"kind":"account","path":"position_bundle_mint"}]}},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"position_bundle_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_bundle_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"initialize_position_bundle_with_metadata","discriminator":[93,124,16,179,249,131,115,245],"accounts":[{"name":"position_bundle","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110,95,98,117,110,100,108,101]},{"kind":"account","path":"position_bundle_mint"}]}},{"name":"position_bundle_mint","writable":true,"signer":true},{"name":"position_bundle_metadata","writable":true},{"name":"position_bundle_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"position_bundle_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_bundle_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"position_bundle_owner"},{"name":"funder","writable":true,"signer":true},{"name":"metadata_update_auth","address":"3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[]},{"name":"initialize_reward","discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_authority","signer":true},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true},{"name":"reward_mint"},{"name":"reward_vault","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"initialize_reward_v2","discriminator":[91,1,77,50,235,229,133,49],"accounts":[{"name":"reward_authority","signer":true},{"name":"funder","writable":true,"signer":true},{"name":"whirlpool","writable":true},{"name":"reward_mint"},{"name":"reward_token_badge","pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpool.whirlpools_config","account":"Whirlpool"},{"kind":"account","path":"reward_mint"}]}},{"name":"reward_vault","writable":true,"signer":true},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"initialize_tick_array","discriminator":[11,188,193,214,141,91,149,184],"accounts":[{"name":"whirlpool"},{"name":"funder","writable":true,"signer":true},{"name":"tick_array","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"whirlpool"},{"kind":"arg","path":"start_tick_index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"start_tick_index","type":"i32"}]},{"name":"initialize_token_badge","discriminator":[253,77,205,95,27,224,89,223],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension"]},{"name":"whirlpools_config_extension"},{"name":"token_badge_authority","signer":true},{"name":"token_mint"},{"name":"token_badge","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,111,107,101,110,95,98,97,100,103,101]},{"kind":"account","path":"whirlpools_config"},{"kind":"account","path":"token_mint"}]}},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"lock_position","discriminator":[227,62,2,252,247,10,171,185],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"position_authority","signer":true},{"name":"position","pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint"},{"name":"position_token_account","writable":true},{"name":"lock_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,111,110,102,105,103]},{"kind":"account","path":"position"}]}},{"name":"whirlpool","relations":["position"]},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"lock_type","type":{"defined":{"name":"LockType"}}}]},{"name":"migrate_repurpose_reward_authority_space","discriminator":[214,161,248,79,152,98,172,231],"accounts":[{"name":"whirlpool","writable":true}],"args":[]},{"name":"open_bundled_position","discriminator":[169,113,126,171,213,172,212,49],"accounts":[{"name":"bundled_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,117,110,100,108,101,100,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_bundle.position_bundle_mint","account":"PositionBundle"},{"kind":"arg","path":"bundle_index"}]}},{"name":"position_bundle","writable":true},{"name":"position_bundle_token_account"},{"name":"position_bundle_authority","signer":true},{"name":"whirlpool"},{"name":"funder","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"bundle_index","type":"u16"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_position","discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true,"signer":true},{"name":"position_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"whirlpool"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"bumps","type":{"defined":{"name":"OpenPositionBumps"}}},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_position_with_metadata","discriminator":[242,29,134,48,58,110,14,60],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true,"signer":true},{"name":"position_metadata_account","writable":true},{"name":"position_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"whirlpool"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"metadata_update_auth","address":"3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"}],"args":[{"name":"bumps","type":{"defined":{"name":"OpenPositionWithMetadataBumps"}}},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]},{"name":"open_position_with_token_extensions","discriminator":[212,47,95,92,114,102,131,250],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"owner"},{"name":"position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]}},{"name":"position_mint","writable":true,"signer":true},{"name":"position_token_account","writable":true},{"name":"whirlpool"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_update_auth","address":"3axbTs2z5GBy6usVbNVoqEgZMng3vZvMnAoX29BFfwhr"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"with_token_metadata_extension","type":"bool"}]},{"name":"reposition_liquidity_v2","discriminator":[191,169,224,11,131,19,158,253],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"position_authority","signer":true},{"name":"funder","writable":true,"signer":true},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_vault_b","writable":true},{"name":"existing_tick_array_lower","writable":true},{"name":"existing_tick_array_upper","writable":true},{"name":"new_tick_array_lower","writable":true},{"name":"new_tick_array_upper","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_tick_lower_index","type":"i32"},{"name":"new_tick_upper_index","type":"i32"},{"name":"method","type":{"defined":{"name":"RepositionLiquidityMethod"}}},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"reset_position_range","discriminator":[164,123,180,141,194,100,160,175],"accounts":[{"name":"funder","writable":true,"signer":true},{"name":"position_authority","signer":true},{"name":"whirlpool","relations":["position"]},{"name":"position","writable":true},{"name":"position_token_account"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"new_tick_lower_index","type":"i32"},{"name":"new_tick_upper_index","type":"i32"}]},{"name":"set_adaptive_fee_constants","discriminator":[133,158,212,189,237,12,73,39],"accounts":[{"name":"whirlpool","relations":["oracle"]},{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"oracle","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"filter_period","type":{"option":"u16"}},{"name":"decay_period","type":{"option":"u16"}},{"name":"reduction_factor","type":{"option":"u16"}},{"name":"adaptive_fee_control_factor","type":{"option":"u32"}},{"name":"max_volatility_accumulator","type":{"option":"u32"}},{"name":"tick_group_size","type":{"option":"u16"}},{"name":"major_swap_threshold_ticks","type":{"option":"u16"}}]},{"name":"set_collect_protocol_fees_authority","discriminator":[34,150,93,244,139,225,233,67],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"collect_protocol_fees_authority","signer":true},{"name":"new_collect_protocol_fees_authority"}],"args":[]},{"name":"set_config_extension_authority","discriminator":[44,94,241,116,24,188,60,143],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension"]},{"name":"whirlpools_config_extension","writable":true},{"name":"config_extension_authority","signer":true},{"name":"new_config_extension_authority"}],"args":[]},{"name":"set_config_feature_flag","discriminator":[71,173,228,18,67,247,210,57],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"authority","signer":true}],"args":[{"name":"feature_flag","type":{"defined":{"name":"ConfigFeatureFlag"}}}]},{"name":"set_default_base_fee_rate","discriminator":[229,66,84,251,164,134,183,7],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_base_fee_rate","type":"u16"}]},{"name":"set_default_fee_rate","discriminator":[118,215,214,157,182,229,208,228],"accounts":[{"name":"whirlpools_config","relations":["fee_tier"]},{"name":"fee_tier","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_fee_rate","type":"u16"}]},{"name":"set_default_protocol_fee_rate","discriminator":[107,205,249,226,151,35,86,0],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"default_protocol_fee_rate","type":"u16"}]},{"name":"set_delegated_fee_authority","discriminator":[193,234,231,147,138,57,3,122],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true},{"name":"new_delegated_fee_authority"}],"args":[]},{"name":"set_fee_authority","discriminator":[31,1,50,87,237,101,97,132],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"fee_authority","signer":true},{"name":"new_fee_authority"}],"args":[]},{"name":"set_fee_rate","discriminator":[53,243,137,65,8,140,158,6],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"set_fee_rate_by_delegated_fee_authority","discriminator":[121,121,54,114,131,230,162,104],"accounts":[{"name":"whirlpool","writable":true},{"name":"adaptive_fee_tier"},{"name":"delegated_fee_authority","signer":true}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"set_initialize_pool_authority","discriminator":[125,43,127,235,149,26,106,236],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true},{"name":"new_initialize_pool_authority"}],"args":[]},{"name":"set_preset_adaptive_fee_constants","discriminator":[132,185,66,148,83,88,134,198],"accounts":[{"name":"whirlpools_config","relations":["adaptive_fee_tier"]},{"name":"adaptive_fee_tier","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"}]},{"name":"set_protocol_fee_rate","discriminator":[95,7,4,50,154,79,156,131],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"fee_authority","signer":true}],"args":[{"name":"protocol_fee_rate","type":"u16"}]},{"name":"set_reward_authority","discriminator":[34,39,183,252,83,28,85,127],"accounts":[{"name":"whirlpool","writable":true},{"name":"reward_authority","signer":true},{"name":"new_reward_authority"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"set_reward_authority_by_super_authority","discriminator":[240,154,201,198,148,93,56,25],"accounts":[{"name":"whirlpools_config","relations":["whirlpool"]},{"name":"whirlpool","writable":true},{"name":"reward_emissions_super_authority","signer":true},{"name":"new_reward_authority"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"set_reward_emissions","discriminator":[13,197,86,168,109,176,27,244],"accounts":[{"name":"whirlpool","writable":true},{"name":"reward_authority","signer":true},{"name":"reward_vault"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"}]},{"name":"set_reward_emissions_super_authority","discriminator":[207,5,200,209,122,56,82,183],"accounts":[{"name":"whirlpools_config","writable":true},{"name":"reward_emissions_super_authority","signer":true},{"name":"new_reward_emissions_super_authority"}],"args":[]},{"name":"set_reward_emissions_v2","discriminator":[114,228,72,32,193,48,160,102],"accounts":[{"name":"whirlpool","writable":true},{"name":"reward_authority","signer":true},{"name":"reward_vault"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"}]},{"name":"set_token_badge_attribute","discriminator":[224,88,65,33,138,147,246,137],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension","token_badge"]},{"name":"whirlpools_config_extension"},{"name":"token_badge_authority","signer":true},{"name":"token_mint","relations":["token_badge"]},{"name":"token_badge","writable":true}],"args":[{"name":"attribute","type":{"defined":{"name":"TokenBadgeAttribute"}}}]},{"name":"set_token_badge_authority","discriminator":[207,202,4,32,205,79,13,178],"accounts":[{"name":"whirlpools_config","relations":["whirlpools_config_extension"]},{"name":"whirlpools_config_extension","writable":true},{"name":"config_extension_authority","signer":true},{"name":"new_token_badge_authority"}],"args":[]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_authority","signer":true},{"name":"whirlpool","writable":true},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_0","writable":true},{"name":"tick_array_1","writable":true},{"name":"tick_array_2","writable":true},{"name":"oracle","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool"}]}}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit","type":"u128"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b","type":"bool"}]},{"name":"swap_v2","discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"token_program_a"},{"name":"token_program_b"},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"token_authority","signer":true},{"name":"whirlpool","writable":true},{"name":"token_mint_a"},{"name":"token_mint_b"},{"name":"token_owner_account_a","writable":true},{"name":"token_vault_a","writable":true},{"name":"token_owner_account_b","writable":true},{"name":"token_vault_b","writable":true},{"name":"tick_array_0","writable":true},{"name":"tick_array_1","writable":true},{"name":"tick_array_2","writable":true},{"name":"oracle","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool"}]}}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit","type":"u128"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b","type":"bool"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"transfer_locked_position","discriminator":[179,121,229,46,67,138,194,138],"accounts":[{"name":"position_authority","signer":true},{"name":"receiver","writable":true},{"name":"position","pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_mint"}]},"relations":["lock_config"]},{"name":"position_mint"},{"name":"position_token_account","writable":true},{"name":"destination_token_account","writable":true},{"name":"lock_config","writable":true},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[]},{"name":"two_hop_swap","discriminator":[195,96,237,108,68,162,219,230],"accounts":[{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_authority","signer":true},{"name":"whirlpool_one","writable":true},{"name":"whirlpool_two","writable":true},{"name":"token_owner_account_one_a","writable":true},{"name":"token_vault_one_a","writable":true},{"name":"token_owner_account_one_b","writable":true},{"name":"token_vault_one_b","writable":true},{"name":"token_owner_account_two_a","writable":true},{"name":"token_vault_two_a","writable":true},{"name":"token_owner_account_two_b","writable":true},{"name":"token_vault_two_b","writable":true},{"name":"tick_array_one_0","writable":true},{"name":"tick_array_one_1","writable":true},{"name":"tick_array_one_2","writable":true},{"name":"tick_array_two_0","writable":true},{"name":"tick_array_two_1","writable":true},{"name":"tick_array_two_2","writable":true},{"name":"oracle_one","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_one"}]}},{"name":"oracle_two","pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_two"}]}}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b_one","type":"bool"},{"name":"a_to_b_two","type":"bool"},{"name":"sqrt_price_limit_one","type":"u128"},{"name":"sqrt_price_limit_two","type":"u128"}]},{"name":"two_hop_swap_v2","discriminator":[186,143,209,29,254,2,194,117],"accounts":[{"name":"whirlpool_one","writable":true},{"name":"whirlpool_two","writable":true},{"name":"token_mint_input"},{"name":"token_mint_intermediate"},{"name":"token_mint_output"},{"name":"token_program_input"},{"name":"token_program_intermediate"},{"name":"token_program_output"},{"name":"token_owner_account_input","writable":true},{"name":"token_vault_one_input","writable":true},{"name":"token_vault_one_intermediate","writable":true},{"name":"token_vault_two_intermediate","writable":true},{"name":"token_vault_two_output","writable":true},{"name":"token_owner_account_output","writable":true},{"name":"token_authority","signer":true},{"name":"tick_array_one_0","writable":true},{"name":"tick_array_one_1","writable":true},{"name":"tick_array_one_2","writable":true},{"name":"tick_array_two_0","writable":true},{"name":"tick_array_two_1","writable":true},{"name":"tick_array_two_2","writable":true},{"name":"oracle_one","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_one"}]}},{"name":"oracle_two","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,114,97,99,108,101]},{"kind":"account","path":"whirlpool_two"}]}},{"name":"memo_program","address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"amount_specified_is_input","type":"bool"},{"name":"a_to_b_one","type":"bool"},{"name":"a_to_b_two","type":"bool"},{"name":"sqrt_price_limit_one","type":"u128"},{"name":"sqrt_price_limit_two","type":"u128"},{"name":"remaining_accounts_info","type":{"option":{"defined":{"name":"RemainingAccountsInfo"}}}}]},{"name":"update_fees_and_rewards","discriminator":[154,230,250,13,236,209,75,223],"accounts":[{"name":"whirlpool","writable":true,"relations":["position"]},{"name":"position","writable":true},{"name":"tick_array_lower"},{"name":"tick_array_upper"}],"args":[]}],"accounts":[{"name":"AdaptiveFeeTier","discriminator":[147,16,144,116,47,146,149,46]},{"name":"DynamicTickArray","discriminator":[17,216,246,142,225,199,218,56]},{"name":"FeeTier","discriminator":[56,75,159,76,142,68,190,105]},{"name":"LockConfig","discriminator":[106,47,238,159,124,12,160,192]},{"name":"Oracle","discriminator":[139,194,131,179,140,179,229,244]},{"name":"Position","discriminator":[170,188,143,228,122,64,247,208]},{"name":"PositionBundle","discriminator":[129,169,175,65,185,95,32,100]},{"name":"TickArray","discriminator":[69,97,189,190,110,7,66,187]},{"name":"TokenBadge","discriminator":[116,219,204,229,249,116,255,150]},{"name":"Whirlpool","discriminator":[63,149,209,12,225,128,99,9]},{"name":"WhirlpoolsConfig","discriminator":[157,20,49,224,217,87,193,254]},{"name":"WhirlpoolsConfigExtension","discriminator":[2,99,215,163,240,26,153,58]}],"events":[{"name":"LiquidityDecreased","discriminator":[166,1,36,71,112,202,181,171]},{"name":"LiquidityIncreased","discriminator":[30,7,144,181,102,254,155,161]},{"name":"LiquidityRepositioned","discriminator":[95,130,181,132,251,50,195,38]},{"name":"PoolInitialized","discriminator":[100,118,173,87,12,198,254,229]},{"name":"PositionOpened","discriminator":[237,175,243,230,147,117,101,121]},{"name":"Traded","discriminator":[225,202,73,175,147,43,160,150]}],"errors":[{"code":6000,"name":"InvalidEnum","msg":"Enum value could not be converted"},{"code":6001,"name":"InvalidStartTick","msg":"Invalid start tick index provided."},{"code":6002,"name":"TickArrayExistInPool","msg":"Tick-array already exists in this whirlpool"},{"code":6003,"name":"TickArrayIndexOutofBounds","msg":"Attempt to search for a tick-array failed"},{"code":6004,"name":"InvalidTickSpacing","msg":"Tick-spacing is not supported"},{"code":6005,"name":"ClosePositionNotEmpty","msg":"Position is not empty It cannot be closed"},{"code":6006,"name":"DivideByZero","msg":"Unable to divide by zero"},{"code":6007,"name":"NumberCastError","msg":"Unable to cast number into BigInt"},{"code":6008,"name":"NumberDownCastError","msg":"Unable to down cast number"},{"code":6009,"name":"TickNotFound","msg":"Tick not found within tick array"},{"code":6010,"name":"InvalidTickIndex","msg":"Provided tick index is either out of bounds or uninitializable"},{"code":6011,"name":"SqrtPriceOutOfBounds","msg":"Provided sqrt price out of bounds"},{"code":6012,"name":"LiquidityZero","msg":"Liquidity amount must be greater than zero"},{"code":6013,"name":"LiquidityTooHigh","msg":"Liquidity amount must be less than i64::MAX"},{"code":6014,"name":"LiquidityOverflow","msg":"Liquidity overflow"},{"code":6015,"name":"LiquidityUnderflow","msg":"Liquidity underflow"},{"code":6016,"name":"LiquidityNetError","msg":"Tick liquidity net underflowed or overflowed"},{"code":6017,"name":"TokenMaxExceeded","msg":"Exceeded token max"},{"code":6018,"name":"TokenMinSubceeded","msg":"Did not meet token min"},{"code":6019,"name":"MissingOrInvalidDelegate","msg":"Position token account has a missing or invalid delegate"},{"code":6020,"name":"InvalidPositionTokenAmount","msg":"Position token amount must be 1"},{"code":6021,"name":"InvalidTimestampConversion","msg":"Timestamp should be convertible from i64 to u64"},{"code":6022,"name":"InvalidTimestamp","msg":"Timestamp should be greater than the last updated timestamp"},{"code":6023,"name":"InvalidTickArraySequence","msg":"Invalid tick array sequence provided for instruction."},{"code":6024,"name":"InvalidTokenMintOrder","msg":"Token Mint in wrong order"},{"code":6025,"name":"RewardNotInitialized","msg":"Reward not initialized"},{"code":6026,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6027,"name":"RewardVaultAmountInsufficient","msg":"Reward vault requires amount to support emissions for at least one day"},{"code":6028,"name":"FeeRateMaxExceeded","msg":"Exceeded max fee rate"},{"code":6029,"name":"ProtocolFeeRateMaxExceeded","msg":"Exceeded max protocol fee rate"},{"code":6030,"name":"MultiplicationShiftRightOverflow","msg":"Multiplication with shift right overflow"},{"code":6031,"name":"MulDivOverflow","msg":"Muldiv overflow"},{"code":6032,"name":"MulDivInvalidInput","msg":"Invalid div_u256 input"},{"code":6033,"name":"MultiplicationOverflow","msg":"Multiplication overflow"},{"code":6034,"name":"InvalidSqrtPriceLimitDirection","msg":"Provided SqrtPriceLimit not in the same direction as the swap."},{"code":6035,"name":"ZeroTradableAmount","msg":"There are no tradable amount to swap."},{"code":6036,"name":"AmountOutBelowMinimum","msg":"Amount out below minimum threshold"},{"code":6037,"name":"AmountInAboveMaximum","msg":"Amount in above maximum threshold"},{"code":6038,"name":"TickArraySequenceInvalidIndex","msg":"Invalid index for tick array sequence"},{"code":6039,"name":"AmountCalcOverflow","msg":"Amount calculated overflows"},{"code":6040,"name":"AmountRemainingOverflow","msg":"Amount remaining overflows"},{"code":6041,"name":"InvalidIntermediaryMint","msg":"Invalid intermediary mint"},{"code":6042,"name":"DuplicateTwoHopPool","msg":"Duplicate two hop pool"},{"code":6043,"name":"InvalidBundleIndex","msg":"Bundle index is out of bounds"},{"code":6044,"name":"BundledPositionAlreadyOpened","msg":"Position has already been opened"},{"code":6045,"name":"BundledPositionAlreadyClosed","msg":"Position has already been closed"},{"code":6046,"name":"PositionBundleNotDeletable","msg":"Unable to delete PositionBundle with open positions"},{"code":6047,"name":"UnsupportedTokenMint","msg":"Token mint has unsupported attributes"},{"code":6048,"name":"RemainingAccountsInvalidSlice","msg":"Invalid remaining accounts"},{"code":6049,"name":"RemainingAccountsInsufficient","msg":"Insufficient remaining accounts"},{"code":6050,"name":"NoExtraAccountsForTransferHook","msg":"Unable to call transfer hook without extra accounts"},{"code":6051,"name":"IntermediateTokenAmountMismatch","msg":"Output and input amount mismatch"},{"code":6052,"name":"TransferFeeCalculationError","msg":"Transfer fee calculation failed"},{"code":6053,"name":"RemainingAccountsDuplicatedAccountsType","msg":"Same accounts type is provided more than once"},{"code":6054,"name":"FullRangeOnlyPool","msg":"This whirlpool only supports full-range positions"},{"code":6055,"name":"TooManySupplementalTickArrays","msg":"Too many supplemental tick arrays provided"},{"code":6056,"name":"DifferentWhirlpoolTickArrayAccount","msg":"TickArray account for different whirlpool provided"},{"code":6057,"name":"PartialFillError","msg":"Trade resulted in partial fill"},{"code":6058,"name":"PositionNotLockable","msg":"Position is not lockable"},{"code":6059,"name":"OperationNotAllowedOnLockedPosition","msg":"Operation not allowed on locked position"},{"code":6060,"name":"SameTickRangeNotAllowed","msg":"Cannot reset position range with same tick range"},{"code":6061,"name":"InvalidAdaptiveFeeConstants","msg":"Invalid adaptive fee constants"},{"code":6062,"name":"InvalidFeeTierIndex","msg":"Invalid fee tier index"},{"code":6063,"name":"InvalidTradeEnableTimestamp","msg":"Invalid trade enable timestamp"},{"code":6064,"name":"TradeIsNotEnabled","msg":"Trade is not enabled yet"},{"code":6065,"name":"RentCalculationError","msg":"Rent calculation error"},{"code":6066,"name":"FeatureIsNotEnabled","msg":"Feature is not enabled"},{"code":6067,"name":"PositionWithTokenExtensionsRequired","msg":"This whirlpool only supports open_position_with_token_extensions instruction"},{"code":6068,"name":"AdaptiveFeeConstantsUnchanged","msg":"Provided adaptive fee constants are unchanged"},{"code":6069,"name":"PriceSlippageOutOfBounds","msg":"Price outside slippage bounds"}],"types":[{"name":"AccountsType","type":{"kind":"enum","variants":[{"name":"TransferHookA"},{"name":"TransferHookB"},{"name":"TransferHookReward"},{"name":"TransferHookInput"},{"name":"TransferHookIntermediate"},{"name":"TransferHookOutput"},{"name":"SupplementalTickArrays"},{"name":"SupplementalTickArraysOne"},{"name":"SupplementalTickArraysTwo"},{"name":"TransferHookDepositA"},{"name":"TransferHookDepositB"},{"name":"TransferHookWithdrawalA"},{"name":"TransferHookWithdrawalB"}]}},{"name":"AdaptiveFeeConstants","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"},{"name":"reserved","type":{"array":["u8",16]}}]}},{"name":"AdaptiveFeeTier","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"fee_tier_index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"initialize_pool_authority","type":"pubkey"},{"name":"delegated_fee_authority","type":"pubkey"},{"name":"default_base_fee_rate","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"adaptive_fee_control_factor","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"tick_group_size","type":"u16"},{"name":"major_swap_threshold_ticks","type":"u16"}]}},{"name":"AdaptiveFeeVariables","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"last_reference_update_timestamp","type":"u64"},{"name":"last_major_swap_timestamp","type":"u64"},{"name":"volatility_reference","type":"u32"},{"name":"tick_group_index_reference","type":"i32"},{"name":"volatility_accumulator","type":"u32"},{"name":"reserved","type":{"array":["u8",16]}}]}},{"name":"ConfigFeatureFlag","type":{"kind":"enum","variants":[{"name":"TokenBadge","fields":["bool"]}]}},{"name":"DynamicTick","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized","fields":[{"defined":{"name":"DynamicTickData"}}]}]}},{"name":"DynamicTickArray","type":{"kind":"struct","fields":[{"name":"start_tick_index","type":"i32"},{"name":"whirlpool","type":"pubkey"},{"name":"tick_bitmap","type":"u128"},{"name":"ticks","type":{"array":[{"defined":{"name":"DynamicTick"}},88]}}]}},{"name":"DynamicTickData","type":{"kind":"struct","fields":[{"name":"liquidity_net","type":"i128"},{"name":"liquidity_gross","type":"u128"},{"name":"fee_growth_outside_a","type":"u128"},{"name":"fee_growth_outside_b","type":"u128"},{"name":"reward_growths_outside","type":{"array":["u128",3]}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"tick_spacing","type":"u16"},{"name":"default_fee_rate","type":"u16"}]}},{"name":"IncreaseLiquidityMethod","type":{"kind":"enum","variants":[{"name":"ByTokenAmounts","fields":[{"name":"token_max_a","type":"u64"},{"name":"token_max_b","type":"u64"},{"name":"min_sqrt_price","type":"u128"},{"name":"max_sqrt_price","type":"u128"}]}]}},{"name":"LiquidityDecreased","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"token_a_transfer_fee","type":"u64"},{"name":"token_b_transfer_fee","type":"u64"}]}},{"name":"LiquidityIncreased","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"token_a_transfer_fee","type":"u64"},{"name":"token_b_transfer_fee","type":"u64"}]}},{"name":"LiquidityRepositioned","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"existing_range_tick_lower_index","type":"i32"},{"name":"existing_range_tick_upper_index","type":"i32"},{"name":"new_range_tick_lower_index","type":"i32"},{"name":"new_range_tick_upper_index","type":"i32"},{"name":"existing_range_liquidity","type":"u128"},{"name":"new_range_liquidity","type":"u128"},{"name":"existing_range_token_a_amount","type":"u64"},{"name":"existing_range_token_b_amount","type":"u64"},{"name":"new_range_token_a_amount","type":"u64"},{"name":"new_range_token_b_amount","type":"u64"},{"name":"token_a_transfer_amount","type":"u64"},{"name":"token_a_transfer_fee","type":"u64"},{"name":"is_token_a_transfer_from_owner","type":"bool"},{"name":"token_b_transfer_amount","type":"u64"},{"name":"token_b_transfer_fee","type":"u64"},{"name":"is_token_b_transfer_from_owner","type":"bool"}]}},{"name":"LockConfig","type":{"kind":"struct","fields":[{"name":"position","type":"pubkey"},{"name":"position_owner","type":"pubkey"},{"name":"whirlpool","type":"pubkey"},{"name":"locked_timestamp","type":"u64"},{"name":"lock_type","type":{"defined":{"name":"LockTypeLabel"}}}]}},{"name":"LockType","type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"LockTypeLabel","type":{"kind":"enum","variants":[{"name":"Permanent"}]}},{"name":"OpenPositionBumps","type":{"kind":"struct","fields":[{"name":"position_bump","type":"u8"}]}},{"name":"OpenPositionWithMetadataBumps","type":{"kind":"struct","fields":[{"name":"position_bump","type":"u8"},{"name":"metadata_bump","type":"u8"}]}},{"name":"Oracle","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"trade_enable_timestamp","type":"u64"},{"name":"adaptive_fee_constants","type":{"defined":{"name":"AdaptiveFeeConstants"}}},{"name":"adaptive_fee_variables","type":{"defined":{"name":"AdaptiveFeeVariables"}}},{"name":"reserved","type":{"array":["u8",128]}}]}},{"name":"PoolInitialized","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"whirlpools_config","type":"pubkey"},{"name":"token_mint_a","type":"pubkey"},{"name":"token_mint_b","type":"pubkey"},{"name":"tick_spacing","type":"u16"},{"name":"token_program_a","type":"pubkey"},{"name":"token_program_b","type":"pubkey"},{"name":"decimals_a","type":"u8"},{"name":"decimals_b","type":"u8"},{"name":"initial_sqrt_price","type":"u128"}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position_mint","type":"pubkey"},{"name":"liquidity","type":"u128"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"fee_growth_checkpoint_a","type":"u128"},{"name":"fee_owed_a","type":"u64"},{"name":"fee_growth_checkpoint_b","type":"u128"},{"name":"fee_owed_b","type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}}]}},{"name":"PositionBundle","type":{"kind":"struct","fields":[{"name":"position_bundle_mint","type":"pubkey"},{"name":"position_bitmap","type":{"array":["u8",32]}}]}},{"name":"PositionOpened","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"position","type":"pubkey"},{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_checkpoint","type":"u128"},{"name":"amount_owed","type":"u64"}]}},{"name":"RemainingAccountsInfo","type":{"kind":"struct","fields":[{"name":"slices","type":{"vec":{"defined":{"name":"RemainingAccountsSlice"}}}}]}},{"name":"RemainingAccountsSlice","type":{"kind":"struct","fields":[{"name":"accounts_type","type":{"defined":{"name":"AccountsType"}}},{"name":"length","type":"u8"}]}},{"name":"RepositionLiquidityMethod","type":{"kind":"enum","variants":[{"name":"ByLiquidity","fields":[{"name":"new_liquidity_amount","type":"u128"},{"name":"existing_range_token_min_a","type":"u64"},{"name":"existing_range_token_min_b","type":"u64"},{"name":"new_range_token_max_a","type":"u64"},{"name":"new_range_token_max_b","type":"u64"}]}]}},{"name":"Tick","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","type":"bool"},{"name":"liquidity_net","type":"i128"},{"name":"liquidity_gross","type":"u128"},{"name":"fee_growth_outside_a","type":"u128"},{"name":"fee_growth_outside_b","type":"u128"},{"name":"reward_growths_outside","type":{"array":["u128",3]}}]}},{"name":"TickArray","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"Tick"}},88]}},{"name":"whirlpool","type":"pubkey"}]}},{"name":"TokenBadge","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"token_mint","type":"pubkey"},{"name":"attribute_require_non_transferable_position","type":"bool"}]}},{"name":"TokenBadgeAttribute","type":{"kind":"enum","variants":[{"name":"RequireNonTransferablePosition","fields":["bool"]}]}},{"name":"Traded","type":{"kind":"struct","fields":[{"name":"whirlpool","type":"pubkey"},{"name":"a_to_b","type":"bool"},{"name":"pre_sqrt_price","type":"u128"},{"name":"post_sqrt_price","type":"u128"},{"name":"input_amount","type":"u64"},{"name":"output_amount","type":"u64"},{"name":"input_transfer_fee","type":"u64"},{"name":"output_transfer_fee","type":"u64"},{"name":"lp_fee","type":"u64"},{"name":"protocol_fee","type":"u64"}]}},{"name":"Whirlpool","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"whirlpool_bump","type":{"array":["u8",1]}},{"name":"tick_spacing","type":"u16"},{"name":"fee_tier_index_seed","type":{"array":["u8",2]}},{"name":"fee_rate","type":"u16"},{"name":"protocol_fee_rate","type":"u16"},{"name":"liquidity","type":"u128"},{"name":"sqrt_price","type":"u128"},{"name":"tick_current_index","type":"i32"},{"name":"protocol_fee_owed_a","type":"u64"},{"name":"protocol_fee_owed_b","type":"u64"},{"name":"token_mint_a","type":"pubkey"},{"name":"token_vault_a","type":"pubkey"},{"name":"fee_growth_global_a","type":"u128"},{"name":"token_mint_b","type":"pubkey"},{"name":"token_vault_b","type":"pubkey"},{"name":"fee_growth_global_b","type":"u128"},{"name":"reward_last_updated_timestamp","type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"WhirlpoolRewardInfo"}},3]}}]}},{"name":"WhirlpoolBumps","type":{"kind":"struct","fields":[{"name":"whirlpool_bump","type":"u8"}]}},{"name":"WhirlpoolRewardInfo","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"extension","type":{"array":["u8",32]}},{"name":"emissions_per_second_x64","type":"u128"},{"name":"growth_global_x64","type":"u128"}]}},{"name":"WhirlpoolsConfig","type":{"kind":"struct","fields":[{"name":"fee_authority","type":"pubkey"},{"name":"collect_protocol_fees_authority","type":"pubkey"},{"name":"reward_emissions_super_authority","type":"pubkey"},{"name":"default_protocol_fee_rate","type":"u16"},{"name":"feature_flags","type":"u16"}]}},{"name":"WhirlpoolsConfigExtension","type":{"kind":"struct","fields":[{"name":"whirlpools_config","type":"pubkey"},{"name":"config_extension_authority","type":"pubkey"},{"name":"token_badge_authority","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/idls/pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json b/idls/pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json new file mode 100644 index 0000000..ca82772 --- /dev/null +++ b/idls/pancakeswap.HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq.json @@ -0,0 +1 @@ +{"address":"HpNfyc2Saw7RKkQd8nEL4khUcuPhQ7WwY1B2qjx8jxFq","metadata":{"name":"amm_v3","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Pancake concentrated liquidity AMM"},"instructions":[{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or config owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"]},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_permissionless_farm_switch","docs":["Creates a permissionless farm switch account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[88,242,198,70,241,6,196,251],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"permissionless_farm_switch","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110,108,101,115,115,95,102,97,114,109,95,115,119,105,116,99,104]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","docs":["Token_0 vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","docs":["Token_1 vault for the pool"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards with ignoring the not support extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_liquidity","docs":["#[deprecated(note = \"Use `decrease_liquidity_v2` instead.\")]","Decreases liquidity for an existing position","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"increase_liquidity","docs":["#[deprecated(note = \"Use `increase_liquidity_v2` instead.\")]","Increases liquidity for an existing position, with amount paid by `payer`","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, can't be zero","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - must be specified if liquidity is zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"personal_position.tick_lower_index","account":"PersonalPositionState"},{"kind":"account","path":"personal_position.tick_upper_index","account":"PersonalPositionState"}]}},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"permissionless_farm_switch","pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110,108,101,115,115,95,102,97,114,109,95,115,119,105,116,99,104]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","docs":["A pda, reward vault"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_position","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `liquidity` - The liquidity to be added","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted","This account created in the contract by cpi to avoid large stack variables"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position","docs":["Store the information of market marking in range"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_lower_index"},{"kind":"arg","path":"tick_upper_index"}]}},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"open_position_v2","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `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","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,184,74,214,112,86,241,199],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position","docs":["Store the information of market marking in range"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_lower_index"},{"kind":"arg","path":"tick_upper_index"}]}},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program_2022","docs":["Program to create mint account and mint tokens"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `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","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position","docs":["Store the information of market marking in range"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_lower_index"},{"kind":"arg","path":"tick_upper_index"}]}},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"swap","docs":["#[deprecated(note = \"Use `swap_v2` instead.\")]","Swaps one token for as much as possible of another token across a single pool","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"tick_array","writable":true}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"swap_router_base_in","docs":["Swap token for as much as possible of another token across the path provided, base input","","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Token amount to be swapped in","* `amount_out_minimum` - Panic if output amount is below minimum amount. For slippage.",""],"discriminator":[69,125,115,218,245,186,242,196],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"input_token_account","docs":["The token account that pays input tokens for the swap"],"writable":true},{"name":"input_token_mint","docs":["The mint of input token"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount_in","type":"u64"},{"name":"amount_out_minimum","type":"u64"}]},{"name":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"toggle_permissionless_farm_switch","docs":["Toggle the permissionless farm switch account","","# Arguments","","* `ctx`- The context of accounts","* `is_on`- Is the permissionless farm allowed or not",""],"discriminator":[150,112,54,233,238,161,7,86],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"permissionless_farm_switch","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110,108,101,115,115,95,102,97,114,109,95,115,119,105,116,99,104]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"is_on","type":"bool"}]},{"name":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx`- The context of accounts","* `new_owner`- new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx`- The context of accounts","* `param`- The value can be 0 | 1 | 2 | 3, otherwise will report a error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"DmwXqqK5Zuj619au6q2Jx3TMr9ZV1837uxJcEwyvXVtV"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PermissionlessFarmSwitch","discriminator":[37,92,147,78,250,100,147,137]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]},{"name":"TickArrayState","discriminator":[192,155,85,205,49,249,129,42]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"LOK","msg":"LOK"},{"code":6001,"name":"NotApproved","msg":"Not approved"},{"code":6002,"name":"InvalidUpdateConfigFlag","msg":"invalid update amm config flag"},{"code":6003,"name":"AccountLack","msg":"Account lack"},{"code":6004,"name":"ClosePositionErr","msg":"Remove liquitity, collect fees owed and reward then you can close position account"},{"code":6005,"name":"ZeroMintAmount","msg":"Minting amount should be greater than 0"},{"code":6006,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6007,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6008,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6009,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6010,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6011,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6012,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6013,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6014,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6015,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6016,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6017,"name":"InvalidLiquidity","msg":"Invalid liquidity when update position"},{"code":6018,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6019,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6020,"name":"TransactionTooOld","msg":"Transaction too old"},{"code":6021,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6022,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6023,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6024,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6025,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6026,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6027,"name":"NotEnoughTickArrayAccount","msg":"Not enought tick array account"},{"code":6028,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6029,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6030,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6031,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6032,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6033,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6034,"name":"InvalidRewardDesiredAmount","msg":"Invalid collect reward desired amount"},{"code":6035,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6036,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6037,"name":"NotApproveUpdateRewardEmissiones","msg":"Modification of emissiones is allowed within 72 hours from the end of the previous cycle"},{"code":6038,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6039,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6040,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6041,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6042,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6043,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6044,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PermissionlessFarmSwitch","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"is_on","docs":["Is the permissionless farm allowed or not"],"type":"bool"}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"swap_in_amount_token_0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swap_out_amount_token_1","type":"u128"},{"name":"swap_in_amount_token_1","type":"u128"},{"name":"swap_out_amount_token_0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",7]}},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"total_fees_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_claimed_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_token_1","type":"u64"},{"name":"total_fees_claimed_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"padding1","type":{"array":["u64",24]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"TickArrayState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"TickState"}},60]}},{"name":"initialized_tick_count","type":"u8"},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u8",107]}}]}},{"name":"TickState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"tick","type":"i32"},{"name":"liquidity_net","docs":["Amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)"],"type":"i128"},{"name":"liquidity_gross","docs":["The total position liquidity that references this tick"],"type":"u128"},{"name":"fee_growth_outside_0_x64","docs":["Fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)","only has relative meaning, not absolute — the value depends on when the tick is initialized"],"type":"u128"},{"name":"fee_growth_outside_1_x64","type":"u128"},{"name":"reward_growths_outside_x64","type":{"array":["u128",3]}},{"name":"padding","type":{"array":["u32",13]}}]}},{"name":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/idls/printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json b/idls/printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json new file mode 100644 index 0000000..2899019 --- /dev/null +++ b/idls/printr.T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint.json @@ -0,0 +1 @@ +{"address":"T8HsGYv7sMk3kTnyaRqZrbRPuntYzdh12evXBkprint","metadata":{"name":"printr","version":"1.0.0","spec":"0.1.0","description":"Printr on Solana"},"instructions":[{"name":"authorized_spend_all_quote","discriminator":[55,106,238,14,152,246,186,129],"accounts":[{"name":"authorizor","docs":["This is a Printr PDA.","You can see the expected seed in the [Self::apply] static function."],"writable":true},{"name":"authorizor_wallet","writable":true,"optional":true},{"name":"swap","accounts":[{"name":"payer","docs":["The user performing the swap"],"writable":true,"signer":true},{"name":"printr_authority","docs":["This is the account that funds the graduation process.",""],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"input_wallet","writable":true},{"name":"output_wallet","docs":["The mint of this token account determines what's being sold, whether telecoin or quote."],"writable":true},{"name":"telecoin_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.",""],"writable":true},{"name":"damm_printr_partner_config"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_position_nft_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,100,97,109,109,95,112,111,115,105,116,105,111,110,95,110,102,116,95,109,105,110,116]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"damm_position_nft_account","writable":true},{"name":"damm_position","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","docs":["The DAMM V2 program that abstracts the AMM logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","docs":["New accounts, native transfers, etc."],"address":"11111111111111111111111111111111"}]}],"args":[{"name":"max_price","type":{"defined":{"name":"SqrtBitshiftedPrice"}}},{"name":"extra_seed","type":"bytes"}]},{"name":"buyback_and_burn","discriminator":[121,156,154,165,194,86,180,130],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"payer_quote_wallet","writable":true},{"name":"buyback_telecoin_wallet","docs":["Owned by printr_authority (PDA)."],"writable":true},{"name":"telecoin_mint","writable":true},{"name":"quote_mint","docs":["UncheckedAccount to avoid self-CPI exit handler corruption."],"writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","writable":true},{"name":"damm_printr_partner_config"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_position_nft_mint","writable":true},{"name":"damm_position_nft_account","writable":true},{"name":"damm_position","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program"},{"name":"dbc_program","address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"printr_config","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"quote_fee_vault","docs":["Stores all quote fees across all telecoins."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"printr_quote_fee_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_config.printr_fee_authority","account":"PrintrConfig"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"revshare1_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"revshare2_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"instructions_sysvar","address":"Sysvar1nstructions1111111111111111111111111"},{"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":[],"returns":{"defined":{"name":"FeesClaimed"}}},{"name":"cancel_authorized_spend_all_quote","discriminator":[167,1,184,69,242,171,240,207],"accounts":[{"name":"authorizor","docs":["This is a Printr PDA.","You can see the expected seed in the [Self::apply] static function."],"writable":true},{"name":"authorizor_wallet","docs":["The SPL token account associated with the authorizor."],"writable":true,"optional":true},{"name":"quote_mint","docs":["The quote mint that was meant to be swapped against the telecoin token."]},{"name":"recipient","docs":["The authorizor's recipient can cancel their own swap order."],"writable":true,"signer":true},{"name":"recipient_wallet","docs":["The recipient's wallet if applicable."],"writable":true,"optional":true},{"name":"quote_token_program","docs":["Allows us to swap."]},{"name":"system_program","docs":["We need to transfer."],"address":"11111111111111111111111111111111"}],"args":[{"name":"max_price","type":{"defined":{"name":"SqrtBitshiftedPrice"}}},{"name":"telecoin_mint","type":"pubkey"},{"name":"extra_seed","type":"bytes"}]},{"name":"claim_damm_fees","discriminator":[221,192,167,35,180,110,107,114],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"telecoin_mint"},{"name":"quote_mint","docs":["The quote mint is the token that will be used to buy telecoin tokens."]},{"name":"telecoin_fee_vault_authority","docs":["Authority for the telecoin fee vault.","For staking telecoins: the staking pool PDA.","For non-staking telecoins: printr_config.staking_authority.",""]},{"name":"telecoin_fee_vault","docs":["Stores telecoin fees.","","For staking telecoins: staking pool's fee vault (authority = staking_pool).","","For non-staking telecoins: generic staking wallet (authority =","printr_config.staking_authority).",""],"writable":true},{"name":"dev_config","docs":["The dev config stores information about the dev and must match the damm pool.","","We know this is the right dev config because its seed matches the telecoin mint which in","turn matches the dammv2 pool."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"quote_fee_vault","docs":["Stores all quote fees across all telecoins."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"damm_position_nft_account"},{"name":"damm_position","writable":true},{"name":"damm_pool_authority"},{"name":"damm_pool","writable":true},{"name":"damm_base_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to transfer."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","docs":["For the telecoin fees."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"damm_v2_program","docs":["The DAMM program that abstracts the bonding curve logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"}],"args":[],"returns":{"defined":{"name":"FeesClaimed"}}},{"name":"claim_dbc_fees","discriminator":[162,222,128,90,59,115,34,130],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"telecoin_mint"},{"name":"quote_mint","docs":["The quote mint is the token that is be used to buy telecoin tokens."]},{"name":"any_telecoin_wallet","docs":["Therefore any old telecoin wallet will do, it will not be used."],"writable":true},{"name":"printr_intermediary_authority","pda":{"seeds":[{"kind":"const","value":[105,110,116,101,114,109,101,100,105,97,114,121,95,116,111,107,101,110,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_intermediary_quote_wallet","docs":["Useful only for $wSOL quote token.","We will collect some fee amount to support smart graduation in swap ix."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_intermediary_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"dbc_pool_authority"},{"name":"dbc_pool","writable":true},{"name":"dbc_base_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dev_config","docs":["The dev config stores information about the dev and must match the DBC pool.","","We know this is the right dev config because its seed matches the telecoin mint which in","turn matches the dbc pool."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"quote_fee_vault","docs":["Shared vault per quote mint. Per-telecoin accounting is tracked in DevConfig."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"telecoin_token_program","docs":["We'll need this to transfer."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's telecoin ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"}],"args":[],"returns":{"defined":{"name":"FeesClaimed"}}},{"name":"claim_printr_authority_lamports","discriminator":[52,14,140,114,41,105,0,48],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"printr_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"claim_staking_rewards","discriminator":[229,141,170,69,111,94,6,72],"accounts":[{"name":"payer","docs":["Anyone can call this instruction."],"writable":true,"signer":true},{"name":"position_owner","writable":true},{"name":"printr_config","docs":["Printr config for authorizing transfers."],"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"telecoin_mint","docs":["The telecoin mint."]},{"name":"quote_mint","docs":["The quote token mint."]},{"name":"staking_pool","docs":["The staking pool for this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"stake_position","docs":["The stake position being claimed from."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"telecoin_mint"},{"kind":"account","path":"position_owner"},{"kind":"account","path":"stake_position.position_nonce","account":"StakePosition"}]}},{"name":"owner_quote_account","docs":["Owner's quote token account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_owner"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"owner_telecoin_account","docs":["Owner's telecoin token account."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_owner"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"quote_fee_vault","docs":["Stores all quote fees across Printr so be gentle with it."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"pool_telecoin_vault","docs":["Pool's telecoin vault.","Contains both trading fees and staked telecoin."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"telecoin_token_program","docs":["Checks the account owner."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["ATA boy"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Needed because `owner_quote_account` and `owner_telecoin_account` are `init_if_needed`."],"address":"11111111111111111111111111111111"},{"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":"close_stake_position","discriminator":[8,63,74,143,105,42,28,64],"accounts":[{"name":"position_owner","docs":["Only the position owner can close the position.","Receives the rent refund from the closed position account."],"writable":true,"signer":true},{"name":"telecoin_mint","docs":["The telecoin mint."]},{"name":"staking_pool","docs":["The staking pool for this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"stake_position","docs":["The stake position being closed. Rent is refunded to `position_owner`."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"telecoin_mint"},{"kind":"account","path":"position_owner"},{"kind":"account","path":"stake_position.position_nonce","account":"StakePosition"}]}},{"name":"owner_telecoin_account","docs":["Owner's telecoin token account. Receives the staked telecoin back."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_owner"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_telecoin_vault","docs":["Pool's telecoin vault holding the staked telecoin."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"telecoin_token_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Needed for `init_if_needed` on `owner_telecoin_account` and for `close` on the position."],"address":"11111111111111111111111111111111"},{"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":"create_printr_config","discriminator":[160,191,66,212,5,106,20,215],"accounts":[{"name":"admin","writable":true,"signer":true},{"name":"printr_fee_authority"},{"name":"questflow_ai_fee_authority"},{"name":"printr_staking_authority"},{"name":"printr_config","docs":["We use `init_if_needed` purposefully.","Call this ix again to update the config."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_stake_position","discriminator":[92,168,96,133,102,121,86,138],"accounts":[{"name":"payer","docs":["We can create positions on behalf of others."],"writable":true,"signer":true},{"name":"position_owner","writable":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","docs":["Dev config must indicate this telecoin uses staking for fee distribution."],"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"staking_pool","docs":["The staking pool for this telecoin.","Will be lazily initialized if this is the first time anyone stakes this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"stake_position","docs":["The stake position being created.","The ID can be reused, just cannot be used at the same time as another position."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,101,95,112,111,115,105,116,105,111,110]},{"kind":"account","path":"telecoin_mint"},{"kind":"account","path":"position_owner"},{"kind":"arg","path":"position_nonce"}]}},{"name":"payer_telecoin_account","docs":["Payer doesn't necessarily equal to the user but most likely will."],"writable":true},{"name":"pool_telecoin_vault","docs":["Staking pool's telecoin vault."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"telecoin_mint","docs":["The telecoin mint."]},{"name":"telecoin_token_program","docs":["Checks the account owner."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","docs":["Related to the telecoin vault ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"position_nonce","type":"u32"},{"name":"to_stake","type":{"defined":{"name":"TokenAmount"}}},{"name":"lock_period","type":{"defined":{"name":"LockPeriod"}}}]},{"name":"deploy_telecoin","discriminator":[4,248,20,1,125,63,15,0],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,116,101,108,101,99,111,105,110,95,109,105,110,116]},{"kind":"arg","path":"telecoin_params"}]}},{"name":"telecoin_token_program","docs":["We'll need this to init the mint."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"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":"telecoin_params_compact","type":{"defined":{"name":"TelecoinParamsCompact"}}}]},{"name":"deploy_telecoin2","discriminator":[37,155,54,236,186,225,201,137],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,116,101,108,101,99,111,105,110,95,109,105,110,116]},{"kind":"arg","path":"telecoin_params"}]}},{"name":"telecoin_token_program","docs":["We'll need this to init the mint."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"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":"telecoin_params","type":{"defined":{"name":"TelecoinParams"}}}]},{"name":"distribute_telecoin_quote_fees","discriminator":[31,197,88,239,123,165,197,208],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"quote_mint","docs":["The quote mint is the token that is be used to buy telecoin tokens."]},{"name":"telecoin_mint"},{"name":"quote_fee_vault","docs":["Stores all quote fees across all telecoins.","How much can we claim now is tracked in the dev config."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"dev_config","docs":["The dev config stores information about how much a dev can claim.","The existence of this account implies that the telecoin mint was created by Printr."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"dev"},{"name":"dev_quote_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"dev"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"printr_quote_fee_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_config.printr_fee_authority","account":"PrintrConfig"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"revshare1_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"revshare2_quote_fee_wallet","docs":["If relevant then authority is checked via [CollectProtocolTransfers]"],"writable":true,"optional":true},{"name":"dbc_pool"},{"name":"dbc_config"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's quote ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"estimate_swap","discriminator":[219,196,183,82,59,37,166,59],"accounts":[{"name":"dbc_config"},{"name":"dbc_pool"},{"name":"damm_pool","docs":["Might be uninitialized if the pool is not yet graduated."]}],"args":[{"name":"params","type":{"defined":{"name":"SwapIntent"}}}],"returns":{"defined":{"name":"EstimateSwapOutput"}}},{"name":"estimate_teleport_with_lz","discriminator":[11,141,166,118,153,255,62,132],"accounts":[{"name":"peer"}],"args":[{"name":"params","type":{"defined":{"name":"EstimateTeleportWithLzParams"}}}],"returns":{"defined":{"name":"TokenAmount"}}},{"name":"lz_receive","discriminator":[8,179,120,109,33,118,189,80],"accounts":[{"name":"payer","docs":["The LZ executor."],"writable":true,"signer":true},{"name":"peer","docs":["Represents where did the message come from."]},{"name":"telecoin_teleport_config","docs":["If this account does not exist then the provided peer must be set as a default peer.","Otherwise we parse this account's configuration and assert it's been upheld."]},{"name":"printr_authority","docs":["Global Printr telecoin mint authority"],"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"telecoin_mint","docs":["We'll mint these tokens.",""],"writable":true},{"name":"recipient"},{"name":"recipient_destination_telecoin_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"telecoin_token_program","docs":["Telecoin mint is always token program 2022."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","docs":["In case we need to create the ATA"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["In case we need to create the ATA"],"address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"LzReceiveParams"}}}]},{"name":"lz_receive_types","discriminator":[221,17,246,159,248,128,31,96],"accounts":[],"args":[{"name":"params","type":{"defined":{"name":"LzReceiveParams"}}}],"returns":{"vec":{"defined":{"name":"LzAccount"}}}},{"name":"lz_set_peer","discriminator":[199,123,81,116,208,49,213,232],"accounts":[{"name":"admin","docs":["Printr staff."],"writable":true,"signer":true},{"name":"peer","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,101,114]},{"kind":"arg","path":"peer_address"}]}},{"name":"lz_oapp_registry","writable":true,"pda":{"seeds":[{"kind":"const","value":[79,65,112,112]},{"kind":"account","path":"peer"}],"program":{"kind":"account","path":"endpoint_program"}}},{"name":"endpoint_emit_cpi_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"account","path":"endpoint_program"}}},{"name":"endpoint_program","address":"76y77prsiCMvXMjuoZ5VRrhG5qYBrUMYTE5WgHqgjEn6"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"peer_address","type":{"array":["u8",32]}}]},{"name":"print_telecoin","discriminator":[214,30,4,102,207,73,108,35],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params in the","Meteora CPI.",""],"writable":true},{"name":"quote_mint","docs":["The quote mint is the token that will be used to buy telecoin tokens."]},{"name":"initial_buy_authority","docs":["When a telecoin is printed we perform an initial buy on behalf of the dev.","","There are three options how the initial buy can happen:","1. No deposit PDA","2. Deposit PDA of native $SOL","3. Deposit PDA with an associated token account.","","See `DepositPda` enum for more details.",""],"writable":true},{"name":"initial_buy_source","writable":true},{"name":"dev_on_solana","writable":true},{"name":"dev_destination_telecoin_wallet","docs":["Associated token account cannot exist because we've just created the telecoin mint.","Will not be initialized if initial spend is zero.",""],"writable":true,"optional":true},{"name":"dbc_config","docs":["We'll init the config first.",""],"writable":true},{"name":"dbc_pool_authority"},{"name":"dbc_pool","docs":["The bonding curve state, initialized after the config.",""],"writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.","","If provided then we create a migration metadata account for the DBC pool.",""],"writable":true,"optional":true},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's telecoin ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"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":"telecoin_params_compact","type":{"defined":{"name":"TelecoinParamsCompact"}}}]},{"name":"print_telecoin2","discriminator":[166,60,38,43,238,32,2,160],"accounts":[{"name":"payer","docs":["Creating a launch is a permission-less operation.","This could be a Printr user or a BE."],"writable":true,"signer":true},{"name":"printr_authority","pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"telecoin_mint","docs":["This is the telecoin mint which we initialize according to the telecoin params in the","Meteora CPI.",""],"writable":true},{"name":"quote_mint","docs":["The quote mint is the token that will be used to buy telecoin tokens."]},{"name":"initial_buy_authority","docs":["When a telecoin is printed we perform an initial buy on behalf of the dev.","","There are three options how the initial buy can happen:","1. No deposit PDA","2. Deposit PDA of native $SOL","3. Deposit PDA with an associated token account.","","See `DepositPda` enum for more details.",""],"writable":true},{"name":"initial_buy_source","writable":true},{"name":"dev_on_solana","writable":true},{"name":"dev_destination_telecoin_wallet","docs":["Associated token account cannot exist because we've just created the telecoin mint.","Will not be initialized if initial spend is zero.",""],"writable":true,"optional":true},{"name":"dbc_config","docs":["We'll init the config first.",""],"writable":true},{"name":"dbc_pool_authority"},{"name":"dbc_pool","docs":["The bonding curve state, initialized after the config.",""],"writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.","","If provided then we create a migration metadata account for the DBC pool.",""],"writable":true,"optional":true},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Used to create dev's telecoin ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Necessary for creating new accounts."],"address":"11111111111111111111111111111111"},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"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":"telecoin_params","type":{"defined":{"name":"TelecoinParams"}}}]},{"name":"refresh_staking2","discriminator":[36,197,195,27,8,224,118,27],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"printr_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,99,111,110,102,105,103]}]}},{"name":"printr_quote_fee_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_config.printr_fee_authority","account":"PrintrConfig"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"quote_fee_vault","docs":["Stores all quote fees across Printr."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,115,95,102,101,101,95,118,97,117,108,116]},{"kind":"account","path":"quote_mint"}]}},{"name":"revshare1_quote_fee_wallet","writable":true,"optional":true},{"name":"revshare2_quote_fee_wallet","writable":true,"optional":true},{"name":"staking_pool","docs":["The staking pool for this telecoin."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,116,97,107,105,110,103,95,112,111,111,108]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"dev_config","docs":["The dev config stores information about accumulated quote fees."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"dbc_config"},{"name":"dbc_pool","docs":["DBC config."]},{"name":"telecoin_mint","docs":["The telecoin mint."]},{"name":"quote_mint","docs":["The quote mint is the token that is be used to buy telecoin tokens."]},{"name":"pool_telecoin_vault","docs":["Telecoin vault that holds staked tokens and accumulated telecoin fees."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"staking_pool"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"protocol_telecoin_wallet","docs":["Protocol's telecoin wallet. Receives the protocol's share of telecoin rewards.","ATA of `printr_config.staking_authority` for the telecoin mint."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_telecoin_authority"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"protocol_telecoin_authority"},{"name":"telecoin_token_program","docs":["Checks the account owner."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"associated_token_program","docs":["Related to the telecoin vault ATA."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Need to init the staking pool if not yet."],"address":"11111111111111111111111111111111"},{"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":"set_dev_config_dev","discriminator":[175,111,205,104,111,167,15,28],"accounts":[{"name":"admin","signer":true},{"name":"telecoin_mint","docs":["The telecoin mint whose dev config we want to update."]},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}},{"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":"new_dev","type":"pubkey"}]},{"name":"set_dev_config_fees","discriminator":[75,184,89,133,143,57,183,121],"accounts":[{"name":"admin","signer":true},{"name":"telecoin_mint","docs":["The telecoin mint whose dev config we want to update."]},{"name":"dev_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,101,118,95,99,111,110,102,105,103]},{"kind":"account","path":"telecoin_mint"}]}}],"args":[{"name":"params","type":{"defined":{"name":"SetDevConfigFeesParams"}}}]},{"name":"set_peer_conf","discriminator":[81,211,81,152,212,153,58,71],"accounts":[{"name":"admin","docs":["Printr staff."],"signer":true},{"name":"peer","writable":true}],"args":[{"name":"params","type":{"defined":{"name":"SetPeerConfParams"}}}]},{"name":"set_telecoin_teleport_conf","discriminator":[100,47,61,148,198,138,62,49],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"admin","docs":["Printr staff."],"signer":true},{"name":"telecoin_teleport_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,101,108,101,99,111,105,110,95,116,101,108,101,112,111,114,116,95,99,111,110,102,105,103]},{"kind":"arg","path":"telecoin_id"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"telecoin_id","type":{"defined":{"name":"TelecoinId"}}},{"name":"params","type":{"defined":{"name":"SetTelecoinTeleportConfParams"}}}]},{"name":"spend_all_quote_no_graduation","discriminator":[198,170,217,245,59,73,114,60],"accounts":[{"name":"payer","docs":["The entity performing the swap.","Owner of the input token account.","","If the quote token is $wSOL then we transfer everything from this account to the","intermediary token account."],"writable":true,"signer":true},{"name":"printr_intermediary_authority","pda":{"seeds":[{"kind":"const","value":[105,110,116,101,114,109,101,100,105,97,114,121,95,116,111,107,101,110,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"printr_intermediary_quote_wallet","docs":["To support post hooks with native $SOL we need to create an intermediate ATA for the quote","token.","All the quote tokens will be transferred to this account first before being swapped.","The account is not closed so that it can be reused in the future without paying rent."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"printr_intermediary_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"input_quote_wallet","docs":["We will use everything that's in this token account to buy as much telecoin as possible.","","Can be none for $wSOL quote if wrapping is needed."],"writable":true,"optional":true},{"name":"recipient"},{"name":"recipient_quote_wallet","writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"output_telecoin_wallet","docs":["The owner of the output account will not match the payer for a posthook ix.",""],"writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"account","path":"telecoin_token_program"},{"kind":"account","path":"telecoin_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"telecoin_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","docs":["The DAMM V2 program that abstracts the AMM logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"associated_token_program","docs":["Used to create ATA if needed."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["We might need to refill the input token account with $wSOL."],"address":"11111111111111111111111111111111"}],"args":[{"name":"max_price","type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"writable":true,"signer":true},{"name":"printr_authority","docs":["This is the account that funds the graduation process.",""],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"input_wallet","writable":true},{"name":"output_wallet","docs":["The mint of this token account determines what's being sold, whether telecoin or quote."],"writable":true},{"name":"telecoin_mint","writable":true},{"name":"quote_mint","writable":true},{"name":"dbc_pool_authority","writable":true},{"name":"dbc_config"},{"name":"dbc_pool","writable":true},{"name":"dbc_telecoin_vault","writable":true},{"name":"dbc_quote_vault","writable":true},{"name":"dbc_event_authority"},{"name":"dbc_migration_metadata","docs":["DEPRECATED: Meteora no longer uses this one.",""],"writable":true},{"name":"damm_printr_partner_config"},{"name":"damm_pool","writable":true},{"name":"damm_pool_authority"},{"name":"damm_telecoin_vault","writable":true},{"name":"damm_quote_vault","writable":true},{"name":"damm_position_nft_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,114,105,110,116,114,95,100,97,109,109,95,112,111,115,105,116,105,111,110,95,110,102,116,95,109,105,110,116]},{"kind":"account","path":"telecoin_mint"}]}},{"name":"damm_position_nft_account","writable":true},{"name":"damm_position","writable":true},{"name":"damm_event_authority"},{"name":"telecoin_token_program","docs":["We'll need this to init the mint and init the token account."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["We'll need this to do transfers."]},{"name":"dbc_program","docs":["The DBC program that abstracts the bonding curve logic."],"address":"dbcij3LWUppWqq96dh6gJWwBifmcGfLSB5D4DuSMaqN"},{"name":"damm_program","docs":["The DAMM V2 program that abstracts the AMM logic."],"address":"cpamdpZCGKUy5JxQXB4dcpGPiikHawvSWAd6mEn1sGG"},{"name":"system_program","docs":["New accounts, native transfers, etc."],"address":"11111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"SwapIntent"}}}]},{"name":"teleport_with_lz","discriminator":[166,121,233,8,125,40,179,47],"accounts":[{"name":"payer","docs":["This is the user that wants to send telecoin tokens."],"writable":true,"signer":true},{"name":"telecoin_mint","docs":["The telecoin mint that we burn here."],"writable":true},{"name":"telecoin_teleport_config","docs":["If this account does not exist then the provided peer must be set as a default peer.","Otherwise we parse this account's configuration and assert it's been upheld."]},{"name":"peer"},{"name":"user_source_telecoin_wallet","docs":["Where to burn from."],"writable":true},{"name":"telecoin_token_program","docs":["Needed to burn telecoin tokens."],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"params","type":{"defined":{"name":"TeleportWithLzParams"}}}]}],"accounts":[{"name":"DevConfig","discriminator":[92,158,1,106,83,222,4,81]},{"name":"Peer","discriminator":[50,8,19,55,40,253,37,58]},{"name":"PoolConfig","discriminator":[26,108,14,123,116,230,129,43]},{"name":"PrintrConfig","discriminator":[184,34,37,157,37,223,65,252]},{"name":"StakePosition","discriminator":[78,165,30,111,171,125,11,220]},{"name":"StakingPool","discriminator":[203,19,214,220,220,154,24,102]},{"name":"TelecoinTeleportConfig","discriminator":[146,117,46,78,137,112,71,57]},{"name":"VirtualPool","discriminator":[213,224,5,209,98,69,119,92]}],"events":[{"name":"BuybackAndBurnEvent","discriminator":[158,146,152,190,14,197,155,158]},{"name":"ClaimStakingRewardsEvent","discriminator":[109,78,167,39,50,229,74,85]},{"name":"CreateStakePositionEvent","discriminator":[47,51,210,240,178,138,154,198]},{"name":"DeployTelecoinEvent","discriminator":[133,217,193,229,51,195,248,98]},{"name":"PrintTelecoinEvent","discriminator":[202,7,212,34,205,71,111,139]},{"name":"RefreshStaking2Event","discriminator":[39,218,120,153,29,229,190,254]},{"name":"SetDevConfigDevEvent","discriminator":[89,201,9,41,16,123,16,57]},{"name":"TeleportWithLzEvent","discriminator":[166,170,61,125,224,166,227,98]}],"types":[{"name":"Accumulator","docs":["Accumulator value tracking cumulative rewards per unit of weighted stake.","","Used in the staking system where rewards are distributed proportionally across","all stakers. Values are scaled by 2^64 for precision:","","```text","accumulator += (new_rewards << 64) / total_weighted_stake","pending_rewards = weighted_stake * (current_acc - last_acc) >> 64","```"],"type":{"kind":"struct","fields":["u128"]}},{"name":"BaseFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"cliff_fee_numerator","type":"u64"},{"name":"second_factor","type":"u64"},{"name":"third_factor","type":"u64"},{"name":"first_factor","type":"u16"},{"name":"base_fee_mode","type":"u8"},{"name":"padding_0","type":{"array":["u8",5]}}]}},{"name":"BuybackAndBurnEvent","type":{"kind":"struct","fields":[{"name":"telecoin_id","type":{"defined":{"name":"TelecoinId"}}},{"name":"quote_spent","type":{"defined":{"name":"TokenAmount"}}},{"name":"telecoin_burned","type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"ClaimStakingRewardsEvent","type":{"kind":"struct","fields":[{"name":"owner","docs":["Owner of the position."],"type":"pubkey"},{"name":"telecoin_mint","docs":["Telecoin mint."],"type":"pubkey"},{"name":"position_nonce","docs":["Position nonce."],"type":"u32"},{"name":"quote_rewards","docs":["Quote token rewards claimed."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"telecoin_rewards","docs":["Telecoin rewards claimed."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"position_closed","docs":["Whether the position was closed. Always false for `claim_staking_rewards`;","set to true only by `close_stake_position`."],"type":"bool"},{"name":"returned_stake","docs":["Amount returned to user if closed. Always zero for `claim_staking_rewards`;","the staked amount is only returned by `close_stake_position`."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"quote_token_accumulator","docs":["Position's quote token accumulator after claim."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["Position's telecoin accumulator after claim."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_id","docs":["Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}}]}},{"name":"CreateStakePositionEvent","type":{"kind":"struct","fields":[{"name":"owner","docs":["User that will receive the staking rewards and the telecoins back."],"type":"pubkey"},{"name":"telecoin_id","docs":["Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"position_nonce","docs":["Position nonce for this user's stake."],"type":"u32"},{"name":"staked","docs":["Amount of telecoin staked."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"lock_period","docs":["Lock period selected."],"type":{"defined":{"name":"LockPeriod"}}},{"name":"staked_at","docs":["Timestamp when staking was created."],"type":"i64"},{"name":"quote_token_accumulator","docs":["Pool's quote token accumulator at position creation (position's initial checkpoint)."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["Pool's telecoin accumulator at position creation (position's initial checkpoint)."],"type":{"defined":{"name":"Accumulator"}}}]}},{"name":"DeployTelecoinEvent","docs":["Some Printr related details about the deploy."],"type":{"kind":"struct","fields":[{"name":"protocol_version","docs":["The protocol version of the graduating telecoin token."],"type":{"defined":{"name":"PrintrProtocolVersion"}}},{"name":"telecoin_id","docs":["The Printr Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"dev_on_solana","docs":["The dev's wallet on Solana.","","Will be default if this telecoin doesn't have a solana dev wallet."],"type":"pubkey"}]}},{"name":"DevConfig","docs":["Configuration for a dev of a telecoin token."],"type":{"kind":"struct","fields":[{"name":"fee_sink","docs":["Used to identify the dev for fee distribution.","","Will be the default key if this telecoin doesn't have a solana dev wallet.","That can happen if the telecoin was not printed on Solana and only deployed here","additionally without a bonding curve."],"type":{"defined":{"name":"FeeSink"}}},{"name":"protocol_version","docs":["Can be used to distinguish between breaking changes in the future."],"type":{"defined":{"name":"PrintrProtocolVersion"}}},{"name":"telecoin_id","docs":["What's the canonical telecoin ID at the time of creation.","We try not to break how telecoin IDs are derived but we neither make guarantees they won't","change."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"fee_sink_quote_fee","docs":["When claiming fees we accumulate them in this counter.","When distributing the fees we reset this to zero and transfer the amount.","","# Migration","","After `PrintrProtocolVersion(3)` inclusive this field collects _all_ quote fees, both dev","fees and protocol fees."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"fees","docs":["Custom fee configuration set at print/deploy time."],"type":{"defined":{"name":"DevConfigFees"}}},{"name":"flags","docs":["Bit flags for fee distribution lifecycle."],"type":{"defined":{"name":"DevConfigFlags"}}},{"name":"_padding","type":"u8"}]}},{"name":"DevConfigFees","docs":["Custom fee overrides stored in [DevConfig].","","# Migration","","Until `PrintrProtocolVersion(3)` exclusive we used to store 8 padding bytes."],"type":{"kind":"struct","fields":[{"name":"dbc_protocol_share_of_trading_fee_pct","docs":["Protocol's share of the bonding curve trading fee as a percentage (0-100).","","For example, if the total DBC trading fee is 2% and this value is 15,","then 0.3% goes to the protocol and 1.7% goes to the dev.","","0 means not set.","This is going to be the case for telecoins printed before this struct was introduced.","In that case we use the defaults to keep the behavior consistent with what it was before."],"type":"u8"},{"name":"amm_protocol_share_of_trading_fee_pct","docs":["Protocol's share of the AMM trading fee as a percentage (0-100).","","Same semantics as [Self::dbc_protocol_share_of_trading_fee_pct] but for AMM trades."],"type":"u8"},{"name":"rev_shares","docs":["Up to 2 revshare entries for protocol fee distribution."],"type":{"array":[{"defined":{"name":"RevShareSlot"}},2]}}]}},{"name":"DevConfigFlags","docs":["Anchor-serializable wrapper around [printr_sdk::dev_config::DevConfigFlags]."],"type":{"kind":"struct","fields":["u8"]}},{"name":"DynamicFeeConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"initialized","type":"u8"},{"name":"padding","type":{"array":["u8",7]}},{"name":"max_volatility_accumulator","type":"u32"},{"name":"variable_fee_control","type":"u32"},{"name":"bin_step","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"padding2","type":{"array":["u8",8]}},{"name":"bin_step_u128","type":"u128"}]}},{"name":"EstimateSwapOutput","docs":["This is the returned value from this ix."],"type":{"kind":"struct","fields":[{"name":"estimate","docs":["The swap estimate."],"type":{"defined":{"name":"SwapEstimate"}}},{"name":"which_remaining_accounts_are_owned_by_system_program","docs":["The remaining accounts are mapped onto this list.","The index will be `true` if the account is owned by the system program."],"type":{"vec":"bool"}}]}},{"name":"EstimateTeleportWithLzParams","docs":["Parameters for the [TeleportWithLz] instruction."],"type":{"kind":"struct","fields":[{"name":"message_len","docs":["How long is the message to send.","","See [omnichain_codec::OutgoingMessage] for the message format."],"type":"u16"},{"name":"lz_options","docs":[""],"type":"bytes"},{"name":"lz_destination_endpoint_id","docs":["The chain ID of the destination chain.","",""],"type":"u32"}]}},{"name":"FeeSink","type":{"kind":"type","alias":"pubkey"}},{"name":"FeesClaimed","docs":["Fee claiming endpoints return how much fees were claimed - in total - for each token."],"type":{"kind":"struct","fields":[{"name":"in_telecoin","type":{"defined":{"name":"TokenAmount"}}},{"name":"in_quote","type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"LiquidityDistributionConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"sqrt_price","type":"u128"},{"name":"liquidity","type":"u128"}]}},{"name":"LiquidityVestingInfo","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"is_initialized","type":"u8"},{"name":"vesting_percentage","type":"u8"},{"name":"_padding","type":{"array":["u8",2]}},{"name":"bps_per_period","type":"u16"},{"name":"number_of_periods","type":"u16"},{"name":"frequency","type":"u32"},{"name":"cliff_duration_from_migration_time","type":"u32"}]}},{"name":"LockPeriod","docs":["Lock periods for staking, each with its own reward multiplier."],"type":{"kind":"enum","variants":[{"name":"SevenDays"},{"name":"FourteenDays"},{"name":"ThirtyDays"},{"name":"SixtyDays"},{"name":"NinetyDays"},{"name":"OneHundredEightyDays"},{"name":"TenSeconds"}]}},{"name":"LockedVestingConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"amount_per_period","type":"u64"},{"name":"cliff_duration_from_migration_time","type":"u64"},{"name":"frequency","type":"u64"},{"name":"number_of_period","type":"u64"},{"name":"cliff_unlock_amount","type":"u64"},{"name":"_padding","type":"u64"}]}},{"name":"LzAccount","docs":["same to anchor_lang::prelude::AccountMeta"],"type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"is_signer","type":"bool"},{"name":"is_writable","type":"bool"}]}},{"name":"LzReceiveParams","type":{"kind":"struct","fields":[{"name":"src_eid","type":"u32"},{"name":"sender","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"guid","type":{"array":["u8",32]}},{"name":"message","type":"bytes"},{"name":"extra_data","type":"bytes"}]}},{"name":"Peer","docs":["A peer in omnichain network is a connection living on another chain,","typically a smart contract.","","A peer is authorized by the Printr staff to send and receive messages","authoritatively.","This suggests a reciprocal relationship between the two peers.","","To trust a message we must validate that it was sent by a peer.","Validation is done by relaying networks such as Axelar or LayerZero.","Acts as a connection to another chain."],"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"address","docs":["The address of the peer on the other chain.","Is part of the seed"],"type":{"array":["u8",32]}},{"name":"is_lz_enabled","docs":["Admin can enable and disable the LZ communication channel to the peer.","","Multiple peers can be enabled."],"type":"bool"},{"name":"is_lz_default","docs":["Use this peer as the default for LZ teleports.","","Multiple peers can be set as default in which case they are equivalent from the POV of the","security of the protocol."],"type":"bool"}]}},{"name":"PoolConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"quote_mint","docs":["quote mint"],"type":"pubkey"},{"name":"fee_claimer","docs":["Address to get the fee"],"type":"pubkey"},{"name":"leftover_receiver","docs":["Address to receive extra base token after migration, in case token is fixed supply"],"type":"pubkey"},{"name":"pool_fees","docs":["Pool fee"],"type":{"defined":{"name":"PoolFeesConfig"}}},{"name":"partner_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"creator_liquidity_vesting_info","type":{"defined":{"name":"LiquidityVestingInfo"}}},{"name":"padding_0","docs":["Padding for future use"],"type":{"array":["u8",14]}},{"name":"padding_1","docs":["Previously was protocol and referral fee percent. Beware of tombstone."],"type":"u16"},{"name":"collect_fee_mode","docs":["Collect fee mode"],"type":"u8"},{"name":"migration_option","docs":["migration option"],"type":"u8"},{"name":"activation_type","docs":["whether mode slot or timestamp"],"type":"u8"},{"name":"token_decimal","docs":["token decimals"],"type":"u8"},{"name":"version","docs":["version"],"type":"u8"},{"name":"token_type","docs":["token type of base token"],"type":"u8"},{"name":"quote_token_flag","docs":["quote token flag"],"type":"u8"},{"name":"partner_permanent_locked_liquidity_percentage","docs":["partner locked liquidity percentage"],"type":"u8"},{"name":"partner_liquidity_percentage","docs":["partner liquidity percentage"],"type":"u8"},{"name":"creator_permanent_locked_liquidity_percentage","docs":["creator post migration fee percentage"],"type":"u8"},{"name":"creator_liquidity_percentage","docs":["creator liquidity percentage"],"type":"u8"},{"name":"migration_fee_option","docs":["migration fee option"],"type":"u8"},{"name":"fixed_token_supply_flag","docs":["flag to indicate whether token is dynamic supply (0) or fixed supply (1)"],"type":"u8"},{"name":"creator_trading_fee_percentage","docs":["creator trading fee percentage"],"type":"u8"},{"name":"token_update_authority","docs":["token update authority"],"type":"u8"},{"name":"migration_fee_percentage","docs":["migration fee percentage"],"type":"u8"},{"name":"creator_migration_fee_percentage","docs":["creator migration fee percentage"],"type":"u8"},{"name":"padding_2","type":{"array":["u8",7]}},{"name":"swap_base_amount","docs":["swap base amount"],"type":"u64"},{"name":"migration_quote_threshold","docs":["migration quote threshold (in quote token)"],"type":"u64"},{"name":"migration_base_threshold","docs":["migration base threshold (in base token)"],"type":"u64"},{"name":"migration_sqrt_price","docs":["migration sqrt price"],"type":"u128"},{"name":"locked_vesting_config","docs":["locked vesting config"],"type":{"defined":{"name":"LockedVestingConfig"}}},{"name":"pre_migration_token_supply","docs":["pre migration token supply"],"type":"u64"},{"name":"post_migration_token_supply","docs":["post migration token supply"],"type":"u64"},{"name":"migrated_collect_fee_mode","docs":["migrated pool collect fee mode"],"type":"u8"},{"name":"migrated_dynamic_fee","docs":["migrated dynamic fee option."],"type":"u8"},{"name":"migrated_pool_fee_bps","docs":["migrated pool fee in bps"],"type":"u16"},{"name":"migrated_pool_base_fee_mode","type":"u8"},{"name":"enable_first_swap_with_min_fee","type":"u8"},{"name":"migrated_compounding_fee_bps","docs":["compounding fee bps for migrated DAMM v2 pool, should only be non-zero if migrated_collect_fee_mode is 2 (Compounding)"],"type":"u16"},{"name":"pool_creation_fee","docs":["pool creation fee in lamports value"],"type":"u64"},{"name":"migrated_pool_base_fee_bytes","docs":["serialized MigratedPoolMarketCapFeeSchedulerParams, only used when migrated_pool_base_fee_mode is market cap scheduler"],"type":{"array":["u8",16]}},{"name":"sqrt_start_price","docs":["minimum price"],"type":"u128"},{"name":"curve","docs":["curve, only use 20 point firstly, we can extend that latter"],"type":{"array":[{"defined":{"name":"LiquidityDistributionConfig"}},20]}}]}},{"name":"PoolFeesConfig","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"base_fee","type":{"defined":{"name":"BaseFeeConfig"}}},{"name":"dynamic_fee","type":{"defined":{"name":"DynamicFeeConfig"}}}]}},{"name":"PoolMetrics","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"total_protocol_base_fee","type":"u64"},{"name":"total_protocol_quote_fee","type":"u64"},{"name":"total_trading_base_fee","type":"u64"},{"name":"total_trading_quote_fee","type":"u64"}]}},{"name":"PrintTelecoinEvent","docs":["Some Printr related details about the launch on top of meteora events."],"type":{"kind":"struct","fields":[{"name":"protocol_version","docs":["The protocol version of the graduating telecoin token."],"type":{"defined":{"name":"PrintrProtocolVersion"}}},{"name":"telecoin_id","docs":["The Printr Telecoin ID."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"quote_mint","docs":["Which mint is used as a quote."],"type":"pubkey"},{"name":"dev_on_solana","docs":["The dev's wallet on Solana."],"type":"pubkey"}]}},{"name":"PrintrConfig","docs":["Configuration struct holding the public keys for various Printr program wallets.","","# Fields","- `printr_fee_authority`: Receives Printr's portion of the protocol fees.","- `questflow_ai_fee_authority`: Receives QuestFlow AI's portion of the protocol fees.","- `staking_authority`: Receives all fees that are in telecoin.","","# Authority","","This account is an authority over several token account vaults that hold protocol and dev fees."],"type":{"kind":"struct","fields":[{"name":"printr_fee_authority","docs":["This account receives Printr's portion of the protocol fees."],"type":"pubkey"},{"name":"questflow_ai_fee_authority","docs":["This account receives QuestFlow AI's portion of the protocol fees."],"type":"pubkey"},{"name":"_padding_1","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",32]}},{"name":"staking_authority","docs":["Receives all fees that are in telecoin."],"type":"pubkey"},{"name":"_padding_2","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_3","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_4","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_5","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",2]}},{"name":"_padding_6","docs":["# Migration","","See [Self::migrate_if_necessary]."],"type":{"array":["u8",1]}},{"name":"last_update","docs":["# Migration","","This field was originally padding.","It was therefore set to 0.","We repurposed it to [PrintrProtocolVersion] to be able to track migrations of this struct."],"type":{"defined":{"name":"PrintrProtocolVersion"}}}]}},{"name":"PrintrProtocolVersion","docs":["Stores the protocol version that the telecoin was created with."],"type":{"kind":"struct","fields":["u8"]}},{"name":"ProtocolFeeSink","docs":["Lookup table for protocol fee sinks.","","Main raison d'etre for this is to avoid storage cost and migrations on Solana.","We agreed with the business side of Printr that the list will be rather static and won't require","additions in near future.","So we buy ourselves time by skipping the need for migrations this way."],"repr":{"kind":"rust"},"type":{"kind":"enum","variants":[{"name":"None"},{"name":"QuestflowAi"}]}},{"name":"RefreshStaking2Event","type":{"kind":"struct","fields":[{"name":"telecoin_id","docs":["Telecoin ID, derives the mint."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"quote_rewards","docs":["Quote token rewards distributed to stakers."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"protocol_quote_fees","docs":["Quote token fees sent to protocol + revshare wallets."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"telecoin_rewards","docs":["Telecoin rewards added."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"quote_token_accumulator","docs":["New quote token accumulator value."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["New telecoin accumulator value."],"type":{"defined":{"name":"Accumulator"}}},{"name":"protocol_telecoin_fees","docs":["Telecoin fees sent to the protocol staking wallet."],"type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"RevShareSlot","type":{"kind":"struct","fields":[{"name":"sink","type":{"defined":{"name":"ProtocolFeeSink"}}},{"name":"share_of_protocol_fee_pct","docs":["This partner's share of the protocol fee as a percentage (0-100).","","The fee hierarchy is:","1. A trade incurs a **trading fee** (e.g. 1% of trade volume).","2. The protocol takes a share of that trading fee","([DevConfigFees::dbc_protocol_share_of_trading_fee_pct] or","[DevConfigFees::amm_protocol_share_of_trading_fee_pct], e.g. 75%).","3. This field is a percentage of *that* protocol share (e.g. 10%).","","Concrete example: 1% trading fee, 75% protocol share, 10% revshare →","effective revshare = 1% × 75% × 10% = 0.075% of trade volume."],"type":"u8"}]}},{"name":"SetDevConfigDevEvent","docs":["Emitted whenever an admin updates the fee sink on a dev config."],"type":{"kind":"struct","fields":[{"name":"telecoin_id","docs":["The Printr Telecoin ID whose dev config was updated."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"telecoin_mint","docs":["The telecoin mint whose dev config was updated."],"type":"pubkey"},{"name":"previous_fee_sink","docs":["The fee sink before the update."],"type":{"defined":{"name":"FeeSink"}}},{"name":"new_fee_sink","docs":["The fee sink after the update."],"type":{"defined":{"name":"FeeSink"}}}]}},{"name":"SetDevConfigFeesParams","type":{"kind":"struct","fields":[{"name":"dbc_protocol_share_of_trading_fee_pct","type":"u8"},{"name":"amm_protocol_share_of_trading_fee_pct","type":"u8"}]}},{"name":"SetPeerConfParams","docs":["Parameters for the [SetPeerConf] instruction."],"type":{"kind":"struct","fields":[{"name":"enable_lz","type":{"option":"bool"}},{"name":"set_as_default","type":{"option":"bool"}}]}},{"name":"SetTelecoinTeleportConfParams","docs":["Parameters for the [SetTelecoinTeleportConf] instruction."],"type":{"kind":"struct","fields":[{"name":"set_lz_peer_config","type":{"option":{"defined":{"name":"TeleportPathConfig"}}}}]}},{"name":"SqrtBitshiftedPrice","docs":["This is a sqrt and bitshifted price ready to be compared to Meteora prices."],"type":{"kind":"struct","fields":[{"name":"price","docs":["The inner raw value."],"type":"u128"}]}},{"name":"StakePosition","docs":["Individual user's stake position in a staking pool.","","PDA seeds:","```ignore","[","SEED_PREFIX_FOR_STAKE_POSITION,","telecoin_mint.as_ref(),","owner.as_ref(),","position_nonce.to_le_bytes().as_ref(),","]","```","","The position_nonce allows users to have multiple stake positions per telecoin."],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump seed for PDA derivation."],"type":"u8"},{"name":"position_nonce","docs":["Position nonce - allows multiple positions per user per telecoin.","","Stored as u32 and used in PDA derivation as little-endian bytes (to_le_bytes()).","There can be only one position per (telecoin, owner, position_nonce) tuple at the time.","However, position nonces can be reused after a position is closed (unlocked and fully","claimed)."],"type":"u32"},{"name":"staked","docs":["Amount of telecoin staked."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"lock_period","docs":["Lock period selected by user."],"type":{"defined":{"name":"LockPeriod"}}},{"name":"staked_at_clock_timestamp","docs":["Timestamp from Clock sysvar when the stake was created."],"type":"i64"},{"name":"quote_token_last_accumulator","docs":["Quote token accumulator value when user last claimed or staked."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_last_accumulator","docs":["Telecoin accumulator value when user last claimed or staked."],"type":{"defined":{"name":"Accumulator"}}}]}},{"name":"StakingPool","docs":["One pool per telecoin. Users stake the telecoin and earn rewards in multiple tokens:","","- Quote token trading fees","- Telecoin trading fees","","PDA seeds: `[b\"staking_pool\", telecoin_mint.as_ref()]`","","Note: Mint addresses can be derived from telecoin_id, so they're not stored here."],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump seed for PDA derivation."],"type":"u8"},{"name":"refreshed_at_clock_slot","docs":["Last slot when the pool was refreshed."],"type":"u64"},{"name":"telecoin_id","docs":["Telecoin ID this pool is associated with."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"total_weighted_stake","docs":["Total weighted stake across all users.","","weighted_stake = sum(user_staked_amount × lock_multiplier_bps / 10000)"],"type":"u128"},{"name":"quote_token_accumulator","docs":["Accumulator for quote token rewards."],"type":{"defined":{"name":"Accumulator"}}},{"name":"telecoin_accumulator","docs":["Accumulator for telecoin rewards."],"type":{"defined":{"name":"Accumulator"}}},{"name":"last_telecoin_vault_balance","docs":["Last observed telecoin vault balance for calculating new rewards."],"type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"SwapEstimate","type":{"kind":"struct","fields":[{"name":"actual_input","docs":["What goes into a pool (either bonding curve or AMM).","Does not include the fees."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"input_fee","docs":["What's spent on fees. (Input)"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"output_fee","docs":["What's spent on fees. (Output)"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"output","docs":["What comes out of the pool.","Does not include the fees."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"next_price","docs":["The sqrt price after the swap."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}},{"name":"current_price","docs":["The sqrt price after the swap."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]}},{"name":"SwapIntent","docs":["Represents user's intent to swap tokens in Printr ecosystem.","We translate this intent to specific Meteora CPIs."],"type":{"kind":"enum","variants":[{"name":"SpendQuote","fields":[{"name":"sell","docs":["Quote amount"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"max_price","docs":["In Printr we apply slippage to price."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]},{"name":"SellTelecoin","fields":[{"name":"sell","docs":["telecoin amount"],"type":{"defined":{"name":"TokenAmount"}}},{"name":"min_price","docs":["In Printr we apply slippage to price."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]},{"name":"SpendAllQuote","fields":[{"name":"special_value","docs":["Must be equal to [printr_sdk::consts::SPEND_ALL_SPECIAL_VALUE]."],"type":"u64"},{"name":"max_price","docs":["In Printr we apply slippage to price."],"type":{"defined":{"name":"SqrtBitshiftedPrice"}}}]}]}},{"name":"TelecoinId","docs":["Printr's Token ID is a hash of the ABI-encoded telecoin params."],"type":{"kind":"struct","fields":[{"array":["u8",32]}]}},{"name":"TelecoinParams","docs":["The core primitive of the Printr protocol.","","These telecoin params uniquely identify a token launched with Printr."],"type":{"kind":"struct","fields":[{"name":"salt","type":{"array":["u8",32]}},{"name":"dev_addresses","docs":["# Note","","At this point, `dev_addresses` has become a misnomer.","It contains more information than that."],"type":"bytes"},{"name":"name","type":{"array":["u8",32]}},{"name":"symbol","type":{"array":["u8",32]}},{"name":"packed_params","type":{"array":["u8",32]}},{"name":"chains","type":{"vec":{"array":["u8",32]}}},{"name":"quote_pairs","type":{"vec":{"array":["u8",32]}}},{"name":"quote_prices","type":"bytes"}]}},{"name":"TelecoinParamsCompact","docs":["On Solana we're dealing with txs size limits.","Being able to compress the telecoin params into a smaller structure helps us submit smaller txs.","","You can always convert this back to [TelecoinParams]."],"type":{"kind":"struct","fields":[{"name":"version","docs":["It's nice to version this in case we need to further compact it or do other changes."],"type":"u8"},{"name":"data","docs":["The compact representation of the telecoin params."],"type":"bytes"}]}},{"name":"TelecoinTeleportConfig","docs":["Overrides default configuration for a specific telecoin with respect to omnichain transfers."],"type":{"kind":"struct","fields":[{"name":"lz_peer","docs":["If set then only the specified peer can be used to teleport this telecoin."],"type":{"defined":{"name":"TeleportPathConfig"}}}]}},{"name":"TeleportPathConfig","docs":["Defines how teleports should be handled."],"type":{"kind":"enum","variants":[{"name":"Default"},{"name":"Disabled"},{"name":"Peers","fields":[{"name":"teleport_any_direction1","docs":["This peer can be used for teleports in any direction: mint and burn."],"type":"pubkey"},{"name":"teleport_any_direction2","docs":["This peer can be used for teleports in any direction: mint and burn."],"type":"pubkey"},{"name":"teleport_in_only","docs":["This peer can be used for teleports in only: mint"],"type":"pubkey"}]}]}},{"name":"TeleportWithLzEvent","docs":["Event emitted by the [TeleportWithLz] instruction."],"type":{"kind":"struct","fields":[{"name":"guid","type":{"array":["u8",32]}},{"name":"nonce","type":"u64"},{"name":"lz_destination_endpoint_id","type":"u32"},{"name":"telecoin_id","type":{"defined":{"name":"TelecoinId"}}},{"name":"destination_recipient_address","type":{"array":["u8",32]}},{"name":"destination_peer_address","type":{"array":["u8",32]}},{"name":"source_user_address","type":"pubkey"},{"name":"teleporting","type":{"defined":{"name":"TokenAmount"}}}]}},{"name":"TeleportWithLzParams","docs":["Parameters for the [TeleportWithLz] instruction.","Used to construct [OutgoingMessage]."],"type":{"kind":"struct","fields":[{"name":"to_send","docs":["Burns this much telecoin tokens and mints them again on the other chain."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"destination_recipient_address","docs":["Who to mint the telecoin tokens to."],"type":{"array":["u8",32]}},{"name":"telecoin_id","docs":["Printr Telecoin ID derives the telecoin mint."],"type":{"defined":{"name":"TelecoinId"}}},{"name":"lamports_gas","docs":["How much to pay LZ for the transaction."],"type":{"defined":{"name":"TokenAmount"}}},{"name":"lz_options","docs":[""],"type":"bytes"},{"name":"lz_destination_endpoint_id","docs":["The chain ID of the destination chain.","",""],"type":"u32"}]}},{"name":"TokenAmount","docs":["A token amount in its smallest denomination as seen in a token account."],"type":{"kind":"struct","fields":[{"name":"amount","docs":["Wraps around this value to give it a meaning."],"type":"u64"}]}},{"name":"VirtualPool","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"volatility_tracker","docs":["volatility tracker"],"type":{"defined":{"name":"VolatilityTracker"}}},{"name":"config","docs":["config key"],"type":"pubkey"},{"name":"creator","docs":["creator"],"type":"pubkey"},{"name":"base_mint","docs":["base mint"],"type":"pubkey"},{"name":"base_vault","docs":["base vault"],"type":"pubkey"},{"name":"quote_vault","docs":["quote vault"],"type":"pubkey"},{"name":"base_reserve","docs":["base reserve"],"type":"u64"},{"name":"quote_reserve","docs":["quote reserve"],"type":"u64"},{"name":"protocol_base_fee","docs":["protocol base fee"],"type":"u64"},{"name":"protocol_quote_fee","docs":["protocol quote fee"],"type":"u64"},{"name":"partner_base_fee","docs":["partner base fee"],"type":"u64"},{"name":"partner_quote_fee","docs":["trading quote fee"],"type":"u64"},{"name":"sqrt_price","docs":["current price"],"type":"u128"},{"name":"activation_point","docs":["Activation point"],"type":"u64"},{"name":"pool_type","docs":["pool type, spl token or token2022"],"type":"u8"},{"name":"is_migrated","docs":["is migrated"],"type":"u8"},{"name":"is_partner_withdraw_surplus","docs":["is partner withdraw surplus"],"type":"u8"},{"name":"is_protocol_withdraw_surplus","docs":["is protocol withdraw surplus"],"type":"u8"},{"name":"migration_progress","docs":["migration progress"],"type":"u8"},{"name":"is_withdraw_leftover","docs":["is withdraw leftover"],"type":"u8"},{"name":"is_creator_withdraw_surplus","docs":["is creator withdraw surplus"],"type":"u8"},{"name":"migration_fee_withdraw_status","docs":["migration fee withdraw status","bit 1 (0b010) creator","bit 2 (0b100) partner"],"type":"u8"},{"name":"metrics","docs":["pool metrics"],"type":{"defined":{"name":"PoolMetrics"}}},{"name":"finish_curve_timestamp","docs":["The time curve is finished"],"type":"u64"},{"name":"creator_base_fee","docs":["creator base fee"],"type":"u64"},{"name":"creator_quote_fee","docs":["creator quote fee"],"type":"u64"},{"name":"legacy_creation_fee_bits","docs":["legacy creation fee bits, we dont use this now"],"type":"u8"},{"name":"creation_fee_bits","docs":["pool creation fee claim status"],"type":"u8"},{"name":"has_swap","docs":["Cached flag"],"type":"u8"},{"name":"_padding_0","docs":["Padding for further use"],"type":{"array":["u8",5]}},{"name":"protocol_liquidity_migration_fee_bps","type":"u16"},{"name":"_padding_1","type":{"array":["u8",6]}},{"name":"protocol_migration_base_fee_amount","type":"u64"},{"name":"protocol_migration_quote_fee_amount","type":"u64"},{"name":"_padding_2","docs":["Padding for further use"],"type":{"array":["u64",3]}}]}},{"name":"VolatilityTracker","serialization":"bytemuck","repr":{"kind":"c"},"type":{"kind":"struct","fields":[{"name":"last_update_timestamp","type":"u64"},{"name":"padding","type":{"array":["u8",8]}},{"name":"sqrt_price_reference","type":"u128"},{"name":"volatility_accumulator","type":"u128"},{"name":"volatility_reference","type":"u128"}]}}]} \ No newline at end of file diff --git a/idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json b/idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json new file mode 100644 index 0000000..d2804b5 --- /dev/null +++ b/idls/pump_fees.pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ.json @@ -0,0 +1 @@ +{"address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ","metadata":{"name":"pump_fees","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"claim_social_fee_pda","discriminator":[225,21,251,133,161,30,199,226],"accounts":[{"name":"recipient","writable":true},{"name":"social_fee_pda","writable":true},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"social_claim_authority","signer":true,"relations":["fee_program_global"]},{"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":"user_id","type":"string"},{"name":"platform","type":"u8"}],"returns":{"option":{"defined":{"name":"SocialFeePdaClaimed"}}}},{"name":"claim_social_fee_pda_v2","discriminator":[17,77,240,134,58,188,53,149],"accounts":[{"name":"recipient","writable":true},{"name":"social_fee_pda","writable":true},{"name":"quote_mint","docs":["Quote mint for claim"],"writable":true},{"name":"associated_social_fee_pda","writable":true,"pda":{"seeds":[{"kind":"account","path":"social_fee_pda"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"associated_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"social_claim_authority","signer":true,"relations":["fee_program_global"]},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"user_id","type":"string"},{"name":"platform","type":"u8"}],"returns":{"option":{"defined":{"name":"SocialFeePdaClaimed"}}}},{"name":"crank_donation_fee_pda","discriminator":[220,10,189,167,169,17,25,69],"accounts":[{"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","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"payer","docs":["Pays rent when [`temp_wsol_token_account`] is created (`init_if_needed`); receives rent when it is closed after the relay CPI."],"writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"donation_fee_pda","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,111,110,97,116,105,111,110,45,102,101,101,45,112,100,97]},{"kind":"account","path":"donation_fee_pda.base_mint","account":"DonationFeePda"},{"kind":"account","path":"donation_fee_pda.config_id","account":"DonationFeePda"}]}},{"name":"quote_mint","docs":["Quote mint from donation fee pda."],"writable":true},{"name":"donation_fee_pda_ata","docs":["WSOL ATA owned by `donation_fee_pda`."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"donation_fee_pda"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"donation_relay_program","address":"RLAYHr9TRFcKB2ubYQhspcnXiaGpaVzNQvHytt47RZu"},{"name":"donation_relay_event_authority"},{"name":"mint_whitelist"},{"name":"epoch_tracker","writable":true},{"name":"debouncer","writable":true},{"name":"debouncer_ata","writable":true}],"args":[]},{"name":"create_donation_fee_pda","discriminator":[244,139,16,88,14,255,122,26],"accounts":[{"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","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"payer","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"donation_fee_pda","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,111,110,97,116,105,111,110,45,102,101,101,45,112,100,97]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"config_id"}]}},{"name":"config_id","docs":["stored on the PDA, so distinct `config_id`s for the same `base_mint` derive distinct addresses."]},{"name":"base_mint"},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pool"},{"name":"sharing_config","docs":["(derived from `[SHARING_CONFIG_SEED, base_mint]`)"],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}]}}],"args":[]},{"name":"create_fee_sharing_config","docs":["Create Fee Sharing Config"],"discriminator":[195,78,86,76,111,52,251,213],"accounts":[{"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","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"payer","writable":true,"signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"mint"},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pool","writable":true,"optional":true},{"name":"pump_amm_program","optional":true,"address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"pump_amm_event_authority","optional":true,"pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}}],"args":[]},{"name":"create_social_fee_pda","discriminator":[144,224,59,211,78,248,202,220],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"social_fee_pda","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"fee_program_global","pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"user_id","type":"string"},{"name":"platform","type":"u8"}]},{"name":"extend_fee_config","docs":["Realloc the fee_config PDA to [`FeeConfig::CURRENT_SIZE`] (signer pays rent delta)."],"discriminator":[68,179,244,90,173,56,17,217],"accounts":[{"name":"fee_config","writable":true},{"name":"user","signer":true},{"name":"config_program_id"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"get_fees","docs":["Get Fees"],"discriminator":[231,37,126,85,207,91,63,52],"accounts":[{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"config_program_id"}],"args":[{"name":"is_pump_pool","type":"bool"},{"name":"market_cap_lamports","type":"u128"},{"name":"trade_size_lamports","type":"u64"},{"name":"is_new_quote_mint","type":{"defined":{"name":"OptionBool"}}}],"returns":{"defined":{"name":"Fees"}}},{"name":"initialize_buyback","discriminator":[250,129,236,160,227,36,103,134],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"buyback_vault","writable":true},{"name":"buyback_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mint"},{"name":"token_program"},{"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":"index","type":"u8"}]},{"name":"initialize_fee_config","docs":["Initialize FeeConfig admin"],"discriminator":[62,162,20,133,121,65,145,27],"accounts":[{"name":"admin","writable":true,"signer":true,"address":"8LWu7QM2dGR1G8nKDHthckea57bkCzXyBTAKPJUBDHo8"},{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"config_program_id"},{"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":"initialize_fee_program_global","discriminator":[35,215,130,84,233,56,124,167],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["pump_global"]},{"name":"pump_global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"social_claim_authority","type":"pubkey"},{"name":"disable_flags","type":"u8"},{"name":"claim_rate_limit","type":"u64"}]},{"name":"reset_fee_sharing_config","docs":["Reset Fee Sharing Config and distribute pending fees first"],"discriminator":[10,2,182,95,16,127,129,186],"accounts":[{"name":"new_admin"},{"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","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"associated_token_program"}}}],"args":[]},{"name":"reset_fee_sharing_config_v2","docs":["Reset Fee Sharing Config and distribute pending fees first"],"discriminator":[169,245,17,209,94,91,248,128],"accounts":[{"name":"new_admin"},{"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","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","writable":true,"signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"pump_creator_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"quote_mint"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}}],"args":[]},{"name":"revoke_fee_sharing_authority","docs":["Revoke Fee Sharing Authority"],"discriminator":[18,233,158,39,185,207,58,104],"accounts":[],"args":[]},{"name":"set_authority","discriminator":[133,250,37,21,110,163,26,121],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"new_authority","type":"pubkey"}]},{"name":"set_claim_rate_limit","discriminator":[185,211,159,174,212,49,88,4],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"claim_rate_limit","type":"u64"}]},{"name":"set_disable_flags","discriminator":[194,217,112,35,114,222,51,190],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"disable_flags","type":"u8"}]},{"name":"set_social_claim_authority","discriminator":[147,54,184,154,136,237,185,153],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"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":"social_claim_authority","type":"pubkey"}]},{"name":"sweep_buyback","discriminator":[138,33,204,38,207,161,159,226],"accounts":[{"name":"destination","writable":true},{"name":"authority","writable":true,"signer":true,"relations":["buyback_vault"]},{"name":"buyback_vault","writable":true},{"name":"buyback_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"destination_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"destination"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mint"},{"name":"token_program"},{"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":"index","type":"u8"}]},{"name":"transfer_fee_sharing_authority","docs":["Transfer Fee Sharing Authority"],"discriminator":[202,10,75,200,164,34,210,96],"accounts":[],"args":[]},{"name":"update_admin","docs":["Update admin (only callable by admin)"],"discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"new_admin"},{"name":"config_program_id"},{"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":"update_buyback_authority","discriminator":[66,98,113,202,121,37,219,107],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"buyback_vault","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":"index","type":"u8"},{"name":"new_authority","type":"pubkey"}]},{"name":"update_buyback_claim_rate_limit","discriminator":[186,95,135,190,255,199,137,170],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["fee_program_global"]},{"name":"fee_program_global","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,45,112,114,111,103,114,97,109,45,103,108,111,98,97,108]}]}},{"name":"buyback_vault","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":"index","type":"u8"},{"name":"claim_rate_limit","type":"i64"}]},{"name":"update_fee_config","docs":["Set/Replace fee parameters entirely (only callable by admin)"],"discriminator":[104,184,103,242,88,151,107,20],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}}]},{"name":"update_fee_shares","docs":["Update Fee Shares, make sure to distribute all the fees before calling this"],"discriminator":[189,13,136,99,187,164,237,35],"accounts":[{"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","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"coin_creator_vault_ata","writable":true}],"args":[{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]},{"name":"update_fee_shares_v2","docs":["Update Fee Shares, make sure to distribute all the fees before calling this"],"discriminator":[111,251,49,6,78,78,106,18],"accounts":[{"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","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"authority","writable":true,"signer":true},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"mint","relations":["sharing_config"]},{"name":"sharing_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}]}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"pump_creator_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_program","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"pump_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_amm_program","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"quote_mint"},{"name":"token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"sharing_config"}],"program":{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}}],"args":[{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]},{"name":"update_stable_fee_config","docs":["Set/Replace fee parameters entirely (only callable by admin)"],"discriminator":[107,169,100,179,134,155,146,221],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}}]},{"name":"upsert_fee_tiers","docs":["Update or expand fee tiers (only callable by admin)"],"discriminator":[227,23,150,12,77,86,94,4],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]},{"name":"upsert_stable_fee_tiers","docs":["Update or expand fee tiers (only callable by admin)"],"discriminator":[181,160,162,252,74,76,224,221],"accounts":[{"name":"fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"account","path":"config_program_id"}]}},{"name":"admin","signer":true,"relations":["fee_config"]},{"name":"config_program_id"},{"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":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]}],"accounts":[{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"BuybackVault","discriminator":[153,166,71,144,179,189,137,251]},{"name":"DonationFeePda","discriminator":[246,197,96,9,193,30,93,115]},{"name":"FeeConfig","discriminator":[143,52,146,187,219,123,76,155]},{"name":"FeeProgramGlobal","discriminator":[162,165,245,49,29,37,55,242]},{"name":"Global","discriminator":[167,232,232,177,200,108,114,127]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"SharingConfig","discriminator":[216,74,9,0,56,140,93,75]},{"name":"SocialFeePda","discriminator":[139,96,53,17,42,169,206,150]}],"events":[{"name":"CreateFeeSharingConfigEvent","discriminator":[133,105,170,200,184,116,251,88]},{"name":"DonationFeePdaCranked","discriminator":[30,208,107,93,177,0,223,78]},{"name":"DonationFeePdaCreated","discriminator":[94,20,137,239,35,77,225,235]},{"name":"ExtendFeeConfigEvent","discriminator":[226,203,224,35,153,10,88,51]},{"name":"InitializeFeeConfigEvent","discriminator":[89,138,244,230,10,56,226,126]},{"name":"InitializeFeeProgramGlobalEvent","discriminator":[40,233,156,78,95,0,8,199]},{"name":"ResetFeeSharingConfigEvent","discriminator":[203,204,151,226,120,55,214,243]},{"name":"SetAuthorityEvent","discriminator":[18,175,132,66,208,201,87,242]},{"name":"SetClaimRateLimitEvent","discriminator":[13,143,143,235,181,19,51,40]},{"name":"SetDisableFlagsEvent","discriminator":[5,8,179,65,49,55,145,126]},{"name":"SetSocialClaimAuthorityEvent","discriminator":[60,118,127,132,239,52,254,14]},{"name":"SocialFeePdaClaimed","discriminator":[50,18,193,65,237,210,234,236]},{"name":"SocialFeePdaCreated","discriminator":[183,183,218,147,24,124,137,169]},{"name":"SweepBuybackEvent","discriminator":[43,56,42,214,153,57,166,137]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateFeeConfigEvent","discriminator":[90,23,65,35,62,244,188,208]},{"name":"UpdateFeeSharesEvent","discriminator":[21,186,196,184,91,228,225,203]},{"name":"UpdateStableFeeConfigEvent","discriminator":[94,5,43,237,103,147,232,245]},{"name":"UpsertFeeTiersEvent","discriminator":[171,89,169,187,122,186,33,204]},{"name":"UpsertStableFeeTiersEvent","discriminator":[232,237,237,52,98,146,73,243]}],"errors":[{"code":6000,"name":"UnauthorizedProgram","msg":"Only Pump and PumpSwap programs can call this instruction"},{"code":6001,"name":"InvalidAdmin","msg":"Invalid admin"},{"code":6002,"name":"NoFeeTiers","msg":"No fee tiers provided"},{"code":6003,"name":"TooManyFeeTiers","msg":"format"},{"code":6004,"name":"OffsetNotContinuous","msg":"The offset should be <= fee_config.fee_tiers.len()"},{"code":6005,"name":"FeeTiersNotSorted","msg":"Fee tiers must be sorted by market cap threshold (ascending)"},{"code":6006,"name":"InvalidFeeTotal","msg":"Fee total must not exceed 10_000bps"},{"code":6007,"name":"InvalidSharingConfig","msg":"Invalid Sharing Config"},{"code":6008,"name":"InvalidPool","msg":"Invalid Pool"},{"code":6009,"name":"SharingConfigAdminRevoked","msg":"Sharing config authority has been revoked - sharing config can only be updated once"},{"code":6010,"name":"NoShareholders","msg":"No shareholders provided"},{"code":6011,"name":"TooManyShareholders","msg":"format"},{"code":6012,"name":"DuplicateShareholder","msg":"Duplicate shareholder address"},{"code":6013,"name":"NotEnoughRemainingAccounts","msg":"Not enough remaining accounts"},{"code":6014,"name":"InvalidShareTotal","msg":"Invalid share total - must equal 10_000 basis points"},{"code":6015,"name":"ShareCalculationOverflow","msg":"Share calculation overflow"},{"code":6016,"name":"NotAuthorized","msg":"The given account is not authorized to execute this instruction."},{"code":6017,"name":"ZeroShareNotAllowed","msg":"Shareholder cannot have zero share"},{"code":6018,"name":"SharingConfigNotActive","msg":"Fee sharing config is not active"},{"code":6019,"name":"AmmAccountsRequiredForGraduatedCoin","msg":"AMM accounts are required for graduated coins"},{"code":6020,"name":"ShareholderAccountMismatch","msg":"Remaining account key doesn't match shareholder address"},{"code":6021,"name":"FeatureDeactivated","msg":"Feature is currently deactivated"},{"code":6022,"name":"UserIdTooLong","msg":"User ID exceeds maximum length"},{"code":6023,"name":"DeprecatedInstruction","msg":"Instruction is deprecated"},{"code":6024,"name":"FeeSharesAlreadyUpdated","msg":"Reward split can only be updated once"},{"code":6025,"name":"MathOverflow","msg":"Math overflow"},{"code":6026,"name":"InvalidBuybackIndex","msg":"Invalid buybackindex"},{"code":6027,"name":"ClaimRateLimitExceeded","msg":"Claim rate limit exceeded"},{"code":6028,"name":"InvalidFeeConfigAccount","msg":"Account is not a valid FeeConfig for this instruction"},{"code":6029,"name":"AccountTypeNotSupported","msg":"Account type not supported"},{"code":6030,"name":"InvalidMint","msg":"Mint does not match quote mint"}],"types":[{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_quote_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_quote_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"complete","type":"bool"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"}]}},{"name":"BuybackVault","type":{"kind":"struct","fields":[{"name":"authority","type":"pubkey"},{"name":"total_claimed","type":"u64"},{"name":"total_claimed_token1","type":"u64"},{"name":"total_claimed_token2","type":"u64"},{"name":"last_claimed","type":"i64"},{"name":"claim_rate_limit","type":"i64"},{"name":"_reserved","type":{"array":["u8",128]}}]}},{"name":"ConfigStatus","type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Active"}]}},{"name":"CreateFeeSharingConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"pool","type":{"option":"pubkey"}},{"name":"sharing_config","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"initial_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}}]}},{"name":"DonationFeePda","docs":["Escrow PDA for donation relay: one per (mint, donation campaign `config_id`)."],"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"config_id","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"total_donated","type":"u64"},{"name":"last_crank_ts","type":"i64"},{"name":"_reserved","type":{"array":["u8",64]}}]}},{"name":"DonationFeePdaCranked","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"signer","type":"pubkey"},{"name":"donation_fee_pda","type":"pubkey"},{"name":"config_id","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"amount","type":"u64"}]}},{"name":"DonationFeePdaCreated","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"created_by","type":"pubkey"},{"name":"donation_fee_pda","type":"pubkey"},{"name":"config_id","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"ExtendFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"fee_config","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"current_size","type":"u64"},{"name":"new_size","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"FeeConfig","type":{"kind":"struct","fields":[{"name":"bump","docs":["The bump for the PDA"],"type":"u8"},{"name":"admin","docs":["The admin account that can update the fee config"],"type":"pubkey"},{"name":"flat_fees","docs":["The flat fees for non-pump pools"],"type":{"defined":{"name":"Fees"}}},{"name":"fee_tiers","docs":["The fee tiers"],"type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"stable_fee_tiers","docs":["The fee tiers"],"type":{"vec":{"defined":{"name":"FeeTier"}}}}]}},{"name":"FeeProgramGlobal","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"authority","type":"pubkey"},{"name":"disable_flags","type":"u8"},{"name":"social_claim_authority","type":"pubkey"},{"name":"claim_rate_limit","type":"u64"},{"name":"_reserved","type":{"array":["u8",256]}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"market_cap_lamports_threshold","type":"u128"},{"name":"fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"lp_fee_bps","type":"u64"},{"name":"protocol_fee_bps","type":"u64"},{"name":"creator_fee_bps","type":"u64"}]}},{"name":"Global","type":{"kind":"struct","fields":[{"name":"initialized","type":"bool"},{"name":"authority","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"fee_recipients","type":{"array":["pubkey",7]}},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"},{"name":"create_v2_enabled","type":"bool"},{"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]}}]}},{"name":"InitializeFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"}]}},{"name":"InitializeFeeProgramGlobalEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"authority","type":"pubkey"},{"name":"social_claim_authority","type":"pubkey"},{"name":"disable_flags","type":"u8"},{"name":"claim_rate_limit","type":"u64"}]}},{"name":"OptionBool","type":{"kind":"struct","fields":["bool"]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"pool_bump","type":"u8"},{"name":"index","type":"u16"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"pool_base_token_account","type":"pubkey"},{"name":"pool_quote_token_account","type":"pubkey"},{"name":"lp_supply","type":"u64"},{"name":"coin_creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"}]}},{"name":"ResetFeeSharingConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"old_admin","type":"pubkey"},{"name":"old_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"new_admin","type":"pubkey"},{"name":"new_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"old_version","type":"u8"},{"name":"new_version","type":"u8"}]}},{"name":"SetAuthorityEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"old_authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"}]}},{"name":"SetClaimRateLimitEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"claim_rate_limit","type":"u64"}]}},{"name":"SetDisableFlagsEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"disable_flags","type":"u8"}]}},{"name":"SetSocialClaimAuthorityEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"social_claim_authority","type":"pubkey"}]}},{"name":"Shareholder","type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"share_bps","type":"u16"}]}},{"name":"SharingConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}},{"name":"mint","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"admin_revoked","type":"bool"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]}},{"name":"SocialFeePda","docs":["Platform identifier: 0=pump, 1=twitter, etc."],"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"user_id","docs":["Max 20 characters to fit u64::MAX (18,446,744,073,709,551,615) as a string.","Actual storage: 4 bytes (length prefix) + 20 bytes (content) = 24 bytes."],"type":"string"},{"name":"platform","type":"u8"},{"name":"total_claimed","type":"u64"},{"name":"last_claimed","type":"u64"},{"name":"_reserved","type":{"array":["u8",128]}}]}},{"name":"SocialFeePdaClaimed","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"user_id","type":"string"},{"name":"platform","type":"u8"},{"name":"social_fee_pda","type":"pubkey"},{"name":"recipient","type":"pubkey"},{"name":"social_claim_authority","type":"pubkey"},{"name":"amount_claimed","type":"u64"},{"name":"claimable_before","type":"u64"},{"name":"lifetime_claimed","type":"u64"},{"name":"recipient_balance_before","type":"u64"},{"name":"recipient_balance_after","type":"u64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"SocialFeePdaCreated","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"user_id","type":"string"},{"name":"platform","type":"u8"},{"name":"social_fee_pda","type":"pubkey"},{"name":"created_by","type":"pubkey"}]}},{"name":"SweepBuybackEvent","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"sol_amount","type":"u64"},{"name":"token_amount","type":"u64"},{"name":"destination","type":"pubkey"},{"name":"buyback_vault","type":"pubkey"},{"name":"mint","type":"pubkey"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"old_admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"UpdateFeeSharesEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"new_shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"version","type":"u8"}]}},{"name":"UpdateStableFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"UpsertFeeTiersEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]}},{"name":"UpsertStableFeeTiersEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"fee_config","type":"pubkey"},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"offset","type":"u8"}]}}],"constants":[{"name":"AMM_CREATOR_VAULT_AUTHORITY_SEED","type":{"array":["u8",13]},"value":"[99, 114, 101, 97, 116, 111, 114, 95, 118, 97, 117, 108, 116]"},{"name":"BUYBACK_VAULT_SEED","type":{"array":["u8",13]},"value":"[98, 117, 121, 98, 97, 99, 107, 45, 118, 97, 117, 108, 116]"},{"name":"DEBOUNCER_V1","type":"bytes","value":"[100, 101, 98, 111, 117, 110, 99, 101, 114, 95, 118, 49]"},{"name":"DONATION_FEE_PDA_SEED","type":{"array":["u8",16]},"value":"[100, 111, 110, 97, 116, 105, 111, 110, 45, 102, 101, 101, 45, 112, 100, 97]"},{"name":"EPOCH_TRACKER_V1","type":"bytes","value":"[101, 112, 111, 99, 104, 95, 116, 114, 97, 99, 107, 101, 114, 95, 118, 49]"},{"name":"FEE_CONFIG_SEED","type":"bytes","value":"[102, 101, 101, 95, 99, 111, 110, 102, 105, 103]"},{"name":"FEE_PROGRAM_GLOBAL_SEED","type":{"array":["u8",18]},"value":"[102, 101, 101, 45, 112, 114, 111, 103, 114, 97, 109, 45, 103, 108, 111, 98, 97, 108]"},{"name":"IX_DONATE_PUBKEY_CONFIG_ID_WITH_PAYER_V1","type":{"array":["u8",8]},"value":"[120, 217, 57, 241, 135, 104, 139, 184]"},{"name":"MAX_BUYBACK_INDEX","type":"u8","value":"8"},{"name":"MINT_WHITELIST_V1","type":"bytes","value":"[109, 105, 110, 116, 95, 119, 104, 105, 116, 101, 108, 105, 115, 116, 95, 118, 49]"},{"name":"PUMP_CREATOR_VAULT_SEED","type":{"array":["u8",13]},"value":"[99, 114, 101, 97, 116, 111, 114, 45, 118, 97, 117, 108, 116]"},{"name":"PUMP_GLOBAL_SEED","docs":["Bonding Curve Program Global Seed"],"type":{"array":["u8",6]},"value":"[103, 108, 111, 98, 97, 108]"},{"name":"SHARING_CONFIG_SEED","type":{"array":["u8",14]},"value":"[115, 104, 97, 114, 105, 110, 103, 45, 99, 111, 110, 102, 105, 103]"},{"name":"SOCIAL_FEE_PDA_SEED","type":{"array":["u8",14]},"value":"[115, 111, 99, 105, 97, 108, 45, 102, 101, 101, 45, 112, 100, 97]"}]} \ No newline at end of file diff --git a/idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json b/idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json new file mode 100644 index 0000000..670461a --- /dev/null +++ b/idls/pump_fun.6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P.json @@ -0,0 +1 @@ +{"address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P","metadata":{"name":"pump","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_quote_mint","discriminator":[111,121,21,56,40,24,94,209],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"quote_mint","type":"pubkey"}]},{"name":"admin_set_creator","docs":["Allows Global::admin_set_creator_authority to override the bonding curve creator"],"discriminator":[69,25,171,142,57,239,13,4],"accounts":[{"name":"admin_set_creator_authority","signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"creator","type":"pubkey"}]},{"name":"admin_set_idl_authority","discriminator":[8,217,96,231,144,104,192,5],"accounts":[{"name":"authority","signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"idl_account","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program_signer","pda":{"seeds":[]}},{"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":"idl_authority","type":"pubkey"}]},{"name":"admin_update_token_incentives","discriminator":[209,11,115,87,213,23,124,204],"accounts":[{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"global_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"mint"},{"name":"global_incentive_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"global_volume_accumulator"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program"},{"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":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"seconds_in_a_day","type":"i64"},{"name":"day_number","type":"u64"},{"name":"pump_token_supply_per_day","type":"u64"}]},{"name":"buy","docs":["Buys tokens from a bonding curve."],"discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"fee_recipient","writable":true},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_user","writable":true},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program"},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"amount","type":"u64"},{"name":"max_sol_cost","type":"u64"},{"name":"track_volume","type":{"defined":{"name":"OptionBool"}}}]},{"name":"buy_exact_quote_in_v2","discriminator":[194,171,28,70,104,77,91,47],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"base_mint"},{"name":"quote_mint"},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_recipient","writable":true},{"name":"associated_quote_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"buyback_fee_recipient","writable":true},{"name":"associated_quote_buyback_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user","writable":true,"signer":true},{"name":"associated_base_user","writable":true},{"name":"associated_quote_user","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"associated_creator_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"sharing_config","docs":["seeds; the account is intentionally not deserialized here because it may be uninitialized","for mints that have not created a fee sharing config. Handlers must check","`data_is_empty()` / owner before reading."],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"associated_user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"account","path":"user_volume_accumulator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[{"name":"spendable_quote_in","type":"u64"},{"name":"min_tokens_out","type":"u64"}]},{"name":"buy_exact_sol_in","docs":["Given a budget of spendable SOL, buy at least min_tokens_out tokens.","Fees are deducted from spendable_sol_in.","","# Quote formulas","Where:","- total_fee_bps = protocol_fee_bps + creator_fee_bps (creator_fee_bps is 0 if no creator)","- floor(a/b) = a / b (integer division)","- ceil(a/b) = (a + b - 1) / b","","SOL → tokens quote","To calculate tokens_out for a given spendable_sol_in:","1. net_sol = floor(spendable_sol_in * 10_000 / (10_000 + total_fee_bps))","2. fees = ceil(net_sol * protocol_fee_bps / 10_000) + ceil(net_sol * creator_fee_bps / 10_000) (creator_fee_bps is 0 if no creator)","3. if net_sol + fees > spendable_sol_in: net_sol = net_sol - (net_sol + fees - spendable_sol_in)","4. tokens_out = floor((net_sol - 1) * virtual_token_reserves / (virtual_sol_reserves + net_sol - 1))","","Reverse quote (tokens → SOL)","To calculate spendable_sol_in for a desired number of tokens:","1. net_sol = ceil(tokens * virtual_sol_reserves / (virtual_token_reserves - tokens)) + 1","2. spendable_sol_in = ceil(net_sol * (10_000 + total_fee_bps) / 10_000)","","Rent","Separately make sure the instruction's payer has enough SOL to cover rent for:","- creator_vault: rent.minimum_balance(0)","- user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)"],"discriminator":[56,252,116,8,158,223,205,95],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"fee_recipient","writable":true},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_user","writable":true},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program"},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"spendable_sol_in","type":"u64"},{"name":"min_tokens_out","type":"u64"},{"name":"track_volume","type":{"defined":{"name":"OptionBool"}}}]},{"name":"buy_v2","discriminator":[184,23,238,97,103,197,211,61],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"base_mint"},{"name":"quote_mint"},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_recipient","writable":true},{"name":"associated_quote_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"buyback_fee_recipient","writable":true},{"name":"associated_quote_buyback_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user","writable":true,"signer":true},{"name":"associated_base_user","writable":true},{"name":"associated_quote_user","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"associated_creator_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"sharing_config","docs":["seeds; the account is intentionally not deserialized here because it may be uninitialized","for mints that have not created a fee sharing config. Handlers must check","`data_is_empty()` / owner before reading."],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"associated_user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"account","path":"user_volume_accumulator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[{"name":"amount","type":"u64"},{"name":"max_sol_cost","type":"u64"}]},{"name":"claim_cashback","discriminator":[37,58,35,126,190,53,228,197],"accounts":[{"name":"user","writable":true},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[]},{"name":"claim_cashback_v2","discriminator":[122,243,204,65,94,116,29,55],"accounts":[{"name":"user","writable":true},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"quote_mint"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"associated_user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"account","path":"user_volume_accumulator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"associated_quote_user","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[]},{"name":"claim_token_incentives","discriminator":[16,4,71,28,204,1,40,27],"accounts":[{"name":"user"},{"name":"user_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"global_incentive_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"global_volume_accumulator"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"mint","relations":["global_volume_accumulator"]},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"payer","writable":true,"signer":true}],"args":[]},{"name":"close_user_volume_accumulator","discriminator":[249,69,164,218,150,103,84,138],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"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":"collect_creator_fee","docs":["Collects creator_fee from creator_vault to the coin creator account"],"discriminator":[20,22,86,123,198,28,219,132],"accounts":[{"name":"creator","writable":true},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"creator"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"collect_creator_fee_v2","docs":["Collects creator_fee from creator_vault to the coin creator account"],"discriminator":[207,17,138,242,4,34,19,56],"accounts":[{"name":"creator","writable":true},{"name":"creator_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"creator"}]}},{"name":"creator_vault_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"quote_mint"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"create","docs":["Creates a new coin and bonding curve."],"discriminator":[24,30,200,40,5,28,7,119],"accounts":[{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,45,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"mpl_token_metadata","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]},{"kind":"account","path":"mint"}],"program":{"kind":"account","path":"mpl_token_metadata"}}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"creator","type":"pubkey"}]},{"name":"create_v2","docs":["Creates a new spl-22 coin and bonding curve."],"discriminator":[214,144,76,236,95,139,49,180],"accounts":[{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","pda":{"seeds":[{"kind":"const","value":[109,105,110,116,45,97,117,116,104,111,114,105,116,121]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"mayhem_program_id","writable":true,"address":"MAyhSmzXzV1pTf7LsNkrNwkWKTo4ougAJ1PPg47MD4e"},{"name":"global_params","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,45,112,97,114,97,109,115]}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"sol_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[115,111,108,45,118,97,117,108,116]}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"mayhem_state","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,97,121,104,101,109,45,115,116,97,116,101]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"mayhem_token_vault","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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_enabled","type":{"defined":{"name":"OptionBool"}}}]},{"name":"distribute_creator_fees","docs":["Distributes creator fees to shareholders based on their share percentages","The creator vault needs to have at least the minimum distributable amount to distribute fees","This can be checked with the get_minimum_distributable_fee instruction"],"discriminator":[165,114,103,0,121,206,247,81],"accounts":[{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"sharing_config","pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[],"returns":{"defined":{"name":"DistributeCreatorFeesEvent"}}},{"name":"distribute_creator_fees_v2","discriminator":[255,203,19,79,244,68,8,159],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"sharing_config","pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"creator_vault_quote_token_account","docs":["Deserialized manually in the handler for non-legacy quote mints."],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"quote_mint"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[{"name":"initialize_ata","type":"bool"}],"returns":{"defined":{"name":"DistributeCreatorFeesEvent"}}},{"name":"extend_account","docs":["Extends the size of program-owned accounts"],"discriminator":[234,102,194,203,150,72,62,229],"accounts":[{"name":"account","writable":true},{"name":"user","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"get_minimum_distributable_fee","docs":["Permissionless instruction to check the minimum required fees for distribution","Returns the minimum required balance from the creator_vault and whether distribution can proceed"],"discriminator":[117,225,127,202,134,95,68,35],"accounts":[{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"sharing_config","pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"name":"creator_vault","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}}],"args":[],"returns":{"defined":{"name":"MinimumDistributableFeeEvent"}}},{"name":"init_user_volume_accumulator","discriminator":[94,6,202,115,255,96,232,183],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"user"},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"initialize","docs":["Creates the global state."],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"migrate","docs":["Migrates liquidity to pump_amm if the bonding curve is complete"],"discriminator":[155,234,231,146,236,158,162,30],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"withdraw_authority","writable":true,"relations":["global"]},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"mint"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"pump_amm","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"const","value":[0,0]},{"kind":"account","path":"pool_authority"},{"kind":"account","path":"mint"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"pool_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,45,97,117,116,104,111,114,105,116,121]},{"kind":"account","path":"mint"}]}},{"name":"pool_authority_mint_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"mint"},{"kind":"account","path":"mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_authority_wsol_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"amm_global_config","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"wsol_mint","address":"So11111111111111111111111111111111111111112"},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"user_pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"token_2022_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_base_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint"},{"kind":"account","path":"mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_quote_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"token_program"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"pump_amm_event_authority","pda":{"seeds":[{"kind":"const","value":[95,95,101,118,101,110,116,95,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"account","path":"pump_amm"}}},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"migrate_bonding_curve_creator","discriminator":[87,124,52,191,52,38,214,232],"accounts":[{"name":"mint","relations":["sharing_config"]},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"sharing_config","pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"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":"migrate_v2","docs":["Migrates liquidity to pump_amm if the bonding curve is complete"],"discriminator":[187,203,18,31,206,237,254,41],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"withdraw_authority","writable":true,"relations":["global"]},{"name":"base_mint"},{"name":"quote_mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"user","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"pump_amm","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"const","value":[0,0]},{"kind":"account","path":"pool_authority"},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"pool_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,45,97,117,116,104,111,114,105,116,121]},{"kind":"account","path":"base_mint"}]}},{"name":"pool_authority_mint_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_authority_quote_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"amm_global_config","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool"}],"program":{"kind":"account","path":"pump_amm"}}},{"name":"user_pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_authority"},{"kind":"account","path":"token_2022_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_base_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"pool_quote_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"pump_amm_event_authority"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"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":"remove_quote_mint","discriminator":[177,65,223,38,88,209,158,155],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"quote_mint","type":"pubkey"}]},{"name":"sell","docs":["Sells tokens into a bonding curve.","For cashback coins, pass as remaining_accounts: [0] user_volume_accumulator,","[1] bonding_curve_v2. If provided and valid, creator_fee goes to user_volume_accumulator.","Otherwise, falls back to transferring creator_fee to creator_vault."],"discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"fee_recipient","writable":true},{"name":"mint"},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"associated_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_user","writable":true},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"token_program"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"amount","type":"u64"},{"name":"min_sol_output","type":"u64"}]},{"name":"sell_v2","discriminator":[93,246,130,60,231,233,64,178],"accounts":[{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"base_mint"},{"name":"quote_mint"},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"fee_recipient","writable":true},{"name":"associated_quote_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"buyback_fee_recipient","writable":true},{"name":"associated_quote_buyback_fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"buyback_fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"base_mint"}]}},{"name":"associated_base_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_quote_bonding_curve","writable":true,"pda":{"seeds":[{"kind":"account","path":"bonding_curve"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user","writable":true,"signer":true},{"name":"associated_base_user","writable":true},{"name":"associated_quote_user","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"bonding_curve.creator","account":"BondingCurve"}]}},{"name":"associated_creator_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator_vault"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"sharing_config","docs":["seeds; the account is intentionally not deserialized here because it may be uninitialized","for mints that have not created a fee sharing config. Handlers must check","`data_is_empty()` / owner before reading."],"pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"associated_user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"account","path":"user_volume_accumulator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"6EF8rrecthR5Dkzon8Nwu78hRvfCKubJ14M5uBEwF6P"}],"args":[{"name":"amount","type":"u64"},{"name":"min_sol_output","type":"u64"}]},{"name":"set_creator","docs":["Allows Global::set_creator_authority to set the bonding curve creator from Metaplex metadata or input argument"],"discriminator":[254,148,255,112,207,142,170,165],"accounts":[{"name":"set_creator_authority","signer":true,"relations":["global"]},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"mint"},{"name":"metadata","pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]}}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"creator","type":"pubkey"}]},{"name":"set_mayhem_virtual_params","discriminator":[61,169,188,191,153,149,42,97],"accounts":[{"name":"sol_vault_authority","writable":true,"signer":true,"pda":{"seeds":[{"kind":"const","value":[115,111,108,45,118,97,117,108,116]}],"program":{"kind":"const","value":[5,42,229,215,167,218,167,36,166,234,176,167,41,84,145,133,90,212,160,103,22,96,103,76,78,3,69,89,128,61,101,163]}}},{"name":"mayhem_token_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"sol_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"mint"},{"name":"global","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"name":"token_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"set_metaplex_creator","docs":["Syncs the bonding curve creator with the Metaplex metadata creator if it exists"],"discriminator":[138,96,174,217,48,85,197,246],"accounts":[{"name":"mint"},{"name":"metadata","pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]}}},{"name":"bonding_curve","writable":true,"pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"mint"}]}},{"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":"set_params","docs":["Sets the global state parameters."],"discriminator":[27,234,178,52,147,2,187,141],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"}]},{"name":"set_reserved_fee_recipients","discriminator":[111,172,162,232,114,89,213,142],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","signer":true,"relations":["global"]},{"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":"set_virtual_quote_reserves","discriminator":[101,135,191,104,9,88,20,96],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"initial_virtual_quote_reserves","type":"u64"}]},{"name":"sync_user_volume_accumulator","discriminator":[86,31,192,87,163,87,79,238],"accounts":[{"name":"user"},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"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":"toggle_cashback_enabled","discriminator":[115,103,224,255,189,89,86,195],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"toggle_create_v2","discriminator":[28,255,230,240,172,107,203,171],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"toggle_mayhem_mode","discriminator":[1,9,111,208,100,31,255,163],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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_buyback_config","discriminator":[251,224,171,146,160,26,113,233],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","writable":true,"signer":true,"relations":["global"]},{"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":"buyback_basis_points","type":{"option":"u64"}}]},{"name":"update_global_authority","discriminator":[227,181,74,196,208,21,97,213],"accounts":[{"name":"global","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108]}]}},{"name":"authority","signer":true,"relations":["global"]},{"name":"new_authority"},{"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":[]}],"accounts":[{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"FeeConfig","discriminator":[143,52,146,187,219,123,76,155]},{"name":"Global","discriminator":[167,232,232,177,200,108,114,127]},{"name":"GlobalVolumeAccumulator","discriminator":[202,42,246,43,142,190,30,255]},{"name":"SharingConfig","discriminator":[216,74,9,0,56,140,93,75]},{"name":"UserVolumeAccumulator","discriminator":[86,255,112,14,102,53,154,250]}],"events":[{"name":"AdminSetCreatorEvent","discriminator":[64,69,192,104,29,30,25,107]},{"name":"AdminSetIdlAuthorityEvent","discriminator":[245,59,70,34,75,185,109,92]},{"name":"AdminUpdateTokenIncentivesEvent","discriminator":[147,250,108,120,247,29,67,222]},{"name":"ClaimCashbackEvent","discriminator":[226,214,246,33,7,242,147,229]},{"name":"ClaimTokenIncentivesEvent","discriminator":[79,172,246,49,205,91,206,232]},{"name":"CloseUserVolumeAccumulatorEvent","discriminator":[146,159,189,172,146,88,56,244]},{"name":"CollectCreatorFeeEvent","discriminator":[122,2,127,1,14,191,12,175]},{"name":"CompleteEvent","discriminator":[95,114,97,156,212,46,152,8]},{"name":"CompletePumpAmmMigrationEvent","discriminator":[189,233,93,185,92,148,234,148]},{"name":"CreateEvent","discriminator":[27,114,169,77,222,235,99,118]},{"name":"DistributeCreatorFeesEvent","discriminator":[165,55,129,112,4,179,202,40]},{"name":"ExtendAccountEvent","discriminator":[97,97,215,144,93,146,22,124]},{"name":"InitUserVolumeAccumulatorEvent","discriminator":[134,36,13,72,232,101,130,216]},{"name":"MigrateBondingCurveCreatorEvent","discriminator":[155,167,104,220,213,108,243,3]},{"name":"MinimumDistributableFeeEvent","discriminator":[168,216,132,239,235,182,49,52]},{"name":"ReservedFeeRecipientsEvent","discriminator":[43,188,250,18,221,75,187,95]},{"name":"SetCreatorEvent","discriminator":[237,52,123,37,245,251,72,210]},{"name":"SetMetaplexCreatorEvent","discriminator":[142,203,6,32,127,105,191,162]},{"name":"SetParamsEvent","discriminator":[223,195,159,246,62,48,143,131]},{"name":"SyncUserVolumeAccumulatorEvent","discriminator":[197,122,167,124,116,81,91,255]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]},{"name":"UpdateGlobalAuthorityEvent","discriminator":[182,195,137,42,35,206,207,247]},{"name":"UpdateMayhemVirtualParamsEvent","discriminator":[117,123,228,182,161,168,220,214]}],"errors":[{"code":6000,"name":"NotAuthorized","msg":"The given account is not authorized to execute this instruction."},{"code":6001,"name":"AlreadyInitialized","msg":"The program is already initialized."},{"code":6002,"name":"TooMuchSolRequired","msg":"slippage: Too much SOL required to buy the given amount of tokens."},{"code":6003,"name":"TooLittleSolReceived","msg":"slippage: Too little SOL received to sell the given amount of tokens."},{"code":6004,"name":"MintDoesNotMatchBondingCurve","msg":"The mint does not match the bonding curve."},{"code":6005,"name":"BondingCurveComplete","msg":"The bonding curve has completed and liquidity migrated to raydium."},{"code":6006,"name":"BondingCurveNotComplete","msg":"The bonding curve has not completed."},{"code":6007,"name":"NotInitialized","msg":"The program is not initialized."},{"code":6008,"name":"WithdrawTooFrequent","msg":"Withdraw too frequent"},{"code":6009,"name":"NewSizeShouldBeGreaterThanCurrentSize","msg":"new_size should be > current_size"},{"code":6010,"name":"AccountTypeNotSupported","msg":"Account type not supported"},{"code":6011,"name":"InitialRealTokenReservesShouldBeLessThanTokenTotalSupply","msg":"initial_real_token_reserves should be less than token_total_supply"},{"code":6012,"name":"InitialVirtualTokenReservesShouldBeGreaterThanInitialRealTokenReserves","msg":"initial_virtual_token_reserves should be greater than initial_real_token_reserves"},{"code":6013,"name":"FeeBasisPointsGreaterThanMaximum","msg":"fee_basis_points greater than maximum"},{"code":6014,"name":"AllZerosWithdrawAuthority","msg":"Withdraw authority cannot be set to System Program ID"},{"code":6015,"name":"PoolMigrationFeeShouldBeLessThanFinalRealSolReserves","msg":"pool_migration_fee should be less than final_real_sol_reserves"},{"code":6016,"name":"PoolMigrationFeeShouldBeGreaterThanCreatorFeePlusMaxMigrateFees","msg":"pool_migration_fee should be greater than creator_fee + MAX_MIGRATE_FEES"},{"code":6017,"name":"DisabledWithdraw","msg":"Migrate instruction is disabled"},{"code":6018,"name":"DisabledMigrate","msg":"Migrate instruction is disabled"},{"code":6019,"name":"InvalidCreator","msg":"Invalid creator pubkey"},{"code":6020,"name":"BuyZeroAmount","msg":"Buy zero amount"},{"code":6021,"name":"NotEnoughTokensToBuy","msg":"Not enough tokens to buy"},{"code":6022,"name":"SellZeroAmount","msg":"Sell zero amount"},{"code":6023,"name":"NotEnoughTokensToSell","msg":"Not enough tokens to sell"},{"code":6024,"name":"Overflow","msg":"Overflow"},{"code":6025,"name":"Truncation","msg":"Truncation"},{"code":6026,"name":"DivisionByZero","msg":"Division by zero"},{"code":6027,"name":"NotEnoughRemainingAccounts","msg":"Not enough remaining accounts"},{"code":6028,"name":"AllFeeRecipientsShouldBeNonZero","msg":"All fee recipients should be non-zero"},{"code":6029,"name":"UnsortedNotUniqueFeeRecipients","msg":"Unsorted or not unique fee recipients"},{"code":6030,"name":"CreatorShouldNotBeZero","msg":"Creator should not be zero"},{"code":6031,"name":"StartTimeInThePast"},{"code":6032,"name":"EndTimeInThePast"},{"code":6033,"name":"EndTimeBeforeStartTime"},{"code":6034,"name":"TimeRangeTooLarge"},{"code":6035,"name":"EndTimeBeforeCurrentDay"},{"code":6036,"name":"SupplyUpdateForFinishedRange"},{"code":6037,"name":"DayIndexAfterEndIndex"},{"code":6038,"name":"DayInActiveRange"},{"code":6039,"name":"InvalidIncentiveMint"},{"code":6040,"name":"BuyNotEnoughSolToCoverRent","msg":"Buy: Not enough SOL to cover for rent exemption."},{"code":6041,"name":"BuyNotEnoughSolToCoverFees","msg":"Buy: Not enough SOL to cover for fees."},{"code":6042,"name":"BuySlippageBelowMinTokensOut","msg":"Slippage: Would buy less tokens than expected min_tokens_out"},{"code":6043,"name":"NameTooLong"},{"code":6044,"name":"SymbolTooLong"},{"code":6045,"name":"UriTooLong"},{"code":6046,"name":"CreateV2Disabled"},{"code":6047,"name":"CpitializeMayhemFailed"},{"code":6048,"name":"MayhemModeDisabled"},{"code":6049,"name":"CreatorMigratedToSharingConfig","msg":"creator has been migrated to sharing config, use pump_fees::reset_fee_sharing_config instead"},{"code":6050,"name":"UnableToDistributeCreatorVaultMigratedToSharingConfig","msg":"creator_vault has been migrated to sharing config, use pump:distribute_creator_fees instead"},{"code":6051,"name":"SharingConfigNotActive","msg":"Sharing config is not active"},{"code":6052,"name":"UnableToDistributeCreatorFeesToExecutableRecipient","msg":"The recipient account is executable, so it cannot receive lamports, remove it from the team first"},{"code":6053,"name":"BondingCurveAndSharingConfigCreatorMismatch","msg":"Bonding curve creator does not match sharing config"},{"code":6054,"name":"ShareholdersAndRemainingAccountsMismatch","msg":"Remaining accounts do not match shareholders, make sure to pass exactly the same pubkeys in the same order"},{"code":6055,"name":"InvalidShareBps","msg":"Share bps must be greater than 0"},{"code":6056,"name":"CashbackNotEnabled","msg":"Cashback is not enabled"},{"code":6057,"name":"BuybackFeeRecipientNotAuthorized","msg":"Buyback fee recipient not authorized"},{"code":6058,"name":"AllBuybackFeeRecipientsShouldBeNonZero"},{"code":6059,"name":"NotUniqueBuybackFeeRecipients"},{"code":6060,"name":"BuybackBasisPointsOutOfRange","msg":"buyback_basis_points must be <= 10_000"},{"code":6061,"name":"WrongBuybackFeeRecipientsCount","msg":"buyback fee recipients require exactly 8 remaining accounts (or none)"},{"code":6062,"name":"BuybackFeeRecipientMissing"},{"code":6063,"name":"UnsupportedQuoteMint","msg":"Unsupported quote mint"},{"code":6064,"name":"InvalidQuoteTokenProgram","msg":"Create v2: quote token program must be legacy SPL Token"},{"code":6065,"name":"InvalidAssociatedQuoteBondingCurve","msg":"Create v2: associated quote bonding curve address does not match derivation"},{"code":6066,"name":"QuoteMintWhitelistFull","msg":"Quote mint whitelist is full"},{"code":6067,"name":"QuoteMintAlreadyWhitelisted","msg":"Quote mint is already whitelisted"},{"code":6068,"name":"QuoteMintNotWhitelisted","msg":"Quote mint is not in the whitelist"},{"code":6069,"name":"QuoteMintNotEligibleForWhitelist","msg":"Quote mint cannot be added or removed via whitelist (default or native SOL mint)"},{"code":6070,"name":"UnableToDistributeCreatorFeesToUninitializedAccount","msg":"Unable to distribute creator fees to uninitialized account"},{"code":6071,"name":"MayhemModeQuoteMintNotAllowed","msg":"Mayhem mode quote mint not allowed"}],"types":[{"name":"AdminSetCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin_set_creator_authority","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"old_creator","type":"pubkey"},{"name":"new_creator","type":"pubkey"}]}},{"name":"AdminSetIdlAuthorityEvent","type":{"kind":"struct","fields":[{"name":"idl_authority","type":"pubkey"}]}},{"name":"AdminUpdateTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"day_number","type":"u64"},{"name":"token_supply_per_day","type":"u64"},{"name":"mint","type":"pubkey"},{"name":"seconds_in_a_day","type":"i64"},{"name":"timestamp","type":"i64"}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_quote_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_quote_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"complete","type":"bool"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_coin","type":"bool"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"ClaimCashbackEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed","type":"u64"},{"name":"total_cashback_earned","type":"u64"}]}},{"name":"ClaimTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"}]}},{"name":"CloseUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"}]}},{"name":"CollectCreatorFeeEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"creator","type":"pubkey"},{"name":"creator_fee","type":"u64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"CompleteEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"CompletePumpAmmMigrationEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"mint_amount","type":"u64"},{"name":"sol_amount","type":"u64"},{"name":"pool_migration_fee","type":"u64"},{"name":"bonding_curve","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"pool","type":"pubkey"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"ConfigStatus","type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Active"}]}},{"name":"CreateEvent","type":{"kind":"struct","fields":[{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"token_program","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_enabled","type":"bool"},{"name":"quote_mint","type":"pubkey"},{"name":"virtual_quote_reserves","type":"u64"}]}},{"name":"DistributeCreatorFeesEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"distributed","type":"u64"},{"name":"quote_mint","type":"pubkey"}]}},{"name":"ExtendAccountEvent","type":{"kind":"struct","fields":[{"name":"account","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"current_size","type":"u64"},{"name":"new_size","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"FeeConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"admin","type":"pubkey"},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"market_cap_lamports_threshold","type":"u128"},{"name":"fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"lp_fee_bps","type":"u64"},{"name":"protocol_fee_bps","type":"u64"},{"name":"creator_fee_bps","type":"u64"}]}},{"name":"Global","type":{"kind":"struct","fields":[{"name":"initialized","docs":["Unused"],"type":"bool"},{"name":"authority","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","docs":["Unused"],"type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"fee_recipients","type":{"array":["pubkey",7]}},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"},{"name":"create_v2_enabled","type":"bool"},{"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]}},{"name":"is_cashback_enabled","type":"bool"},{"name":"buyback_fee_recipients","type":{"array":["pubkey",8]}},{"name":"buyback_basis_points","type":"u64"},{"name":"initial_virtual_quote_reserves","type":"u64"},{"name":"whitelisted_quote_mints","type":{"array":["pubkey",1]}}]}},{"name":"GlobalVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"seconds_in_a_day","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"total_token_supply","type":{"array":["u64",30]}},{"name":"sol_volumes","type":{"array":["u64",30]}}]}},{"name":"InitUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"payer","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"}]}},{"name":"MigrateBondingCurveCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"old_creator","type":"pubkey"},{"name":"new_creator","type":"pubkey"}]}},{"name":"MinimumDistributableFeeEvent","type":{"kind":"struct","fields":[{"name":"minimum_required","type":"u64"},{"name":"distributable_fees","type":"u64"},{"name":"can_distribute","type":"bool"}]}},{"name":"OptionBool","type":{"kind":"struct","fields":["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]}}]}},{"name":"SetCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"SetMetaplexCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"metadata","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"SetParamsEvent","type":{"kind":"struct","fields":[{"name":"initial_virtual_token_reserves","type":"u64"},{"name":"initial_virtual_sol_reserves","type":"u64"},{"name":"initial_real_token_reserves","type":"u64"},{"name":"final_real_sol_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"fee_basis_points","type":"u64"},{"name":"withdraw_authority","type":"pubkey"},{"name":"enable_migrate","type":"bool"},{"name":"pool_migration_fee","type":"u64"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"fee_recipients","type":{"array":["pubkey",8]}},{"name":"timestamp","type":"i64"},{"name":"set_creator_authority","type":"pubkey"},{"name":"admin_set_creator_authority","type":"pubkey"}]}},{"name":"Shareholder","type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"share_bps","type":"u16"}]}},{"name":"SharingConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}},{"name":"mint","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"admin_revoked","type":"bool"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]}},{"name":"SyncUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"total_claimed_tokens_before","type":"u64"},{"name":"total_claimed_tokens_after","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"TradeEvent","docs":["ix_name: \"buy\" | \"sell\" | \"buy_exact_sol_in\""],"type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"sol_amount","type":"u64"},{"name":"token_amount","type":"u64"},{"name":"is_buy","type":"bool"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"virtual_token_reserves","type":"u64"},{"name":"real_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"fee_recipient","type":"pubkey"},{"name":"fee_basis_points","type":"u64"},{"name":"fee","type":"u64"},{"name":"creator","type":"pubkey"},{"name":"creator_fee_basis_points","type":"u64"},{"name":"creator_fee","type":"u64"},{"name":"track_volume","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"ix_name","type":"string"},{"name":"mayhem_mode","type":"bool"},{"name":"cashback_fee_basis_points","type":"u64"},{"name":"cashback","type":"u64"},{"name":"buyback_fee_basis_points","type":"u64"},{"name":"buyback_fee","type":"u64"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}},{"name":"quote_mint","type":"pubkey"},{"name":"quote_amount","type":"u64"},{"name":"virtual_quote_reserves","type":"u64"},{"name":"real_quote_reserves","type":"u64"}]}},{"name":"UpdateGlobalAuthorityEvent","type":{"kind":"struct","fields":[{"name":"global","type":"pubkey"},{"name":"authority","type":"pubkey"},{"name":"new_authority","type":"pubkey"},{"name":"timestamp","type":"i64"}]}},{"name":"UpdateMayhemVirtualParamsEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"new_virtual_token_reserves","type":"u64"},{"name":"new_virtual_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_sol_reserves","type":"u64"}]}},{"name":"UserVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"needs_claim","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"has_total_claimed_tokens","type":"bool"},{"name":"cashback_earned","type":"u64"},{"name":"total_cashback_claimed","type":"u64"}]}}]} \ No newline at end of file diff --git a/idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json b/idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json new file mode 100644 index 0000000..daf2337 --- /dev/null +++ b/idls/pump_swap.pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA.json @@ -0,0 +1 @@ +{"address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA","metadata":{"name":"pump_amm","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"admin_set_coin_creator","docs":["Overrides the coin creator for a canonical pump pool"],"discriminator":[242,40,117,145,73,96,105,104],"accounts":[{"name":"admin_set_coin_creator_authority","signer":true,"relations":["global_config"]},{"name":"global_config"},{"name":"pool","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":"coin_creator","type":"pubkey"}]},{"name":"admin_update_token_incentives","discriminator":[209,11,115,87,213,23,124,204],"accounts":[{"name":"admin","writable":true,"signer":true,"relations":["global_config"]},{"name":"global_config","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]}]}},{"name":"global_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"mint"},{"name":"global_incentive_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"global_volume_accumulator"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program"},{"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":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"seconds_in_a_day","type":"i64"},{"name":"day_number","type":"u64"},{"name":"token_supply_per_day","type":"u64"}]},{"name":"buy","docs":["For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0].","If provided and valid, the ATA will be initialized if needed."],"discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"pool","writable":true},{"name":"user","writable":true,"signer":true},{"name":"global_config"},{"name":"base_mint","relations":["pool"]},{"name":"quote_mint","relations":["pool"]},{"name":"user_base_token_account","writable":true},{"name":"user_quote_token_account","writable":true},{"name":"pool_base_token_account","writable":true,"relations":["pool"]},{"name":"pool_quote_token_account","writable":true,"relations":["pool"]},{"name":"protocol_fee_recipient"},{"name":"protocol_fee_recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"coin_creator_vault_authority","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"pool.coin_creator","account":"Pool"}]}},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"base_amount_out","type":"u64"},{"name":"max_quote_amount_in","type":"u64"},{"name":"track_volume","type":{"defined":{"name":"OptionBool"}}}]},{"name":"buy_exact_quote_in","docs":["Given a budget of spendable_quote_in, buy at least min_base_amount_out","Fees will be deducted from spendable_quote_in","","f(quote) = tokens, where tokens >= min_base_amount_out","","Make sure the payer has enough SOL to cover creation of the following accounts (unless already created):","- protocol_fee_recipient_token_account: rent.minimum_balance(TokenAccount::LEN)","- coin_creator_vault_ata: rent.minimum_balance(TokenAccount::LEN)","- user_volume_accumulator: rent.minimum_balance(UserVolumeAccumulator::LEN)","","For cashback coins, optionally pass user_volume_accumulator_wsol_ata as remaining_accounts[0].","If provided and valid, the ATA will be initialized if needed."],"discriminator":[198,46,21,82,180,217,232,112],"accounts":[{"name":"pool","writable":true},{"name":"user","writable":true,"signer":true},{"name":"global_config"},{"name":"base_mint","relations":["pool"]},{"name":"quote_mint","relations":["pool"]},{"name":"user_base_token_account","writable":true},{"name":"user_quote_token_account","writable":true},{"name":"pool_base_token_account","writable":true,"relations":["pool"]},{"name":"pool_quote_token_account","writable":true,"relations":["pool"]},{"name":"protocol_fee_recipient"},{"name":"protocol_fee_recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"coin_creator_vault_authority","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"pool.coin_creator","account":"Pool"}]}},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"spendable_quote_in","type":"u64"},{"name":"min_base_amount_out","type":"u64"},{"name":"track_volume","type":{"defined":{"name":"OptionBool"}}}]},{"name":"claim_cashback","discriminator":[37,58,35,126,190,53,228,197],"accounts":[{"name":"user","writable":true},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"quote_mint"},{"name":"quote_token_program"},{"name":"user_volume_accumulator_wsol_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"user_volume_accumulator"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_wsol_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"}],"args":[]},{"name":"claim_token_incentives","discriminator":[16,4,71,28,204,1,40,27],"accounts":[{"name":"user"},{"name":"user_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"global_incentive_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"global_volume_accumulator"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"mint","relations":["global_volume_accumulator"]},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"payer","writable":true,"signer":true}],"args":[]},{"name":"close_user_volume_accumulator","discriminator":[249,69,164,218,150,103,84,138],"accounts":[{"name":"user","writable":true,"signer":true},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"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":"collect_coin_creator_fee","discriminator":[160,57,89,42,181,139,43,66],"accounts":[{"name":"quote_mint"},{"name":"quote_token_program"},{"name":"coin_creator"},{"name":"coin_creator_vault_authority","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"coin_creator"}]}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"coin_creator_token_account","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":"create_config","discriminator":[201,207,243,114,75,111,47,189],"accounts":[{"name":"admin","writable":true,"signer":true,"address":"8LWu7QM2dGR1G8nKDHthckea57bkCzXyBTAKPJUBDHo8"},{"name":"global_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"lp_fee_basis_points","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee_recipients","type":{"array":["pubkey",8]}},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"admin_set_coin_creator_authority","type":"pubkey"}]},{"name":"create_pool","discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"arg","path":"index"},{"kind":"account","path":"creator"},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"global_config"},{"name":"creator","writable":true,"signer":true},{"name":"base_mint"},{"name":"quote_mint"},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool"}]}},{"name":"user_base_token_account","writable":true},{"name":"user_quote_token_account","writable":true},{"name":"user_pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"token_2022_program"},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_base_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_quote_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"index","type":"u16"},{"name":"base_amount_in","type":"u64"},{"name":"quote_amount_in","type":"u64"},{"name":"coin_creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_coin","type":{"defined":{"name":"OptionBool"}}}]},{"name":"deposit","discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"pool","writable":true},{"name":"global_config"},{"name":"user","signer":true},{"name":"base_mint","relations":["pool"]},{"name":"quote_mint","relations":["pool"]},{"name":"lp_mint","writable":true,"relations":["pool"]},{"name":"user_base_token_account","writable":true},{"name":"user_quote_token_account","writable":true},{"name":"user_pool_token_account","writable":true},{"name":"pool_base_token_account","writable":true,"relations":["pool"]},{"name":"pool_quote_token_account","writable":true,"relations":["pool"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"lp_token_amount_out","type":"u64"},{"name":"max_base_amount_in","type":"u64"},{"name":"max_quote_amount_in","type":"u64"}]},{"name":"disable","discriminator":[185,173,187,90,216,15,238,233],"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":"disable_create_pool","type":"bool"},{"name":"disable_deposit","type":"bool"},{"name":"disable_withdraw","type":"bool"},{"name":"disable_buy","type":"bool"},{"name":"disable_sell","type":"bool"}]},{"name":"extend_account","discriminator":[234,102,194,203,150,72,62,229],"accounts":[{"name":"account","writable":true},{"name":"user","signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"init_user_volume_accumulator","discriminator":[94,6,202,115,255,96,232,183],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"user"},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"migrate_pool_coin_creator","docs":["Migrate Pool Coin Creator to Sharing Config"],"discriminator":[208,8,159,4,74,175,16,58],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"pool.index","account":"Pool"},{"kind":"account","path":"pool.creator","account":"Pool"},{"kind":"account","path":"pool.base_mint","account":"Pool"},{"kind":"account","path":"pool.quote_mint","account":"Pool"}]}},{"name":"sharing_config","pda":{"seeds":[{"kind":"const","value":[115,104,97,114,105,110,103,45,99,111,110,102,105,103]},{"kind":"account","path":"pool.base_mint","account":"Pool"}],"program":{"kind":"const","value":[12,53,255,169,5,90,142,86,141,168,247,188,7,86,21,39,76,241,201,44,164,31,64,0,156,81,106,164,20,194,124,112]}}},{"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":"sell","discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"pool","writable":true},{"name":"user","writable":true,"signer":true},{"name":"global_config"},{"name":"base_mint","relations":["pool"]},{"name":"quote_mint","relations":["pool"]},{"name":"user_base_token_account","writable":true},{"name":"user_quote_token_account","writable":true},{"name":"pool_base_token_account","writable":true,"relations":["pool"]},{"name":"pool_quote_token_account","writable":true,"relations":["pool"]},{"name":"protocol_fee_recipient"},{"name":"protocol_fee_recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"protocol_fee_recipient"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"base_token_program"},{"name":"quote_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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","address":"pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA"},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"quote_token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"coin_creator_vault_authority","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"pool.coin_creator","account":"Pool"}]}},{"name":"fee_config","pda":{"seeds":[{"kind":"const","value":[102,101,101,95,99,111,110,102,105,103]},{"kind":"const","value":[12,20,222,252,130,94,198,118,148,37,8,24,187,101,64,101,244,41,141,49,86,213,113,180,212,248,9,12,24,233,168,99]}],"program":{"kind":"account","path":"fee_program"}}},{"name":"fee_program","address":"pfeeUxB6jkeY1Hxd7CsFCAjcbHA9rWtchMGdZ6VojVZ"}],"args":[{"name":"base_amount_in","type":"u64"},{"name":"min_quote_amount_out","type":"u64"}]},{"name":"set_coin_creator","docs":["Sets Pool::coin_creator from Metaplex metadata creator or BondingCurve::creator"],"discriminator":[210,149,128,45,188,58,78,175],"accounts":[{"name":"pool","writable":true},{"name":"metadata","pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]},{"kind":"account","path":"pool.base_mint","account":"Pool"}],"program":{"kind":"const","value":[11,112,101,177,227,209,124,69,56,157,82,127,107,4,195,205,88,184,108,115,26,160,253,181,73,182,209,188,3,248,41,70]}}},{"name":"bonding_curve","pda":{"seeds":[{"kind":"const","value":[98,111,110,100,105,110,103,45,99,117,114,118,101]},{"kind":"account","path":"pool.base_mint","account":"Pool"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"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":"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":[86,31,192,87,163,87,79,238],"accounts":[{"name":"user"},{"name":"global_volume_accumulator","pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]}]}},{"name":"user_volume_accumulator","writable":true,"pda":{"seeds":[{"kind":"const","value":[117,115,101,114,95,118,111,108,117,109,101,95,97,99,99,117,109,117,108,97,116,111,114]},{"kind":"account","path":"user"}]}},{"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":"toggle_cashback_enabled","discriminator":[115,103,224,255,189,89,86,195],"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":"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":"transfer_creator_fees_to_pump","docs":["Transfer creator fees to pump creator vault","If coin creator fees are currently below rent.minimum_balance(TokenAccount::LEN)","The transfer will be skipped"],"discriminator":[139,52,134,85,228,229,108,241],"accounts":[{"name":"wsol_mint","docs":["Pump Canonical Pool are quoted in wSOL"]},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"coin_creator"}]}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"wsol_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"coin_creator"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"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":"transfer_creator_fees_to_pump_v2","discriminator":[1,33,78,185,33,67,44,92],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"quote_mint"},{"name":"token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"coin_creator"},{"name":"coin_creator_vault_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,118,97,117,108,116]},{"kind":"account","path":"coin_creator"}]}},{"name":"coin_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"coin_creator_vault_authority"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pump_creator_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,45,118,97,117,108,116]},{"kind":"account","path":"coin_creator"}],"program":{"kind":"const","value":[1,86,224,246,147,102,90,207,68,219,21,104,191,23,91,170,81,137,203,151,245,210,255,59,101,93,43,182,253,109,24,176]}}},{"name":"pump_creator_vault_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"pump_creator_vault"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"associated_token_program"}}},{"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":"update_admin","discriminator":[161,176,40,213,60,184,179,228],"accounts":[{"name":"admin","signer":true,"relations":["global_config"]},{"name":"global_config","writable":true},{"name":"new_admin"},{"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":"update_buyback_config","discriminator":[251,224,171,146,160,26,113,233],"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":"buyback_basis_points","type":{"option":"u64"}}]},{"name":"update_fee_config","discriminator":[104,184,103,242,88,151,107,20],"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":"lp_fee_basis_points","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee_recipients","type":{"array":["pubkey",8]}},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"admin_set_coin_creator_authority","type":"pubkey"}]},{"name":"withdraw","discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"pool","writable":true},{"name":"global_config"},{"name":"user","signer":true},{"name":"base_mint","relations":["pool"]},{"name":"quote_mint","relations":["pool"]},{"name":"lp_mint","writable":true,"relations":["pool"]},{"name":"user_base_token_account","writable":true},{"name":"user_quote_token_account","writable":true},{"name":"user_pool_token_account","writable":true},{"name":"pool_base_token_account","writable":true,"relations":["pool"]},{"name":"pool_quote_token_account","writable":true,"relations":["pool"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_2022_program","address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"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":"lp_token_amount_in","type":"u64"},{"name":"min_base_amount_out","type":"u64"},{"name":"min_quote_amount_out","type":"u64"}]}],"accounts":[{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"FeeConfig","discriminator":[143,52,146,187,219,123,76,155]},{"name":"GlobalConfig","discriminator":[149,8,156,202,160,252,176,217]},{"name":"GlobalVolumeAccumulator","discriminator":[202,42,246,43,142,190,30,255]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"SharingConfig","discriminator":[216,74,9,0,56,140,93,75]},{"name":"UserVolumeAccumulator","discriminator":[86,255,112,14,102,53,154,250]}],"events":[{"name":"AdminSetCoinCreatorEvent","discriminator":[45,220,93,24,25,97,172,104]},{"name":"AdminUpdateTokenIncentivesEvent","discriminator":[147,250,108,120,247,29,67,222]},{"name":"BuyEvent","discriminator":[103,244,82,31,44,245,119,119]},{"name":"ClaimCashbackEvent","discriminator":[226,214,246,33,7,242,147,229]},{"name":"ClaimTokenIncentivesEvent","discriminator":[79,172,246,49,205,91,206,232]},{"name":"CloseUserVolumeAccumulatorEvent","discriminator":[146,159,189,172,146,88,56,244]},{"name":"CollectCoinCreatorFeeEvent","discriminator":[232,245,194,238,234,218,58,89]},{"name":"CreateConfigEvent","discriminator":[107,52,89,129,55,226,81,22]},{"name":"CreatePoolEvent","discriminator":[177,49,12,210,160,118,167,116]},{"name":"DepositEvent","discriminator":[120,248,61,83,31,142,107,144]},{"name":"DisableEvent","discriminator":[107,253,193,76,228,202,27,104]},{"name":"ExtendAccountEvent","discriminator":[97,97,215,144,93,146,22,124]},{"name":"InitUserVolumeAccumulatorEvent","discriminator":[134,36,13,72,232,101,130,216]},{"name":"MigratePoolCoinCreatorEvent","discriminator":[170,221,82,199,147,165,247,46]},{"name":"ReservedFeeRecipientsEvent","discriminator":[43,188,250,18,221,75,187,95]},{"name":"SellEvent","discriminator":[62,47,55,10,165,3,220,42]},{"name":"SetBondingCurveCoinCreatorEvent","discriminator":[242,231,235,102,65,99,189,211]},{"name":"SetMetaplexCoinCreatorEvent","discriminator":[150,107,199,123,124,207,102,228]},{"name":"SyncUserVolumeAccumulatorEvent","discriminator":[197,122,167,124,116,81,91,255]},{"name":"UpdateAdminEvent","discriminator":[225,152,171,87,246,63,66,234]},{"name":"UpdateFeeConfigEvent","discriminator":[90,23,65,35,62,244,188,208]},{"name":"WithdrawEvent","discriminator":[22,9,133,26,160,44,71,192]}],"errors":[{"code":6000,"name":"FeeBasisPointsExceedsMaximum"},{"code":6001,"name":"ZeroBaseAmount"},{"code":6002,"name":"ZeroQuoteAmount"},{"code":6003,"name":"TooLittlePoolTokenLiquidity"},{"code":6004,"name":"ExceededSlippage"},{"code":6005,"name":"InvalidAdmin"},{"code":6006,"name":"UnsupportedBaseMint"},{"code":6007,"name":"UnsupportedQuoteMint"},{"code":6008,"name":"InvalidBaseMint"},{"code":6009,"name":"InvalidQuoteMint"},{"code":6010,"name":"InvalidLpMint"},{"code":6011,"name":"AllProtocolFeeRecipientsShouldBeNonZero"},{"code":6012,"name":"UnsortedNotUniqueProtocolFeeRecipients"},{"code":6013,"name":"InvalidProtocolFeeRecipient"},{"code":6014,"name":"InvalidPoolBaseTokenAccount"},{"code":6015,"name":"InvalidPoolQuoteTokenAccount"},{"code":6016,"name":"BuyMoreBaseAmountThanPoolReserves"},{"code":6017,"name":"DisabledCreatePool"},{"code":6018,"name":"DisabledDeposit"},{"code":6019,"name":"DisabledWithdraw"},{"code":6020,"name":"DisabledBuy"},{"code":6021,"name":"DisabledSell"},{"code":6022,"name":"SameMint"},{"code":6023,"name":"Overflow"},{"code":6024,"name":"Truncation"},{"code":6025,"name":"DivisionByZero"},{"code":6026,"name":"NewSizeLessThanCurrentSize"},{"code":6027,"name":"AccountTypeNotSupported"},{"code":6028,"name":"OnlyCanonicalPumpPoolsCanHaveCoinCreator"},{"code":6029,"name":"InvalidAdminSetCoinCreatorAuthority"},{"code":6030,"name":"StartTimeInThePast"},{"code":6031,"name":"EndTimeInThePast"},{"code":6032,"name":"EndTimeBeforeStartTime"},{"code":6033,"name":"TimeRangeTooLarge"},{"code":6034,"name":"EndTimeBeforeCurrentDay"},{"code":6035,"name":"SupplyUpdateForFinishedRange"},{"code":6036,"name":"DayIndexAfterEndIndex"},{"code":6037,"name":"DayInActiveRange"},{"code":6038,"name":"InvalidIncentiveMint"},{"code":6039,"name":"BuyNotEnoughQuoteTokensToCoverFees","msg":"buy: Not enough quote tokens to cover for fees."},{"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"},{"code":6045,"name":"InvalidSharingConfigBaseMint"},{"code":6046,"name":"InvalidSharingConfigCoinCreator"},{"code":6047,"name":"CoinCreatorMigratedToSharingConfig","msg":"coin creator has been migrated to sharing config, use pump_fees::reset_fee_sharing_config instead"},{"code":6048,"name":"CreatorVaultMigratedToSharingConfig","msg":"creator_vault has been migrated to sharing config, use pump:distribute_creator_fees instead"},{"code":6049,"name":"CashbackNotEnabled","msg":"Cashback is disabled"},{"code":6050,"name":"OnlyPumpPoolsCashback"},{"code":6051,"name":"CashbackNotInDesiredState"},{"code":6052,"name":"TokensInVaultLessThanCashbackEarned"},{"code":6053,"name":"BuybackFeeRecipientNotAuthorized","msg":"Buyback fee recipient not authorized"},{"code":6054,"name":"AllBuybackFeeRecipientsShouldBeNonZero"},{"code":6055,"name":"NotUniqueBuybackFeeRecipients"},{"code":6056,"name":"BuybackBasisPointsOutOfRange","msg":"buyback_basis_points must be <= 10_000"},{"code":6057,"name":"WrongBuybackFeeRecipientsCount","msg":"buyback fee recipients require exactly 8 remaining accounts (or none)"},{"code":6058,"name":"BuybackFeeRecipientMissing"}],"types":[{"name":"AdminSetCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin_set_coin_creator_authority","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"old_coin_creator","type":"pubkey"},{"name":"new_coin_creator","type":"pubkey"}]}},{"name":"AdminUpdateTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"day_number","type":"u64"},{"name":"token_supply_per_day","type":"u64"},{"name":"mint","type":"pubkey"},{"name":"seconds_in_a_day","type":"i64"},{"name":"timestamp","type":"i64"}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"virtual_token_reserves","type":"u64"},{"name":"virtual_sol_reserves","type":"u64"},{"name":"real_token_reserves","type":"u64"},{"name":"real_sol_reserves","type":"u64"},{"name":"token_total_supply","type":"u64"},{"name":"complete","type":"bool"},{"name":"creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_coin","type":"bool"}]}},{"name":"BuyEvent","docs":["ix_name: \"buy\" | \"buy_exact_quote_in\""],"type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_amount_out","type":"u64"},{"name":"max_quote_amount_in","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"quote_amount_in","type":"u64"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"lp_fee","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"quote_amount_in_with_lp_fee","type":"u64"},{"name":"user_quote_amount_in","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"protocol_fee_recipient_token_account","type":"pubkey"},{"name":"coin_creator","type":"pubkey"},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"coin_creator_fee","type":"u64"},{"name":"track_volume","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"min_base_amount_out","type":"u64"},{"name":"ix_name","type":"string"},{"name":"cashback_fee_basis_points","type":"u64"},{"name":"cashback","type":"u64"},{"name":"buyback_fee_basis_points","type":"u64"},{"name":"buyback_fee","type":"u64"}]}},{"name":"ClaimCashbackEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed","type":"u64"},{"name":"total_cashback_earned","type":"u64"}]}},{"name":"ClaimTokenIncentivesEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"amount","type":"u64"},{"name":"timestamp","type":"i64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"}]}},{"name":"CloseUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"}]}},{"name":"CollectCoinCreatorFeeEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"coin_creator","type":"pubkey"},{"name":"coin_creator_fee","type":"u64"},{"name":"coin_creator_vault_ata","type":"pubkey"},{"name":"coin_creator_token_account","type":"pubkey"}]}},{"name":"ConfigStatus","type":{"kind":"enum","variants":[{"name":"Paused"},{"name":"Active"}]}},{"name":"CreateConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee_recipients","type":{"array":["pubkey",8]}},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"admin_set_coin_creator_authority","type":"pubkey"}]}},{"name":"CreatePoolEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"index","type":"u16"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"base_mint_decimals","type":"u8"},{"name":"quote_mint_decimals","type":"u8"},{"name":"base_amount_in","type":"u64"},{"name":"quote_amount_in","type":"u64"},{"name":"pool_base_amount","type":"u64"},{"name":"pool_quote_amount","type":"u64"},{"name":"minimum_liquidity","type":"u64"},{"name":"initial_liquidity","type":"u64"},{"name":"lp_token_amount_out","type":"u64"},{"name":"pool_bump","type":"u8"},{"name":"pool","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"coin_creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"}]}},{"name":"DepositEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"lp_token_amount_out","type":"u64"},{"name":"max_base_amount_in","type":"u64"},{"name":"max_quote_amount_in","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"base_amount_in","type":"u64"},{"name":"quote_amount_in","type":"u64"},{"name":"lp_mint_supply","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"user_pool_token_account","type":"pubkey"}]}},{"name":"DisableEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"disable_create_pool","type":"bool"},{"name":"disable_deposit","type":"bool"},{"name":"disable_withdraw","type":"bool"},{"name":"disable_buy","type":"bool"},{"name":"disable_sell","type":"bool"}]}},{"name":"ExtendAccountEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"account","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"current_size","type":"u64"},{"name":"new_size","type":"u64"}]}},{"name":"FeeConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"admin","type":"pubkey"},{"name":"flat_fees","type":{"defined":{"name":"Fees"}}},{"name":"fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}},{"name":"stable_fee_tiers","type":{"vec":{"defined":{"name":"FeeTier"}}}}]}},{"name":"FeeTier","type":{"kind":"struct","fields":[{"name":"market_cap_lamports_threshold","type":"u128"},{"name":"fees","type":{"defined":{"name":"Fees"}}}]}},{"name":"Fees","type":{"kind":"struct","fields":[{"name":"lp_fee_bps","type":"u64"},{"name":"protocol_fee_bps","type":"u64"},{"name":"creator_fee_bps","type":"u64"}]}},{"name":"GlobalConfig","type":{"kind":"struct","fields":[{"name":"admin","docs":["The admin pubkey"],"type":"pubkey"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"disable_flags","docs":["Flags to disable certain functionality","bit 0 - Disable create pool","bit 1 - Disable deposit","bit 2 - Disable withdraw","bit 3 - Disable buy","bit 4 - Disable sell"],"type":"u8"},{"name":"protocol_fee_recipients","docs":["Addresses of the protocol fee recipients"],"type":{"array":["pubkey",8]}},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"admin_set_coin_creator_authority","docs":["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]}},{"name":"is_cashback_enabled","type":"bool"},{"name":"buyback_fee_recipients","type":{"array":["pubkey",8]}},{"name":"buyback_basis_points","type":"u64"}]}},{"name":"GlobalVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"start_time","type":"i64"},{"name":"end_time","type":"i64"},{"name":"seconds_in_a_day","type":"i64"},{"name":"mint","type":"pubkey"},{"name":"total_token_supply","type":{"array":["u64",30]}},{"name":"sol_volumes","type":{"array":["u64",30]}}]}},{"name":"InitUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"payer","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"}]}},{"name":"MigratePoolCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"sharing_config","type":"pubkey"},{"name":"old_coin_creator","type":"pubkey"},{"name":"new_coin_creator","type":"pubkey"}]}},{"name":"OptionBool","type":{"kind":"struct","fields":["bool"]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"pool_bump","type":"u8"},{"name":"index","type":"u16"},{"name":"creator","type":"pubkey"},{"name":"base_mint","type":"pubkey"},{"name":"quote_mint","type":"pubkey"},{"name":"lp_mint","type":"pubkey"},{"name":"pool_base_token_account","type":"pubkey"},{"name":"pool_quote_token_account","type":"pubkey"},{"name":"lp_supply","docs":["True circulating supply without burns and lock-ups"],"type":"u64"},{"name":"coin_creator","type":"pubkey"},{"name":"is_mayhem_mode","type":"bool"},{"name":"is_cashback_coin","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]}}]}},{"name":"SellEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_amount_in","type":"u64"},{"name":"min_quote_amount_out","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"quote_amount_out","type":"u64"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"lp_fee","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"quote_amount_out_without_lp_fee","type":"u64"},{"name":"user_quote_amount_out","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"protocol_fee_recipient","type":"pubkey"},{"name":"protocol_fee_recipient_token_account","type":"pubkey"},{"name":"coin_creator","type":"pubkey"},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"coin_creator_fee","type":"u64"},{"name":"cashback_fee_basis_points","type":"u64"},{"name":"cashback","type":"u64"},{"name":"buyback_fee_basis_points","type":"u64"},{"name":"buyback_fee","type":"u64"}]}},{"name":"SetBondingCurveCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"bonding_curve","type":"pubkey"},{"name":"coin_creator","type":"pubkey"}]}},{"name":"SetMetaplexCoinCreatorEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"base_mint","type":"pubkey"},{"name":"pool","type":"pubkey"},{"name":"metadata","type":"pubkey"},{"name":"coin_creator","type":"pubkey"}]}},{"name":"Shareholder","type":{"kind":"struct","fields":[{"name":"address","type":"pubkey"},{"name":"share_bps","type":"u16"}]}},{"name":"SharingConfig","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"version","type":"u8"},{"name":"status","type":{"defined":{"name":"ConfigStatus"}}},{"name":"mint","type":"pubkey"},{"name":"admin","type":"pubkey"},{"name":"admin_revoked","type":"bool"},{"name":"shareholders","type":{"vec":{"defined":{"name":"Shareholder"}}}}]}},{"name":"SyncUserVolumeAccumulatorEvent","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"total_claimed_tokens_before","type":"u64"},{"name":"total_claimed_tokens_after","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"UpdateAdminEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"new_admin","type":"pubkey"}]}},{"name":"UpdateFeeConfigEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"admin","type":"pubkey"},{"name":"lp_fee_basis_points","type":"u64"},{"name":"protocol_fee_basis_points","type":"u64"},{"name":"protocol_fee_recipients","type":{"array":["pubkey",8]}},{"name":"coin_creator_fee_basis_points","type":"u64"},{"name":"admin_set_coin_creator_authority","type":"pubkey"}]}},{"name":"UserVolumeAccumulator","type":{"kind":"struct","fields":[{"name":"user","type":"pubkey"},{"name":"needs_claim","type":"bool"},{"name":"total_unclaimed_tokens","type":"u64"},{"name":"total_claimed_tokens","type":"u64"},{"name":"current_sol_volume","type":"u64"},{"name":"last_update_timestamp","type":"i64"},{"name":"has_total_claimed_tokens","type":"bool"},{"name":"cashback_earned","type":"u64"},{"name":"total_cashback_claimed","type":"u64"}]}},{"name":"WithdrawEvent","type":{"kind":"struct","fields":[{"name":"timestamp","type":"i64"},{"name":"lp_token_amount_in","type":"u64"},{"name":"min_base_amount_out","type":"u64"},{"name":"min_quote_amount_out","type":"u64"},{"name":"user_base_token_reserves","type":"u64"},{"name":"user_quote_token_reserves","type":"u64"},{"name":"pool_base_token_reserves","type":"u64"},{"name":"pool_quote_token_reserves","type":"u64"},{"name":"base_amount_out","type":"u64"},{"name":"quote_amount_out","type":"u64"},{"name":"lp_mint_supply","type":"u64"},{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"user_base_token_account","type":"pubkey"},{"name":"user_quote_token_account","type":"pubkey"},{"name":"user_pool_token_account","type":"pubkey"}]}}]} \ No newline at end of file diff --git a/idls/pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json b/idls/pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json new file mode 100644 index 0000000..3230b1d --- /dev/null +++ b/idls/pumpup.PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd.json @@ -0,0 +1 @@ +{"address":"PdMDrKEMaX8q7CCJb7NvUCxerBCcsFUa4LjBEynTtEd","metadata":{"name":"pumpup","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"add_liquidity","discriminator":[181,157,89,67,143,182,52,72],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_vault","docs":["CHECK"],"writable":true},{"name":"token_b_vault","docs":["CHECK"],"writable":true},{"name":"lp_mint","docs":["CHECK"],"writable":true},{"name":"user_token_a","writable":true},{"name":"user_token_b","writable":true},{"name":"user_lp_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"token_a_amount","type":"u64"},{"name":"token_b_amount","type":"u64"},{"name":"minimum_lp_tokens","type":"u64"}]},{"name":"buy","discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pumpup_fee","writable":true},{"name":"user_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"token_amount","type":"u64"},{"name":"max_sol_amount","type":"u64"}]},{"name":"create","discriminator":[24,30,200,40,5,28,7,119],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"create_leverage","discriminator":[71,62,173,225,174,65,205,227],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"feed","discriminator":[46,213,237,176,190,113,182,94],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"original","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,111,114,105,103,105,110,97,108,46,100,97,116,97]},{"kind":"account","path":"mint"}]}},{"name":"migration_address","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"datas","type":{"array":["f64",33]}}]},{"name":"inference","discriminator":[1,249,84,211,187,82,82,51],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"original","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,111,114,105,103,105,110,97,108,46,100,97,116,97]},{"kind":"account","path":"mint"}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"migration_address","writable":true,"signer":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":"period","type":"u64"}]},{"name":"init_ai_token","discriminator":[195,26,226,86,175,143,32,58],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize","discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"config","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"fee_address","docs":["CHECK"],"writable":true},{"name":"migration_address","docs":["CHECK"],"writable":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"authority_address","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"fee_rate","type":"u64"}]},{"name":"initialize_divide","discriminator":[82,21,35,146,161,99,102,28],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_b_mint"},{"name":"fee_address"},{"name":"fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_address"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_b_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"fee_rate","type":"u16"}]},{"name":"initialize_lp_token","discriminator":[124,21,221,232,250,37,120,35],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"lp_mint","docs":["LP代币Mint账户 - 用于铸造流动性提供者代币"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,108,112,95,109,105,110,116]},{"kind":"account","path":"pool"}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"initialize_pool","discriminator":[95,180,10,172,84,174,232,40],"accounts":[{"name":"pool","docs":["新的流动性池账户"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"token_a_mint"},{"kind":"account","path":"token_b_mint"}]}},{"name":"token_a_mint","docs":["代币A的Mint账户"]},{"name":"token_b_mint","docs":["代币B的Mint账户(USDT)"]},{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"fee_address"},{"name":"fee_recipient","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_address"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_b_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"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":"initialize_tokena","discriminator":[209,97,45,4,27,32,11,205],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_mint","docs":["代币Mint账户"]},{"name":"token_a_vault","docs":["代币的保险库账户 - 存储池中的对应代币A"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"token_a_mint"}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"initialize_tokenb","discriminator":[218,101,38,193,111,170,244,254],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_b_mint","docs":["代币B的Mint账户(USDT)"]},{"name":"token_b_vault","docs":["代币的保险库账户 - 存储池中的对应代币A"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"token_b_mint"}]}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"migrate_pool","discriminator":[55,170,171,123,210,69,39,172],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_b_mint"},{"name":"fee_address2"},{"name":"fee_recipient2","writable":true,"pda":{"seeds":[{"kind":"account","path":"fee_address2"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_b_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"payer","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[]},{"name":"quick_create","discriminator":[127,6,145,127,36,205,4,225],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"quick_create_leverage","discriminator":[24,2,81,246,97,77,131,127],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"mint","writable":true,"signer":true},{"name":"mint_authority","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,109,105,110,116,95,97,117,116,104,111,114,105,116,121]}]}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","writable":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","address":"11111111111111111111111111111111"},{"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":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]},{"name":"remove_liquidity","docs":["移除流动性"],"discriminator":[80,85,209,72,24,206,177,108],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_a_mint","account":"Pool"}]}},{"name":"token_b_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,108,112,95,109,105,110,116]},{"kind":"account","path":"pool"}]}},{"name":"user_token_a","writable":true},{"name":"user_token_b","writable":true},{"name":"user_lp_token","writable":true},{"name":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"minimum_token_a","type":"u64"},{"name":"minimum_token_b","type":"u64"}]},{"name":"sell","discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint"},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pumpup_fee","writable":true},{"name":"user_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"user"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"user","writable":true,"signer":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"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":"token_amount","type":"u64"},{"name":"min_sol_amount","type":"u64"}]},{"name":"swap","discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,112,111,111,108]},{"kind":"account","path":"pool.token_a_mint","account":"Pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"token_a_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_a_mint","account":"Pool"}]}},{"name":"token_b_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,114,119,97,46,118,97,117,108,116]},{"kind":"account","path":"pool"},{"kind":"account","path":"pool.token_b_mint","account":"Pool"}]}},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"fee_recipient_token","writable":true},{"name":"fee_recipient_token2","writable":true},{"name":"user","writable":true,"signer":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"withdraw","discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"config","pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,99,111,110,102,105,103]}]}},{"name":"mint","writable":true},{"name":"pool_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool_sol_account"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool_sol_account","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,117,109,112,117,112,46,112,111,111,108]},{"kind":"account","path":"mint"}]}},{"name":"ai_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"config"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pumpup_fee","writable":true},{"name":"to_sol_account","writable":true,"signer":true},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"launch_account","writable":true},{"name":"launch_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"launch_account"},{"kind":"account","path":"token_program"},{"kind":"account","path":"mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"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":"pumpup_migration_amount","type":"u64"}]}],"accounts":[{"name":"AIOriginalDataAccount","discriminator":[125,158,65,141,197,244,39,160]},{"name":"BondingCurve","discriminator":[23,183,248,55,96,216,172,96]},{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"PumpupConfiguration","discriminator":[36,175,125,65,27,3,84,217]}],"events":[{"name":"CreateMintEvent","discriminator":[239,193,191,44,156,194,85,141]},{"name":"FeedEvent","discriminator":[250,174,105,83,244,245,23,11]},{"name":"MintLeverageEvent","discriminator":[64,149,175,150,7,170,9,69]},{"name":"RWAInitEvent","discriminator":[171,102,39,251,156,173,88,8]},{"name":"RWATradeEvent","discriminator":[163,38,91,101,120,148,151,90]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]}],"errors":[{"code":6000,"name":"InvalidAmount","msg":"Invalid amount provided"},{"code":6001,"name":"InvalidFeeRecipient","msg":"Invalid fee recipient"},{"code":6002,"name":"InsufficientLiquidity","msg":"Insufficient liquidity in the pool"},{"code":6003,"name":"SlippageExceeded","msg":"Slippage tolerance exceeded"},{"code":6004,"name":"InvalidTokenMint","msg":"Invalid token mint"},{"code":6005,"name":"DuplicateTokens","msg":"Duplicate tokens"},{"code":6006,"name":"InvalidTokenAVault","msg":"Invalid token_a_vault account"},{"code":6007,"name":"InvalidTokenBVault","msg":"Invalid token_b_vault account"},{"code":6008,"name":"InvalidLpMint","msg":"Invalid lp_mint account"},{"code":6009,"name":"PoolPaused","msg":"Pool is paused"},{"code":6010,"name":"Unauthorized","msg":"Unauthorized access"},{"code":6011,"name":"InvalidFeeRate","msg":"Invalid fee rate"},{"code":6012,"name":"PoolAlreadyExists","msg":"Pool already exists"},{"code":6013,"name":"MathOverflow","msg":"Mathematical overflow"},{"code":6014,"name":"InvalidLpTokenAmount","msg":"Invalid LP token amount"},{"code":6015,"name":"MinimumLiquidityNotMet","msg":"Minimum liquidity not met"},{"code":6016,"name":"TokenBMustBeUsdt","msg":"Token B must be USDT"},{"code":6017,"name":"InvalidPayer","msg":"Invalid payer"}],"types":[{"name":"AIOriginalDataAccount","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"period","type":"u64"},{"name":"period_done","type":"bool"},{"name":"regulated","type":"bool"},{"name":"sol","type":"f64"},{"name":"datas","type":{"array":["f64",42]}}]}},{"name":"BondingCurve","type":{"kind":"struct","fields":[{"name":"launch_token_surplus","type":"u64"},{"name":"virtual_sol","type":"u64"},{"name":"real_sol","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"},{"name":"current_leverage_index","type":"u8"},{"name":"leverage","type":{"vec":{"array":["u64",3]}}}]}},{"name":"CreateMintEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"},{"name":"pool_sol_address","type":"pubkey"},{"name":"pool_token_address","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"launch_token_surplus","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"},{"name":"is_leverage","type":"bool"}]}},{"name":"FeedEvent","type":{"kind":"struct","fields":[{"name":"period","type":"u64"}]}},{"name":"InitProgress","type":{"kind":"enum","variants":[{"name":"START"},{"name":"COMPLETED"}]}},{"name":"MintLeverageEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"period","type":"u64"},{"name":"regulated","type":"bool"},{"name":"timestamp","type":"i64"},{"name":"launch_token_surplus","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"},{"name":"leverage","type":{"vec":{"array":["u64",3]}}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"token_a_mint","docs":["代币A的mint地址"],"type":"pubkey"},{"name":"token_b_mint","docs":["代币B的mint地址(USDT)"],"type":"pubkey"},{"name":"token_a_vault","docs":["代币A金库账户"],"type":"pubkey"},{"name":"token_b_vault","docs":["代币B金库账户"],"type":"pubkey"},{"name":"lp_mint","docs":["LP代币mint"],"type":"pubkey"},{"name":"fee_recipient","docs":["手续费接收地址"],"type":"pubkey"},{"name":"token_a_reserve","docs":["代币A储备量"],"type":"u64"},{"name":"token_b_reserve","docs":["代币B储备量"],"type":"u64"},{"name":"lp_token_supply","docs":["LP代币总供应量"],"type":"u64"},{"name":"fee_rate","docs":["手续费率(基点,100=1%)"],"type":"u16"},{"name":"bump","docs":["PDA bump"],"type":"u8"},{"name":"fee_recipient2","type":"pubkey"},{"name":"fee_rate2","docs":["分润比(基点,100=1%)"],"type":"u16"}]}},{"name":"PumpupConfiguration","serialization":"bytemuckunsafe","repr":{"kind":"rust","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"fee_rate","type":"u64"},{"name":"authority_address","type":"pubkey"},{"name":"fee_address","type":"pubkey"},{"name":"migration_address","type":"pubkey"}]}},{"name":"RWAInitEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"init_progress","type":{"defined":{"name":"InitProgress"}}},{"name":"token_a_mint","type":"pubkey"},{"name":"token_b_mint","type":"pubkey"},{"name":"token_a_vault","type":"pubkey"},{"name":"token_b_vault","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"lp_mint","type":"pubkey"},{"name":"fee_recipient","type":"pubkey"},{"name":"token_a_reserve","type":"u64"},{"name":"token_b_reserve","type":"u64"},{"name":"lp_token_supply","type":"u64"},{"name":"fee_rate","type":"u16"}]}},{"name":"RWATradeEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"event_type","type":{"defined":{"name":"TradeEventType"}}},{"name":"token_a_mint","type":"pubkey"},{"name":"token_a_amount","type":"u64"},{"name":"token_b_mint","type":"pubkey"},{"name":"token_b_amount","type":"u64"},{"name":"fee_amount","type":"u64"},{"name":"user","type":"pubkey"},{"name":"pool_tokena_reserves","type":"u64"},{"name":"pool_tokenb_reserves","type":"u64"},{"name":"timestamp","type":"i64"}]}},{"name":"TradeEvent","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"sol_amount","type":"u64"},{"name":"token_amount","type":"u64"},{"name":"ai_token_amount","type":"u64"},{"name":"event_type","type":{"defined":{"name":"TradeEventType"}}},{"name":"user","type":"pubkey"},{"name":"timestamp","type":"i64"},{"name":"pumpup_fee","type":"u64"},{"name":"pool_real_sol_amount","type":"u64"},{"name":"pool_sol_reserves","type":"u64"},{"name":"pool_token_reserves","type":"u64"}]}},{"name":"TradeEventType","type":{"kind":"enum","variants":[{"name":"BUY"},{"name":"SELL"},{"name":"WITHDRAW"},{"name":"RwaBuy"},{"name":"RwaSell"}]}}]} \ No newline at end of file diff --git a/idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json b/idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json new file mode 100644 index 0000000..de07bf6 --- /dev/null +++ b/idls/raydium_clmm.CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK.json @@ -0,0 +1 @@ +{"address":"CAMMCzo5YL8w4VFF8KVHrK22GGUsp5VTaW7grrKgrWqK","metadata":{"name":"raydium_clmm","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Raydium concentrated liquidity AMM"},"instructions":[{"name":"close_limit_order","docs":["Close a limit order","Closes the limit order account when unfilled amount is zero","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[76,124,128,15,213,87,37,250],"accounts":[{"name":"signer","signer":true},{"name":"rent_receiver","writable":true},{"name":"limit_order","writable":true}],"args":[]},{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"close_protocol_position","docs":["The CLMM protocol decides to discard the protocol position account, which can reduce users' opening costs.","After the original protocol position account is closed, the gas fee will be refunded to the user who created it.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[201,117,152,144,85,85,108,178],"accounts":[{"name":"admin","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"protocol_position","writable":true}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or config owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"],"writable":true},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx` - The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.","* `limit_fee_rate` - The rate of limit order fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_customizable_pool","docs":["Creates a pool for the given token pair with customizable parameters","","# Arguments","","* `ctx` - The context of accounts","* `customizable_params` - the customizable parameters",""],"discriminator":[43,68,212,167,89,47,164,1],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"customizable_params","type":{"defined":{"name":"CreateCustomizableParams"}}}]},{"name":"create_dynamic_fee_config","docs":["Create dynamic fee config","","# Arguments","","* `ctx` - The context of accounts","* `index` - The index of dynamic fee config","* `filter_period` - The period of filter","* `decay_period` - The period of decay","* `reduction_factor` - The reduction factor","* `adaptive_fee_control_factor` - The adaptive fee control factor","* `max_volatility_accumulator` - The max volatility accumulator","* `tick_group_size` - The tick group size"],"discriminator":[189,14,181,120,85,118,227,62],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"dynamic_fee_config","writable":true,"pda":{"seeds":[{"kind":"const","value":[100,121,110,97,109,105,99,95,102,101,101,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"dynamic_fee_control","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx` - The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards while ignoring unsupported extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_limit_order","docs":["Decrease/Cancel a limit order","First settle the filled portion of the order; only the remaining unfilled amount can be decreased.","Even if the specified amount is very large, the decrease will not exceed the remaining unfilled order amount.","It is recommended to call the `settle_limit_order` instruction before invoking this instruction to settle any filled portions of the order.","Make sure to check your order's remaining unfilled amount.","# Arguments","","* `ctx` - The context of accounts","* `amount` - The decrease amount of the order,","* `amount_min` - The minimum amount of the order, which serves as a slippage check",""],"discriminator":[117,157,60,103,66,49,163,0],"accounts":[{"name":"owner","signer":true},{"name":"pool_state","writable":true},{"name":"tick_array","writable":true},{"name":"limit_order","writable":true},{"name":"input_token_account","docs":["The payer's limit order token account"],"writable":true},{"name":"output_token_account","docs":["The owner's output token account (opposite direction from input)"],"writable":true},{"name":"input_vault","docs":["The address that holds limit order token"],"writable":true},{"name":"output_vault","docs":["The address that holds output tokens"],"writable":true},{"name":"input_vault_mint","docs":["The mint of token vault"]},{"name":"output_vault_mint","docs":["The mint of output vault"]},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount","type":"u64"},{"name":"amount_min","type":"u64"}]},{"name":"decrease_liquidity","docs":["#[deprecated(note = \"Use `decrease_liquidity_v2` instead.\")]","Decreases liquidity for an existing position","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[160,38,208,111,104,91,44,1],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"increase_limit_order","docs":["Increase a limit order","","# Arguments","","* `ctx` - The context of accounts","* `amount` - The increase amount of the order","* `is_increase` - The direction of the order, true: increase, false: decrease",""],"discriminator":[177,144,89,236,250,186,125,99],"accounts":[{"name":"owner","signer":true},{"name":"pool_state"},{"name":"tick_array","writable":true},{"name":"limit_order","writable":true},{"name":"input_token_account","docs":["The payer's limit order token account"],"writable":true},{"name":"input_vault","docs":["The address that holds limit order token"],"writable":true},{"name":"input_vault_mint","docs":["The mint of token vault"]},{"name":"input_token_program","docs":["SPL-TOKEN / SPL-TOKEN2022 program for token transfers"]}],"args":[{"name":"amount","type":"u64"}]},{"name":"increase_liquidity","docs":["#[deprecated(note = \"Use `increase_liquidity_v2` instead.\")]","Increases liquidity for an existing position, with amount paid by `payer`","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, can't be zero","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[46,156,243,118,13,205,251,178],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - must be specified if liquidity is zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_limit_order","docs":["Place a limit order","# Arguments","","* `ctx` - The context of accounts","* `nonce_index` - The limit order nonce account index, used to create user's order nonce PDA account.","* `zero_for_one` - The direction of the order, true: zero for one, false: one for zero","* `tick_index` - The index of the tick","* `amount` - The amount of the order","* `with_metadata` - The flag indicating whether to create NFT mint metadata",""],"discriminator":[157,32,218,183,71,29,18,147],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"pool_state","docs":["The pool"],"writable":true},{"name":"tick_array","writable":true},{"name":"limit_order_nonce","docs":["The order nonce account PDA"],"writable":true},{"name":"limit_order","docs":["The order account PDA"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"account","path":"limit_order_nonce"},{"kind":"account","path":"limit_order_nonce.order_nonce","account":"LimitOrderNonce"}]}},{"name":"input_token_account","docs":["The payer's limit order token account"],"writable":true},{"name":"input_vault","docs":["The address that holds limit order token"],"writable":true},{"name":"input_vault_mint","docs":["The mint of token vault"]},{"name":"input_token_program","docs":["SPL-TOKEN / SPL-TOKEN2022 program for input token transfers"]},{"name":"system_program","docs":["SPL program for system operations"],"address":"11111111111111111111111111111111"}],"args":[{"name":"nonce_index","type":"u8"},{"name":"zero_for_one","type":"bool"},{"name":"tick_index","type":"i32"},{"name":"amount","type":"u64"}]},{"name":"open_position","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which includes tick low","* `tick_array_upper_start_index` - The start index of tick array which includes tick upper","* `liquidity` - The liquidity to be added","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check",""],"discriminator":[135,128,47,77,15,152,240,49],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted","This account created in the contract by cpi to avoid large stack variables"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"}]},{"name":"open_position_v2","docs":["#[deprecated(note = \"Use `open_position_with_token22_nft` instead.\")]","Creates a new position wrapped in a NFT, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which includes tick low","* `tick_array_upper_start_index` - The start index of tick array which includes tick upper","* `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","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,184,74,214,112,86,241,199],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address"],"writable":true,"signer":true},{"name":"position_nft_account","docs":["Token account where position NFT will be minted"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"position_nft_owner"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"position_nft_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"metadata_account","docs":["To store metaplex metadata"],"writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"metadata_program","docs":["Program to create NFT metadata"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program_2022","docs":["Program to create mint account and mint tokens"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which includes tick low","* `tick_array_upper_start_index` - The start index of tick array which includes tick upper","* `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","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"settle_limit_order","docs":["Settle a limit order","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[205,78,116,33,92,105,26,96],"accounts":[{"name":"signer","signer":true},{"name":"pool_state"},{"name":"tick_array"},{"name":"limit_order","writable":true},{"name":"output_token_account","docs":["The owner's output token account (opposite direction from input)"],"writable":true},{"name":"output_vault","docs":["The address that holds output tokens"],"writable":true},{"name":"output_vault_mint","docs":["The mint of output vault"]},{"name":"output_token_program","docs":["SPL-TOKEN / SPL-TOKEN2022 program for token transfers"]}],"args":[]},{"name":"swap","docs":["#[deprecated(note = \"Use `swap_v2` instead.\")]","Swaps one token for as much as possible of another token across a single pool","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"tick_array","writable":true}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"swap_router_base_in","docs":["Swap token for as much as possible of another token across the path provided, base input","","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Token amount to be swapped in","* `amount_out_minimum` - Panic if output amount is below minimum amount. For slippage.",""],"discriminator":[69,125,115,218,245,186,242,196],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"input_token_account","docs":["The token account that pays input tokens for the swap"],"writable":true},{"name":"input_token_mint","docs":["The mint of input token"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount_in","type":"u64"},{"name":"amount_out_minimum","type":"u64"}]},{"name":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx` - The context of accounts","* `new_owner` - new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx` - The context of accounts","* `trade_fee_rate` - The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate` - The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate` - The new fund fee rate of amm config, be set when `param` is 2","* `new_owner` - The config's new owner, be set when `param` is 3","* `new_fund_owner` - The config's new fund owner, be set when `param` is 4","* `limit_protocol_fee_rate` - The new limit protocol fee rate of amm config, be set when `param` is 5","* `limit_fund_fee_rate` - The new limit fund fee rate of amm config, be set when `param` is 6","* `param` - The value can be 0 | 1 | 2 | 3 | 4 | 5 | 6, otherwise will report an error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_dynamic_fee_config","docs":["Updates the dynamic fee configuration constants.","","This function allows updating the parameters that control dynamic fee calculation,","such as filter period, decay period, reduction factor, fee control factor, etc.","Only the admin or the amm config owner can update these settings.","","# Arguments","","* `ctx` - The context of accounts","* `filter_period` - Period that determines the high frequency trading time window (in seconds)","* `decay_period` - Period that determines when the dynamic fee starts to decrease (in seconds)","* `reduction_factor` - Dynamic fee rate decrement rate, used for volatility reference decay","* `dynamic_fee_control` - Factor used to scale the dynamic fee component","* `max_volatility_accumulator` - Maximum value for the volatility accumulator","* `create_pool_authority` - The new authority pubkey that can use this dynamic fee config to create pools"],"discriminator":[7,7,80,8,2,199,132,240],"accounts":[{"name":"owner","docs":["The admin has permission to update the config"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"dynamic_fee_config","docs":["The dynamic fee config account to be updated"],"writable":true}],"args":[{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"dynamic_fee_control","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx` - The context of accounts","* `param` - The value can be 0 | 1 | 2 | 3, otherwise will report an error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx` - The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"DynamicFeeConfig","discriminator":[244,226,88,82,14,59,246,220]},{"name":"LimitOrderNonce","discriminator":[17,153,236,57,25,199,231,248]},{"name":"LimitOrderState","discriminator":[1,238,5,142,207,62,44,228]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]},{"name":"TickArrayState","discriminator":[192,155,85,205,49,249,129,42]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLimitOrderEvent","discriminator":[70,48,40,221,219,237,212,163]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLimitOrderEvent","discriminator":[11,120,13,204,199,87,19,200]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"OpenLimitOrderEvent","discriminator":[106,24,71,85,57,169,158,216]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SettleLimitOrderEvent","discriminator":[88,119,77,164,125,124,10,194]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"NotApproved","msg":"Not approved"},{"code":6001,"name":"InvalidUpdateConfigFlag","msg":"invalid update amm config flag"},{"code":6002,"name":"AccountLack","msg":"Account lack"},{"code":6003,"name":"ClosePositionErr","msg":"Remove liquidity, collect fees owed and reward then you can close position account"},{"code":6004,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6005,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6006,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6007,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6008,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6009,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6010,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6011,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6012,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6013,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6014,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6015,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6016,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6017,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6018,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6019,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6020,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6021,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6022,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6023,"name":"NotEnoughTickArrayAccount","msg":"Not enough tick array account"},{"code":6024,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6025,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6026,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6027,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6028,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6029,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6030,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6031,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6032,"name":"NotApproveUpdateRewardEmissions","msg":"Modification of emissions is allowed within 72 hours from the end of the previous cycle"},{"code":6033,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6034,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6035,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6036,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6037,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6038,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6039,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6040,"name":"OrderAlreadyFilled","msg":"Order already fully filled, cannot modify"},{"code":6041,"name":"InvalidOrderPhase","msg":"Invalid order phase"},{"code":6042,"name":"InvalidLimitOrderAmount","msg":"Invalid limit order amount"},{"code":6043,"name":"OrderPhaseSaturated","msg":"Tick order phase saturated"},{"code":6044,"name":"InvalidDynamicFeeConfigParams","msg":"Invalid dynamic fee config params"},{"code":6045,"name":"InvalidFeeOn","msg":"Invalid fee on which token (must be 0, 1, or 2)"},{"code":6046,"name":"ZeroSqrtPrice","msg":"sqrt_price_x64 must be greater than 0"},{"code":6047,"name":"ZeroLiquidity","msg":"liquidity must be greater than 0"},{"code":6048,"name":"MissingBaseFlag","msg":"base_flag is required when liquidity is zero"},{"code":6049,"name":"MissingMintAccount","msg":"Mint account is required but not provided"},{"code":6050,"name":"MissingTokenProgram2022","msg":"Token-2022 program is required but not provided"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","docs":["The fund owner"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectFeeOn","type":{"kind":"enum","variants":[{"name":"FromInput"},{"name":"Token0Only"},{"name":"Token1Only"}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreateCustomizableParams","type":{"kind":"struct","fields":[{"name":"sqrt_price_x64","type":"u128"},{"name":"collect_fee_on","type":{"defined":{"name":"CollectFeeOn"}}},{"name":"enable_dynamic_fee","type":"bool"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"DecreaseLimitOrderEvent","type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was decreased"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"filled_amount","docs":["Filled amount of the limit order"],"type":"u64"},{"name":"settled_output_amount","docs":["Amount of output tokens settled (excluding fees)"],"type":"u64"},{"name":"decreased_amount","docs":["Amount of input tokens returned to user"],"type":"u64"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"DynamicFeeConfig","type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"filter_period","type":"u16"},{"name":"decay_period","type":"u16"},{"name":"reduction_factor","type":"u16"},{"name":"dynamic_fee_control","type":"u32"},{"name":"max_volatility_accumulator","type":"u32"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"DynamicFeeInfo","docs":["Dynamic fee information for pool configuration"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"filter_period","docs":["Period that determines the high frequency trading time window (in seconds)."],"type":"u16"},{"name":"decay_period","docs":["Period that determines when the dynamic fee starts to decrease (in seconds)."],"type":"u16"},{"name":"reduction_factor","docs":["Dynamic fee rate decrement rate, used for volatility reference decay."],"type":"u16"},{"name":"dynamic_fee_control","docs":["Factor used to scale the dynamic fee component in the fee rate calculation."],"type":"u32"},{"name":"max_volatility_accumulator","docs":["Maximum value for the volatility accumulator, used to cap the dynamic fee rate."],"type":"u32"},{"name":"tick_spacing_index_reference","docs":["Active tick spacing index at the last reference update."],"type":"i32"},{"name":"volatility_reference","docs":["Volatility reference value, stores the decayed volatility accumulator."],"type":"u32"},{"name":"volatility_accumulator","docs":["Volatility accumulator, used to calculate the dynamic fee rate."],"type":"u32"},{"name":"last_update_timestamp","docs":["Last timestamp (block time) when `volatility_reference` and `tick_spacing_index_reference` were updated."],"type":"u64"},{"name":"padding","docs":["Reserved for future upgrades."],"type":{"array":["u8",46]}}]}},{"name":"IncreaseLimitOrderEvent","type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was increased"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"increased_amount","docs":["Increased amount of the limit order"],"type":"u64"},{"name":"transfer_fee","docs":["Transfer fee of the limit order"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LimitOrderNonce","type":{"kind":"struct","fields":[{"name":"user_wallet","type":"pubkey"},{"name":"nonce_index","type":"u8"},{"name":"order_nonce","type":"u64"},{"name":"padding","type":{"array":["u64",4]}}]}},{"name":"LimitOrderState","type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"owner","docs":["Owner of this limit order"],"type":"pubkey"},{"name":"tick_index","type":"i32"},{"name":"zero_for_one","type":"bool"},{"name":"order_phase","docs":["Order phase of this limit order, aligned with `TickState.order_phase` for FIFO semantics"],"type":"u64"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"filled_amount","docs":["Filled amount of the limit order (informational, for events/display)"],"type":"u64"},{"name":"settle_base","docs":["The unfilled amount when the current computation segment started.","Set to total_amount on open, reset on decrease. Never updated during settle —","this avoids cascading floor-division error across multiple settles."],"type":"u64"},{"name":"settled_output","docs":["Cumulative output paid to user in the current segment. Reset on decrease.","Each settle computes total_output from the segment base and pays the diff","(total_output - settled_output), limiting dust deduction to once per segment."],"type":"u64"},{"name":"open_time","docs":["Order open time"],"type":"u64"},{"name":"unfilled_ratio_x64","docs":["Snapshot of `TickState.unfilled_ratio_x64` at the time this segment started (Q64.64).","Initialized to Q64 on open; reset to tick's current ratio on decrease."],"type":"u128"},{"name":"padding","type":{"array":["u64",4]}}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OpenLimitOrderEvent","docs":["Emitted when a limit order is opened"],"type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was opened"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"transfer_fee","docs":["Transfer fee of the limit order"],"type":"u64"}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"padding5","type":{"array":["u128",4]}},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal","bit5, 1: disable limit order, 0: normal"],"type":"u8"},{"name":"fee_on","docs":["Fee on which token (0 = FromInput, 1 = Token0Only, 2 = Token1Only)"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",6]}},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"padding6","type":{"array":["u64",4]}},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"dynamic_fee_info","docs":["Dynamic fee info"],"type":{"defined":{"name":"DynamicFeeInfo"}}},{"name":"padding1","type":{"array":["u64",14]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emitted","docs":["The total amount of reward emitted"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SettleLimitOrderEvent","docs":["Emitted when a limit order is settled and proceeds are transferred"],"type":{"kind":"struct","fields":[{"name":"pool_id","docs":["The pool whose limit order was settled"],"type":"pubkey"},{"name":"limit_order","docs":["The limit order account"],"type":"pubkey"},{"name":"zero_for_one","docs":["Direction of the limit order (true if zero_for_one)"],"type":"bool"},{"name":"tick_index","docs":["Tick index of the limit order"],"type":"i32"},{"name":"total_amount","docs":["Total amount of the limit order"],"type":"u64"},{"name":"filled_amount","docs":["Filled amount of the limit order"],"type":"u64"},{"name":"settled_amount_out","docs":["Amount of output tokens transferred (excluding fees)"],"type":"u64"}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"},{"name":"trade_fee_0","docs":["Total AMM trade fee (lp + protocol + fund) charged in token_0 during this swap"],"type":"u64"},{"name":"trade_fee_1","docs":["Total AMM trade fee (lp + protocol + fund) charged in token_1 during this swap"],"type":"u64"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"TickArrayState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"TickState"}},60]}},{"name":"initialized_tick_count","type":"u8"},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u8",107]}}]}},{"name":"TickState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"tick","type":"i32"},{"name":"liquidity_net","docs":["Amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)"],"type":"i128"},{"name":"liquidity_gross","docs":["The total position liquidity that references this tick"],"type":"u128"},{"name":"fee_growth_outside_0_x64","docs":["Fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)","only has relative meaning, not absolute — the value depends on when the tick is initialized"],"type":"u128"},{"name":"fee_growth_outside_1_x64","type":"u128"},{"name":"reward_growths_outside_x64","docs":["Reward growth per unit of liquidity like fee, array of Q64.64"],"type":{"array":["u128",3]}},{"name":"order_phase","docs":["Order phase of the tick, used as a FIFO cohort index for limit orders"],"type":"u64"},{"name":"orders_amount","docs":["The amount of limit orders that have never been matched,","only counts newly opened orders, not partially filled ones"],"type":"u64"},{"name":"part_filled_orders_remaining","docs":["Remaining part filled orders amount"],"type":"u64"},{"name":"unfilled_ratio_x64","docs":["Cumulative unfilled ratio for the current part-filled cohort (Q64.64 format).","Starts at Q64(1) when a new cohort forms, multiplied down as fills occur."],"type":"u128"},{"name":"padding","type":{"array":["u32",3]}}]}},{"name":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json b/idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json new file mode 100644 index 0000000..8499ebe --- /dev/null +++ b/idls/raydium_cpmm.CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C.json @@ -0,0 +1 @@ +{"address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C","metadata":{"name":"raydium_cp_swap","version":"0.2.0","spec":"0.1.0","description":"Raydium constant product AMM, supports Token2022 and without Openbook"},"instructions":[{"name":"close_permission_pda","docs":["Close a permission account","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[156,84,32,118,69,135,70,123],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"permission_authority"},{"name":"permission","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110]},{"kind":"account","path":"permission_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_creator_fee","docs":["Collect the creator fee","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[20,22,86,123,198,28,219,132],"accounts":[{"name":"creator","docs":["Only pool creator can collect fee"],"writable":true,"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"creator_token_0","docs":["The address that receives the collected token_0 fund fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"token_0_program"},{"kind":"account","path":"vault_0_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"creator_token_1","docs":["The address that receives the collected token_1 fund fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"token_1_program"},{"kind":"account","path":"vault_1_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 fund fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 fund fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or owner can collect fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"recipient_token_0_account","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_1_account","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of amm config, there may be multiple config.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"trade_fee_rate","type":"u64"},{"name":"protocol_fee_rate","type":"u64"},{"name":"fund_fee_rate","type":"u64"},{"name":"create_pool_fee","type":"u64"},{"name":"creator_fee_rate","type":"u64"}]},{"name":"create_permission_pda","docs":["Create a permission account","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[135,136,2,216,137,169,181,202],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"permission_authority"},{"name":"permission","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110]},{"kind":"account","path":"permission_authority"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"deposit","docs":["Deposit lp token to the pool","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Increased number of LPs","* `maximum_token_0_amount` - Maximum token 0 amount to deposit, prevents excessive slippage","* `maximum_token_1_amount` - Maximum token 1 amount to deposit, prevents excessive slippage",""],"discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"owner","docs":["Pays to mint the position"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","writable":true},{"name":"owner_lp_token","docs":["Owner lp token account"],"writable":true},{"name":"token_0_account","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_1_account","docs":["The payer's token account for token_1"],"writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"lp_mint","docs":["Lp token mint"],"writable":true}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"maximum_token_0_amount","type":"u64"},{"name":"maximum_token_1_amount","type":"u64"}]},{"name":"initialize","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `init_amount_0` - the initial amount_0 to deposit","* `init_amount_1` - the initial amount_1 to deposit","* `open_time` - the timestamp allowed for swap",""],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","docs":["pool vault and lp mint authority"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["PDA account:","seeds = [","POOL_SEED.as_bytes(),","amm_config.key().as_ref(),","token_0_mint.key().as_ref(),","token_1_mint.key().as_ref(),","],","","Or random account: must be signed by cli"],"writable":true},{"name":"token_0_mint","docs":["Token_0 mint, the key must smaller than token_1 mint."]},{"name":"token_1_mint","docs":["Token_1 mint, the key must grater then token_0 mint."]},{"name":"lp_mint","docs":["pool lp mint"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool_state"}]}},{"name":"creator_token_0","docs":["payer token0 account"],"writable":true},{"name":"creator_token_1","docs":["creator token1 account"],"writable":true},{"name":"creator_lp_token","docs":["creator lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}]}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","docs":["an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"init_amount_0","type":"u64"},{"name":"init_amount_1","type":"u64"},{"name":"open_time","type":"u64"}]},{"name":"initialize_with_permission","docs":["Create a pool with permission","","# Arguments","","* `ctx`- The context of accounts","* `init_amount_0` - the initial amount_0 to deposit","* `init_amount_1` - the initial amount_1 to deposit","* `open_time` - the timestamp allowed for swap","* `creator_fee_on` - creator fee model, 0:both token0 and token1 (depends on the input), 1: only token0, 2: only token1",""],"discriminator":[63,55,254,65,49,178,89,121],"accounts":[{"name":"payer","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"creator"},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"authority","docs":["pool vault and lp mint authority"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["PDA account:","seeds = [","POOL_SEED.as_bytes(),","amm_config.key().as_ref(),","token_0_mint.key().as_ref(),","token_1_mint.key().as_ref(),","],","","Or random account: must be signed by cli"],"writable":true},{"name":"token_0_mint","docs":["Token_0 mint, the key must smaller than token_1 mint."]},{"name":"token_1_mint","docs":["Token_1 mint, the key must grater then token_0 mint."]},{"name":"lp_mint","docs":["pool lp mint"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"pool_state"}]}},{"name":"payer_token_0","docs":["payer token0 account"],"writable":true},{"name":"payer_token_1","docs":["payer token1 account"],"writable":true},{"name":"payer_lp_token","docs":["payer lp token account"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"payer"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"lp_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_0_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_0_mint"}]}},{"name":"token_1_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_1_mint"}]}},{"name":"create_pool_fee","docs":["create pool fee account"],"writable":true,"address":"DNXgeM9EiiaAbaWvwjHj9fQQLAX5ZsfHyvmYUNRAdNC8"},{"name":"observation_state","docs":["an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"permission","pda":{"seeds":[{"kind":"const","value":[112,101,114,109,105,115,115,105,111,110]},{"kind":"account","path":"payer"}]}},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_0_program","docs":["Spl token program or token program 2022"]},{"name":"token_1_program","docs":["Spl token program or token program 2022"]},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"}],"args":[{"name":"init_amount_0","type":"u64"},{"name":"init_amount_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"creator_fee_on","type":{"defined":{"name":"CreatorFeeOn"}}}]},{"name":"swap_base_input","docs":["Swap the tokens in the pool base input amount","","# Arguments","","* `ctx`- The context of accounts","* `amount_in` - input amount to transfer, output to DESTINATION is based on the exchange rate","* `minimum_amount_out` - Minimum amount of output token, prevents excessive slippage",""],"discriminator":[143,190,90,218,196,30,51,222],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_base_output","docs":["Swap the tokens in the pool base output amount","","# Arguments","","* `ctx`- The context of accounts","* `max_amount_in` - input amount prevents excessive slippage","* `amount_out` - amount of output token",""],"discriminator":[55,217,98,86,163,74,180,173],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"input_token_program","docs":["SPL program for input token transfers"]},{"name":"output_token_program","docs":["SPL program for output token transfers"]},{"name":"input_token_mint","docs":["The mint of input token"]},{"name":"output_token_mint","docs":["The mint of output token"]},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true}],"args":[{"name":"max_amount_in","type":"u64"},{"name":"amount_out","type":"u64"}]},{"name":"update_amm_config","docs":["Updates the owner of the amm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of amm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of amm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of amm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The amm config owner or admin"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u64"}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"withdraw","docs":["Withdraw lp for token0 and token1","","# Arguments","","* `ctx`- The context of accounts","* `lp_token_amount` - Amount of pool tokens to burn. User receives an output of token a and b based on the percentage of the pool tokens that are returned.","* `minimum_token_0_amount` - Minimum amount of token 0 to receive, prevents excessive slippage","* `minimum_token_1_amount` - Minimum amount of token 1 to receive, prevents excessive slippage",""],"discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"owner","docs":["Pays to mint the position"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state account"],"writable":true},{"name":"owner_lp_token","docs":["Owner lp token account"],"writable":true},{"name":"token_0_account","docs":["The token account for receive token_0,"],"writable":true},{"name":"token_1_account","docs":["The token account for receive token_1"],"writable":true},{"name":"token_0_vault","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_1_vault","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["token Program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token_0 vault"]},{"name":"vault_1_mint","docs":["The mint of token_1 vault"]},{"name":"lp_mint","docs":["Pool lp token mint"],"writable":true},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"lp_token_amount","type":"u64"},{"name":"minimum_token_0_amount","type":"u64"},{"name":"minimum_token_1_amount","type":"u64"}]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"Permission","discriminator":[224,83,28,79,10,253,161,28]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]}],"events":[{"name":"LpChangeEvent","discriminator":[121,163,205,201,57,218,117,60]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]}],"errors":[{"code":6000,"name":"NotApproved","msg":"Not approved"},{"code":6001,"name":"InvalidOwner","msg":"Input account owner is not the program address"},{"code":6002,"name":"EmptySupply","msg":"Input token account empty"},{"code":6003,"name":"InvalidInput","msg":"InvalidInput"},{"code":6004,"name":"IncorrectLpMint","msg":"Address of the provided lp token mint is incorrect"},{"code":6005,"name":"ExceededSlippage","msg":"Exceeds desired slippage limit"},{"code":6006,"name":"ZeroTradingTokens","msg":"Given pool token amount results in zero trading tokens"},{"code":6007,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6008,"name":"InvalidVault","msg":"invaild vault"},{"code":6009,"name":"InitLpAmountTooLess","msg":"Init lp amount is too less(Because 100 amount lp will be locked)"},{"code":6010,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6011,"name":"MathOverflow","msg":"Math overflow"},{"code":6012,"name":"InsufficientVault","msg":"Insufficient vault"},{"code":6013,"name":"InvalidFeeModel","msg":"Invalid fee model"},{"code":6014,"name":"NoFeeCollect","msg":"Fee is zero"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"disable_create_pool","docs":["Status to control if new pool can be create"],"type":"bool"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u64"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"create_pool_fee","docs":["Fee for create a new pool"],"type":"u64"},{"name":"protocol_owner","docs":["Address of the protocol fee owner"],"type":"pubkey"},{"name":"fund_owner","docs":["Address of the fund fee owner"],"type":"pubkey"},{"name":"creator_fee_rate","docs":["The pool creator fee, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"padding","docs":["padding"],"type":{"array":["u64",15]}}]}},{"name":"CreatorFeeOn","type":{"kind":"enum","variants":[{"name":"BothToken"},{"name":"OnlyToken0"},{"name":"OnlyToken1"}]}},{"name":"LpChangeEvent","docs":["Emitted when deposit and withdraw"],"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"lp_amount_before","type":"u64"},{"name":"token_0_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"token_1_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"token_0_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"token_1_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"token_0_transfer_fee","type":"u64"},{"name":"token_1_transfer_fee","type":"u64"},{"name":"change_type","type":"u8"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u64"},{"name":"cumulative_token_0_price_x32","docs":["the cumulative of token0 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"},{"name":"cumulative_token_1_price_x32","docs":["the cumulative of token1 price during the duration time, Q32.32, the remaining 64 bit for overflow"],"type":"u128"}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"Permission","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"authority","docs":["authority"],"type":"pubkey"},{"name":"padding","docs":["padding"],"type":{"array":["u64",30]}}]}},{"name":"PoolState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"amm_config","docs":["Which config the pool belongs"],"type":"pubkey"},{"name":"pool_creator","docs":["pool creator"],"type":"pubkey"},{"name":"token_0_vault","docs":["Token A"],"type":"pubkey"},{"name":"token_1_vault","docs":["Token B"],"type":"pubkey"},{"name":"lp_mint","docs":["Pool tokens are issued when A or B tokens are deposited.","Pool tokens can be withdrawn back to the original A or B token."],"type":"pubkey"},{"name":"token_0_mint","docs":["Mint information for token A"],"type":"pubkey"},{"name":"token_1_mint","docs":["Mint information for token B"],"type":"pubkey"},{"name":"token_0_program","docs":["token_0 program"],"type":"pubkey"},{"name":"token_1_program","docs":["token_1 program"],"type":"pubkey"},{"name":"observation_key","docs":["observation account to store oracle data"],"type":"pubkey"},{"name":"auth_bump","type":"u8"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable deposit(value is 1), 0: normal","bit1, 1: disable withdraw(value is 2), 0: normal","bit2, 1: disable swap(value is 4), 0: normal"],"type":"u8"},{"name":"lp_mint_decimals","type":"u8"},{"name":"mint_0_decimals","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_1_decimals","type":"u8"},{"name":"lp_supply","docs":["True circulating supply without burns and lock ups"],"type":"u64"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the liquidity provider."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","docs":["The timestamp allowed for swap in the pool."],"type":"u64"},{"name":"recent_epoch","docs":["recent epoch"],"type":"u64"},{"name":"creator_fee_on","docs":["Creator fee collect mode","0: both token_0 and token_1 can be used as trade fees. It depends on what the input token is when swapping","1: only token_0 as trade fee","2: only token_1 as trade fee"],"type":"u8"},{"name":"enable_creator_fee","type":"bool"},{"name":"padding1","type":{"array":["u8",6]}},{"name":"creator_fees_token_0","type":"u64"},{"name":"creator_fees_token_1","type":"u64"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",28]}}]}},{"name":"SwapEvent","docs":["Emitted when swap"],"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"input_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"output_vault_before","docs":["pool vault sub trade fees"],"type":"u64"},{"name":"input_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"output_amount","docs":["calculate result without transfer fee"],"type":"u64"},{"name":"input_transfer_fee","type":"u64"},{"name":"output_transfer_fee","type":"u64"},{"name":"base_input","type":"bool"},{"name":"input_mint","type":"pubkey"},{"name":"output_mint","type":"pubkey"},{"name":"trade_fee","type":"u64"},{"name":"creator_fee","docs":["Amount of fee tokens going to creator"],"type":"u64"},{"name":"creator_fee_on_input","type":"bool"}]}}]} \ No newline at end of file diff --git a/idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json b/idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json new file mode 100644 index 0000000..52f4970 --- /dev/null +++ b/idls/raydium_launchlab.LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj.json @@ -0,0 +1 @@ +{"address":"LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj","metadata":{"name":"raydium_launchpad","version":"0.2.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"buy_exact_in","docs":["Use the given amount of quote tokens to purchase base tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Amount of quote token to purchase","* `minimum_amount_out` - Minimum amount of base token to receive (slippage protection)","* `share_fee_rate` - Fee rate for the share",""],"discriminator":[250,234,13,123,213,156,19,236],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"buy_exact_out","docs":["Use quote tokens to purchase the given amount of base tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_out` - Amount of base token to receive","* `maximum_amount_in` - Maximum amount of quote token to purchase (slippage protection)","* `share_fee_rate` - Fee rate for the share"],"discriminator":[24,211,116,40,105,3,153,56],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_out","type":"u64"},{"name":"maximum_amount_in","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"claim_creator_fee","docs":["Claim the fee from the exclusive creator fee vault.","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[26,97,138,203,132,171,141,252],"accounts":[{"name":"creator","docs":["The pool creator"],"writable":true,"signer":true},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[99,114,101,97,116,111,114,95,102,101,101,95,118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"creator_fee_vault","docs":["The creator fee vault"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"quote_mint"}]}},{"name":"recipient_token_account","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"quote_mint","docs":["The mint for the quote token"]},{"name":"token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_platform_fee","docs":["Claim platform fee","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[156,39,208,135,76,237,61,72],"accounts":[{"name":"platform_fee_wallet","docs":["Only the wallet stored in platform_config can collect platform fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true},{"name":"platform_config","docs":["The platform config account"]},{"name":"quote_vault","writable":true},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_fee_wallet"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"quote_mint","docs":["The mint of quote token vault"]},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_platform_fee_from_vault","docs":["Claim the fee from the exclusive platform fee vault.","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[117,241,198,168,248,218,80,29],"accounts":[{"name":"platform_fee_wallet","docs":["Only the wallet stored in platform_config can collect platform fees"],"writable":true,"signer":true},{"name":"fee_vault_authority","pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,102,101,101,95,118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"platform_config","docs":["The platform config account"]},{"name":"platform_fee_vault","docs":["The platform fee vault"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_config"},{"kind":"account","path":"quote_mint"}]}},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_fee_wallet"},{"kind":"account","path":"token_program"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"quote_mint","docs":["The mint of quote token vault"]},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"claim_vested_token","docs":["Claim vested token","# Arguments"],"discriminator":[49,33,104,30,189,157,79,35],"accounts":[{"name":"beneficiary","docs":["The beneficiary of the vesting account"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true},{"name":"vesting_record","docs":["The vesting record account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,101,115,116,105,110,103]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"beneficiary"}]}},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"user_base_token","writable":true,"pda":{"seeds":[{"kind":"account","path":"beneficiary"},{"kind":"account","path":"base_token_program"},{"kind":"account","path":"base_token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"base_token_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"]},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"associated_token_program","docs":["Required for associated token program"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"}],"args":[]},{"name":"close_platform_global_access","docs":["Close a platform's permission to use a global config."],"discriminator":[123,180,184,129,111,185,187,59],"accounts":[{"name":"owner","signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config"},{"name":"platform_config"},{"name":"platform_global_access","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,103,108,111,98,97,108,95,97,99,99,101,115,115]},{"kind":"account","path":"platform_config"},{"kind":"account","path":"global_config"}]}}],"args":[]},{"name":"collect_fee","docs":["Collects accumulated fees from the pool","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[60,173,247,103,4,93,130,48],"accounts":[{"name":"owner","docs":["Only protocol_fee_owner saved in global_config can collect protocol fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"quote_vault","docs":["The address that holds pool tokens for quote token"],"writable":true},{"name":"quote_mint","docs":["The mint of quote token vault"]},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"collect_migrate_fee","docs":["Collects migrate fees from the pool","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[255,186,150,223,235,118,201,186],"accounts":[{"name":"owner","docs":["Only migrate_fee_owner saved in global_config can collect migrate fee now"],"signer":true},{"name":"authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"quote_vault","docs":["The address that holds pool tokens for quote token"],"writable":true},{"name":"quote_mint","docs":["The mint of quote token vault"]},{"name":"recipient_token_account","docs":["The address that receives the collected quote token fees"],"writable":true},{"name":"token_program","docs":["SPL program for input token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[]},{"name":"create_config","docs":["Creates a new configuration","# Arguments","","* `ctx` - The accounts needed by instruction","* `curve_type` - The type of bonding curve (0: ConstantProduct)","* `index` - The index of config, there may be multiple config with the same curve type.","* `trade_fee_rate` - Trade fee rate, must be less than RATE_DENOMINATOR_VALUE",""],"discriminator":[201,207,243,114,75,111,47,189],"accounts":[{"name":"owner","docs":["The protocol owner/admin account","Must match the predefined admin address","Has authority to create and modify protocol configurations"],"writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config","docs":["Global configuration account that stores protocol-wide settings","PDA generated using GLOBAL_CONFIG_SEED, quote token mint, and curve type","Stores fee rates and protocol parameters"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[103,108,111,98,97,108,95,99,111,110,102,105,103]},{"kind":"account","path":"quote_token_mint"},{"kind":"arg","path":"curve_type"},{"kind":"arg","path":"index"}]}},{"name":"quote_token_mint","docs":["The mint address of the quote token (token used for buying)","This will be the standard token used for all pools with this config"]},{"name":"protocol_fee_owner","docs":["Account that will receive protocol fees"]},{"name":"migrate_fee_owner","docs":["Account that will receive migrate fees"]},{"name":"migrate_to_amm_wallet","docs":["The control wallet address for migrating to amm"]},{"name":"migrate_to_cpswap_wallet","docs":["The control wallet address for migrating to cpswap"]},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"}],"args":[{"name":"curve_type","type":"u8"},{"name":"index","type":"u16"},{"name":"migrate_fee","type":"u64"},{"name":"trade_fee_rate","type":"u64"}]},{"name":"create_platform_config","docs":["Create platform config account","# Arguments","","* `ctx` - The context of accounts","# Fields","* `fee_rate` - Fee rate of the platform","* `name` - Name of the platform","* `web` - Website of the platform","* `img` - Image link of the platform",""],"discriminator":[176,90,196,175,253,113,220,20],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"writable":true,"signer":true},{"name":"platform_fee_wallet"},{"name":"platform_nft_wallet"},{"name":"platform_config","docs":["The platform config account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}},{"name":"cpswap_config"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"transfer_fee_extension_authority"},{"name":"platform_vesting_wallet"}],"args":[{"name":"platform_params","type":{"defined":{"name":"PlatformParams"}}}]},{"name":"create_platform_global_access","docs":["Create a platform permission to use a global config when authorization is enabled."],"discriminator":[162,91,146,199,93,133,234,237],"accounts":[{"name":"owner","writable":true,"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config"},{"name":"platform_config"},{"name":"platform_global_access","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,103,108,111,98,97,108,95,97,99,99,101,115,115]},{"kind":"account","path":"platform_config"},{"kind":"account","path":"global_config"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_platform_vesting_account","docs":["Create vesting account","# Arguments","","* `ctx` - The context of accounts","* `share` - The share amount of base token to be vested",""],"discriminator":[146,71,173,69,98,19,15,106],"accounts":[{"name":"platform_vesting_wallet","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"beneficiary","docs":["The beneficiary is used to receive the allocated linear release of tokens.","Once this account is set, it cannot be modified, so please ensure the validity of this account,","otherwise, the unlocked tokens will not be claimable."],"writable":true},{"name":"platform_config","docs":["Platform config account to be changed"]},{"name":"pool_state","docs":["The pool state account"],"writable":true},{"name":"platform_vesting_record","docs":["The vesting record account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,101,115,116,105,110,103]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"beneficiary"}]}},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_vesting_account","docs":["Create vesting account","# Arguments","","* `ctx` - The context of accounts","* `share` - The share amount of base token to be vested",""],"discriminator":[129,178,2,13,217,172,230,218],"accounts":[{"name":"creator","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"beneficiary","docs":["The beneficiary is used to receive the allocated linear release of tokens.","Once this account is set, it cannot be modified, so please ensure the validity of this account,","otherwise, the unlocked tokens will not be claimable."],"writable":true},{"name":"pool_state","docs":["The pool state account"],"writable":true},{"name":"vesting_record","docs":["The vesting record account"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,101,115,116,105,110,103]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"beneficiary"}]}},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"}],"args":[{"name":"share_amount","type":"u64"}]},{"name":"initialize","docs":["Initializes a new trading pool","# Arguments","","* `ctx` - The context of accounts containing pool and token information",""],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"payer","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"creator"},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"platform_config","docs":["Platform configuration account containing platform info","Includes settings like the fee_rate, name, web, img of the platform"]},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"],"writable":true,"signer":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)","Must match the quote_mint specified in global config"]},{"name":"base_vault","docs":["Token account that holds the pool's base tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"base_mint"}]}},{"name":"quote_vault","docs":["Token account that holds the pool's quote tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"quote_mint"}]}},{"name":"metadata_account","docs":["Account to store the base token's metadata","Created using Metaplex metadata program"],"writable":true},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"metadata_program","docs":["Metaplex Token Metadata program","Used to create metadata for the base token"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"},{"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":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}}]},{"name":"initialize_v2","docs":["Initializes a new trading pool","# Arguments","","* `ctx` - The context of accounts containing pool and token information",""],"discriminator":[67,153,175,39,218,16,38,32],"accounts":[{"name":"payer","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"creator"},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"platform_config","docs":["Platform configuration account containing platform info","Includes settings like the fee_rate, name, web, img of the platform"]},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"],"writable":true,"signer":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)","Must match the quote_mint specified in global config"]},{"name":"base_vault","docs":["Token account that holds the pool's base tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"base_mint"}]}},{"name":"quote_vault","docs":["Token account that holds the pool's quote tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"quote_mint"}]}},{"name":"metadata_account","docs":["Account to store the base token's metadata","Created using Metaplex metadata program"],"writable":true},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"metadata_program","docs":["Metaplex Token Metadata program","Used to create metadata for the base token"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"},{"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":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}},{"name":"amm_fee_on","type":{"defined":{"name":"AmmCreatorFeeOn"}}}]},{"name":"initialize_with_token_2022","docs":["Initializes a new trading pool with base token belongs to spl-token-2022,","pool created by this instruction must be migrated to cpswap after fundraising ends, i.e., curve_param.migrate_type = 1","# Arguments","","* `ctx` - The context of accounts containing pool and token information",""],"discriminator":[37,190,126,222,44,154,171,17],"accounts":[{"name":"payer","docs":["The account paying for the initialization costs","This can be any account with sufficient SOL to cover the transaction"],"writable":true,"signer":true},{"name":"creator"},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"platform_config","docs":["Platform configuration account containing platform info","Includes settings like the fee_rate, name, web, img of the platform"]},{"name":"authority","docs":["PDA that acts as the authority for pool vault and mint operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_mint","docs":["The mint for the base token (token being sold)","Created in this instruction with specified decimals"],"writable":true,"signer":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)","Must match the quote_mint specified in global config"]},{"name":"base_vault","docs":["Token account that holds the pool's base tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"base_mint"}]}},{"name":"quote_vault","docs":["Token account that holds the pool's quote tokens","PDA generated using POOL_VAULT_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"quote_mint"}]}},{"name":"base_token_program","docs":["SPL Token program for the base token"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"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":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}},{"name":"amm_fee_on","type":{"defined":{"name":"AmmCreatorFeeOn"}}},{"name":"transfer_fee_extension_param","type":{"option":{"defined":{"name":"TransferFeeExtensionParams"}}}}]},{"name":"migrate_to_amm","docs":["# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[207,82,192,145,254,207,145,223],"accounts":[{"name":"payer","docs":["Only migrate_to_amm_wallet can migrate to cpswap pool","This signer must match the migrate_to_amm_wallet saved in global_config"],"writable":true,"signer":true},{"name":"base_mint","docs":["The mint for the base token (token being sold)"]},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)"]},{"name":"openbook_program","address":"srmqPvymJeFKQ4zGQed1GFppgkRHL9kaELCbyksJtPX"},{"name":"market","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"request_queue","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"event_queue","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"bids","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"asks","docs":["Account created and asigned to openbook_program but not been initialized"],"writable":true},{"name":"market_vault_signer"},{"name":"market_base_vault","docs":["Token account that holds the market's base tokens"],"writable":true},{"name":"market_quote_vault","docs":["Token account that holds the market's quote tokens"],"writable":true},{"name":"amm_program","address":"675kPX9MHTjS2zt1qfr1NYHuzeLXfQM9H24wFSUt1Mp8"},{"name":"amm_pool","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[97,109,109,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_authority","pda":{"seeds":[{"kind":"const","value":[97,109,109,32,97,117,116,104,111,114,105,116,121]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_open_orders","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[111,112,101,110,95,111,114,100,101,114,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_lp_mint","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[108,112,95,109,105,110,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_base_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[99,111,105,110,95,118,97,117,108,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_quote_vault","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[112,99,95,118,97,117,108,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_target_orders","writable":true,"pda":{"seeds":[{"kind":"account","path":"amm_program"},{"kind":"account","path":"market"},{"kind":"const","value":[116,97,114,103,101,116,95,97,115,115,111,99,105,97,116,101,100,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_config","pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103,95,97,99,99,111,117,110,116,95,115,101,101,100]}],"program":{"kind":"account","path":"amm_program"}}},{"name":"amm_create_fee_destination","writable":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be fully drained during migration"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will be fully drained during migration"],"writable":true},{"name":"pool_lp_token","writable":true},{"name":"spl_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving fee NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"base_lot_size","type":"u64"},{"name":"quote_lot_size","type":"u64"},{"name":"market_vault_signer_nonce","type":"u8"}]},{"name":"migrate_to_cpswap","docs":["# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[136,92,200,103,28,218,144,140],"accounts":[{"name":"payer","docs":["Only migrate_to_cpswap_wallet can migrate to cpswap pool","This signer must match the migrate_to_cpswap_wallet saved in global_config"],"writable":true,"signer":true},{"name":"base_mint","docs":["The mint for the base token (token being sold)"],"writable":true},{"name":"quote_mint","docs":["The mint for the quote token (token used to buy)"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"cpswap_program","address":"CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C"},{"name":"cpswap_pool","docs":["PDA account:","seeds = [","b\"pool\",","cpswap_config.key().as_ref(),","token_0_mint.key().as_ref(),","token_1_mint.key().as_ref(),","],","seeds::program = cpswap_program,","","Or random account: must be signed by cli"],"writable":true},{"name":"cpswap_authority","pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,110,100,95,108,112,95,109,105,110,116,95,97,117,116,104,95,115,101,101,100]}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_lp_mint","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,108,112,95,109,105,110,116]},{"kind":"account","path":"cpswap_pool"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_base_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"cpswap_pool"},{"kind":"account","path":"base_mint"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_quote_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"cpswap_pool"},{"kind":"account","path":"quote_mint"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"cpswap_config"},{"name":"cpswap_create_pool_fee","writable":true},{"name":"cpswap_observation","writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"cpswap_pool"}],"program":{"kind":"account","path":"cpswap_program"}}},{"name":"lock_program","address":"LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE"},{"name":"lock_authority","pda":{"seeds":[{"kind":"const","value":[108,111,99,107,95,99,112,95,97,117,116,104,111,114,105,116,121,95,115,101,101,100]}],"program":{"kind":"account","path":"lock_program"}}},{"name":"lock_lp_vault","writable":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"pool_state","docs":["Account that stores the pool's state and parameters","PDA generated using POOL_SEED and both token mints"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"base_mint"},{"kind":"account","path":"quote_mint"}]}},{"name":"global_config","docs":["Global config account stores owner"]},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be fully drained during migration"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will be fully drained during migration"],"writable":true},{"name":"pool_lp_token","writable":true},{"name":"base_token_program","docs":["SPL Token program for the base token","Must be the standard Token program"]},{"name":"quote_token_program","docs":["SPL Token program for the quote token"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving fee NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["Required for account creation"],"address":"11111111111111111111111111111111"},{"name":"rent_program","docs":["Required for rent exempt calculations"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"metadata_program","docs":["Program to create NFT metadata accunt"],"address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"}],"args":[]},{"name":"remove_platform_curve_param","docs":["Remove platform launch param","# Arguments","","* `ctx` - The context of accounts","* `index` - The index of the curve param to remove",""],"discriminator":[27,30,62,169,93,224,24,145],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"signer":true},{"name":"platform_config","docs":["Platform config account to be changed"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}}],"args":[{"name":"index","type":"u8"}]},{"name":"sell_exact_in","docs":["Use the given amount of base tokens to sell for quote tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Amount of base token to sell","* `minimum_amount_out` - Minimum amount of quote token to receive (slippage protection)","* `share_fee_rate` - Fee rate for the share",""],"discriminator":[149,39,222,155,211,124,152,26],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_in","type":"u64"},{"name":"minimum_amount_out","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"sell_exact_out","docs":["Sell base tokens for the given amount of quote tokens.","# Arguments","","* `ctx` - The context of accounts","* `amount_out` - Amount of quote token to receive","* `maximum_amount_in` - Maximum amount of base token to purchase (slippage protection)","* `share_fee_rate` - Fee rate for the share",""],"discriminator":[95,200,71,34,8,9,11,166],"accounts":[{"name":"payer","docs":["The user performing the swap operation","Must sign the transaction and pay for fees"],"writable":true,"signer":true},{"name":"authority","docs":["PDA that acts as the authority for pool vault operations","Generated using AUTH_SEED"],"pda":{"seeds":[{"kind":"const","value":[118,97,117,108,116,95,97,117,116,104,95,115,101,101,100]}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Used to read protocol fee rates and curve type"]},{"name":"platform_config","docs":["Platform configuration account containing platform-wide settings","Used to read platform fee rate"]},{"name":"pool_state","docs":["The pool state account where the swap will be performed","Contains current pool parameters and balances"],"writable":true},{"name":"user_base_token","docs":["The user's token account for base tokens (tokens being bought)","Will receive the output tokens after the swap"],"writable":true},{"name":"user_quote_token","docs":["The user's token account for quote tokens (tokens being sold)","Will be debited for the input amount"],"writable":true},{"name":"base_vault","docs":["The pool's vault for base tokens","Will be debited to send tokens to the user"],"writable":true},{"name":"quote_vault","docs":["The pool's vault for quote tokens","Will receive the input tokens from the user"],"writable":true},{"name":"base_token_mint","docs":["The mint of the base token","Used for transfer fee calculations if applicable"]},{"name":"quote_token_mint","docs":["The mint of the quote token"]},{"name":"base_token_program","docs":["SPL Token program for base token transfers"]},{"name":"quote_token_program","docs":["SPL Token program for quote token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"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":"amount_out","type":"u64"},{"name":"maximum_amount_in","type":"u64"},{"name":"share_fee_rate","type":"u64"}]},{"name":"update_config","docs":["Updates configuration parameters","# Arguments","","* `ctx` - The context of accounts","* `param` - Parameter to update:","- 0: Update trade_fee_rate","- 1: Update fee owner","- 12: Toggle whether explicit platform authorization is required","* `value` - New value for the selected parameter",""],"discriminator":[29,158,252,191,10,83,219,99],"accounts":[{"name":"owner","docs":["The global config owner or admin"],"signer":true,"address":"GThUX1Atko4tqhN2NaiTazWSeFWMuiUvfFnyJyUghFMJ"},{"name":"global_config","docs":["Global config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u64"}]},{"name":"update_platform_config","docs":["Update platform config","# Arguments","","* `ctx` - The context of accounts","* `param` - Parameter to update",""],"discriminator":[195,60,76,129,146,45,67,143],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"signer":true},{"name":"platform_config","docs":["Platform config account to be changed"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}}],"args":[{"name":"param","type":{"defined":{"name":"PlatformConfigParam"}}}]},{"name":"update_platform_curve_param","docs":["Update platform launch param","# Arguments","","* `ctx` - The context of accounts","* `bonding_curve_param` - Parameter to update",""],"discriminator":[138,144,138,250,220,128,4,57],"accounts":[{"name":"platform_admin","docs":["The account paying for the initialization costs"],"writable":true,"signer":true},{"name":"platform_config","docs":["Platform config account to be changed"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,108,97,116,102,111,114,109,95,99,111,110,102,105,103]},{"kind":"account","path":"platform_admin"}]}},{"name":"global_config","docs":["Global configuration account containing protocol-wide settings","Includes settings like quote token mint and fee parameters"]},{"name":"system_program","docs":["System program for lamport transfers"],"address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u8"},{"name":"bonding_curve_param","type":{"defined":{"name":"BondingCurveParam"}}}]}],"accounts":[{"name":"GlobalConfig","discriminator":[149,8,156,202,160,252,176,217]},{"name":"PlatformConfig","discriminator":[160,78,128,0,248,83,230,160]},{"name":"PlatformGlobalAccess","discriminator":[174,147,132,240,137,219,243,16]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"VestingRecord","discriminator":[106,243,221,205,230,126,85,83]}],"events":[{"name":"ClaimVestedEvent","discriminator":[21,194,114,87,120,211,226,32]},{"name":"CreateVestingEvent","discriminator":[150,152,11,179,52,210,191,125]},{"name":"PoolCreateEvent","discriminator":[151,215,226,9,118,161,115,174]},{"name":"TradeEvent","discriminator":[189,219,127,211,78,230,97,238]}],"errors":[{"code":6000,"name":"NotApproved","msg":"Not approved"},{"code":6001,"name":"InvalidOwner","msg":"Input account owner is not the program address"},{"code":6002,"name":"InvalidInput","msg":"InvalidInput"},{"code":6003,"name":"InputNotMatchCurveConfig","msg":"The input params are not match with curve type in config"},{"code":6004,"name":"ExceededSlippage","msg":"Exceeds desired slippage limit"},{"code":6005,"name":"PoolFunding","msg":"Pool funding"},{"code":6006,"name":"PoolMigrated","msg":"Pool migrated"},{"code":6007,"name":"MigrateTypeNotMatch","msg":"Migrate type not match"},{"code":6008,"name":"MathOverflow","msg":"Math overflow"},{"code":6009,"name":"NoAssetsToCollect","msg":"No assets to collect"},{"code":6010,"name":"VestingRatioTooHigh","msg":"Vesting ratio too high"},{"code":6011,"name":"VestingSettingEnded","msg":"Vesting setting ended"},{"code":6012,"name":"VestingNotStarted","msg":"Vesting not started"},{"code":6013,"name":"NoVestingSchedule","msg":"No vesting schedule"},{"code":6014,"name":"InvalidPlatformInfo","msg":"The platform info input is invalid"},{"code":6015,"name":"PoolNotMigrated","msg":"Pool not migrated"},{"code":6016,"name":"InvalidCpSwapConfig","msg":"The input cp swap config account is invalid"},{"code":6017,"name":"NoSupportExtension","msg":"No support extension"},{"code":6018,"name":"NotEnoughRemainingAccounts","msg":"Not enough remaining accounts"},{"code":6019,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"},{"code":6020,"name":"CurveParamIsNotExist","msg":"Curve param is not exist"},{"code":6021,"name":"InvalidTotalLockedAmount","msg":"Total locked amount must great or equal to the platform vesting share amount"},{"code":6022,"name":"PlatformGlobalAccessDenied","msg":"Platform is not authorized to use this global config"},{"code":6023,"name":"InvalidPlatformGlobalAccess","msg":"Invalid platform-global access account"}],"types":[{"name":"AmmCreatorFeeOn","docs":["migrate to cpmm, creator fee on quote token or both token"],"type":{"kind":"enum","variants":[{"name":"QuoteToken"},{"name":"BothToken"}]}},{"name":"BondingCurveParam","type":{"kind":"struct","fields":[{"name":"migrate_type","docs":["Migrate to AMM or CpSwap, 0: amm, 1: cpswap,","Neither 0 nor 1: invalid"],"type":"u8"},{"name":"migrate_cpmm_fee_on","docs":["The migrate fee on, 0 means fee on the quote token, 1 means fee on both token","Neither 0 nor 1: invalid"],"type":"u8"},{"name":"supply","docs":["The supply of the token,","0: invalid"],"type":"u64"},{"name":"total_base_sell","docs":["The total base sell of the token","0: invalid"],"type":"u64"},{"name":"total_quote_fund_raising","docs":["The total quote fund raising of the token","0: invalid"],"type":"u64"},{"name":"total_locked_amount","docs":["total amount of tokens to be unlocked","u64::MAX: invalid"],"type":"u64"},{"name":"cliff_period","docs":["Waiting time in seconds before unlocking after fundraising ends","u64::MAX: invalid"],"type":"u64"},{"name":"unlock_period","docs":["Unlocking period in seconds","u64::MAX: invalid"],"type":"u64"}]}},{"name":"ClaimVestedEvent","docs":["Emitted when vesting token claimed by beneficiary"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"beneficiary","type":"pubkey"},{"name":"claim_amount","type":"u64"}]}},{"name":"ConstantCurve","type":{"kind":"struct","fields":[{"name":"supply","type":"u64"},{"name":"total_base_sell","type":"u64"},{"name":"total_quote_fund_raising","type":"u64"},{"name":"migrate_type","type":"u8"}]}},{"name":"CreateVestingEvent","docs":["Emitted when vest_account created"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"beneficiary","type":"pubkey"},{"name":"share_amount","type":"u64"}]}},{"name":"CurveParams","type":{"kind":"enum","variants":[{"name":"Constant","fields":[{"name":"data","type":{"defined":{"name":"ConstantCurve"}}}]},{"name":"Fixed","fields":[{"name":"data","type":{"defined":{"name":"FixedCurve"}}}]},{"name":"Linear","fields":[{"name":"data","type":{"defined":{"name":"LinearCurve"}}}]}]}},{"name":"FixedCurve","type":{"kind":"struct","fields":[{"name":"supply","type":"u64"},{"name":"total_quote_fund_raising","type":"u64"},{"name":"migrate_type","type":"u8"}]}},{"name":"GlobalConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"epoch","docs":["Account update epoch"],"type":"u64"},{"name":"curve_type","docs":["0: Constant Product Curve","1: Fixed Price Curve","2: Linear Price Curve"],"type":"u8"},{"name":"index","docs":["Config index"],"type":"u16"},{"name":"migrate_fee","docs":["The fee of migrate to amm"],"type":"u64"},{"name":"trade_fee_rate","docs":["The trade fee rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"max_share_fee_rate","docs":["The maximum share fee rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_base_supply","docs":["The minimum base supply, the value without decimals"],"type":"u64"},{"name":"max_lock_rate","docs":["The maximum lock rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_base_sell_rate","docs":["The minimum base sell rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_base_migrate_rate","docs":["The minimum base migrate rate, denominated in hundredths of a bip (10^-6)"],"type":"u64"},{"name":"min_quote_fund_raising","docs":["The minimum quote fund raising, the value with decimals"],"type":"u64"},{"name":"quote_mint","docs":["Mint information for quote token"],"type":"pubkey"},{"name":"protocol_fee_owner","docs":["Protocol Fee owner"],"type":"pubkey"},{"name":"migrate_fee_owner","docs":["Migrate Fee owner"],"type":"pubkey"},{"name":"migrate_to_amm_wallet","docs":["Migrate to amm control wallet"],"type":"pubkey"},{"name":"migrate_to_cpswap_wallet","docs":["Migrate to cpswap wallet"],"type":"pubkey"},{"name":"requires_platform_auth","docs":["Whether a platform must be explicitly authorized before using this global config"],"type":"u8"},{"name":"padding_alignment","docs":["padding alignment"],"type":{"array":["u8",7]}},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",15]}}]}},{"name":"LinearCurve","type":{"kind":"struct","fields":[{"name":"supply","type":"u64"},{"name":"total_quote_fund_raising","type":"u64"},{"name":"migrate_type","type":"u8"}]}},{"name":"MigrateNftInfo","docs":["Represents the parameters for initializing a platform config account(Only support MigrateType::CPSWAP)","# Fields","* `platform_scale` - Scale of the platform liquidity quantity rights will be converted into NFT","* `creator_scale` - Scale of the token creator liquidity quantity rights will be converted into NFT","* `burn_scale` - Scale of liquidity directly to burn","","* platform_scale + creator_scale + burn_scale = RATE_DENOMINATOR_VALUE"],"type":{"kind":"struct","fields":[{"name":"platform_scale","type":"u64"},{"name":"creator_scale","type":"u64"},{"name":"burn_scale","type":"u64"}]}},{"name":"MintParams","docs":["Represents the parameters for initializing a new token mint","# Fields","* `decimals` - Number of decimal places for the token","* `name` - Name of the token","* `symbol` - Symbol/ticker of the token","* `uri` - URI pointing to token metadata"],"type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"name","type":"string"},{"name":"symbol","type":"string"},{"name":"uri","type":"string"}]}},{"name":"PlatformConfig","type":{"kind":"struct","fields":[{"name":"epoch","docs":["The epoch for update interval"],"type":"u64"},{"name":"platform_fee_wallet","docs":["The platform fee wallet"],"type":"pubkey"},{"name":"platform_nft_wallet","docs":["The platform nft wallet to receive the platform NFT after migration if platform_scale is not 0(Only support MigrateType::CPSWAP)"],"type":"pubkey"},{"name":"platform_scale","docs":["Scale of the platform liquidity quantity rights will be converted into NFT(Only support MigrateType::CPSWAP)"],"type":"u64"},{"name":"creator_scale","docs":["Scale of the token creator liquidity quantity rights will be converted into NFT(Only support MigrateType::CPSWAP)"],"type":"u64"},{"name":"burn_scale","docs":["Scale of liquidity directly to burn"],"type":"u64"},{"name":"fee_rate","docs":["The platform fee rate"],"type":"u64"},{"name":"name","docs":["The platform name"],"type":{"array":["u8",64]}},{"name":"web","docs":["The platform website"],"type":{"array":["u8",256]}},{"name":"img","docs":["The platform img link"],"type":{"array":["u8",256]}},{"name":"cpswap_config","docs":["The platform specifies the trade fee rate after migration to cp swap"],"type":"pubkey"},{"name":"creator_fee_rate","docs":["Creator fee rate"],"type":"u64"},{"name":"transfer_fee_extension_auth","docs":["If the base token belongs to token2022, then you can choose to support the transferfeeConfig extension, which includes permissions such as `transfer_fee_config_authority`` and `withdraw_withheld_authority`.","When initializing mint, `withdraw_withheld_authority` and `transfer_fee_config_authority` both belongs to the contract.","Once the token is migrated to AMM, the authorities will be reset to this value"],"type":"pubkey"},{"name":"platform_vesting_wallet","type":"pubkey"},{"name":"platform_vesting_scale","type":"u64"},{"name":"platform_cp_creator","docs":["If a valid platform_cp_creator is configured for the platform,","it will be used as the creator for the AMM pool during migration to cpswap pool."],"type":"pubkey"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u8",108]}},{"name":"curve_params","docs":["The parameters for launching the pool"],"type":{"vec":{"defined":{"name":"PlatformCurveParam"}}}}]}},{"name":"PlatformConfigInfo","type":{"kind":"struct","fields":[{"name":"fee_wallet","type":"pubkey"},{"name":"nft_wallet","type":"pubkey"},{"name":"migrate_nft_info","type":{"defined":{"name":"MigrateNftInfo"}}},{"name":"fee_rate","type":"u64"},{"name":"name","type":"string"},{"name":"web","type":"string"},{"name":"img","type":"string"},{"name":"transfer_fee_extension_auth","type":"pubkey"},{"name":"creator_fee_rate","type":"u64"},{"name":"platform_vesting_scale","type":"u64"},{"name":"vesting_wallet","type":"pubkey"}]}},{"name":"PlatformConfigParam","type":{"kind":"enum","variants":[{"name":"FeeWallet","fields":["pubkey"]},{"name":"NFTWallet","fields":["pubkey"]},{"name":"MigrateNftInfo","fields":[{"defined":{"name":"MigrateNftInfo"}}]},{"name":"FeeRate","fields":["u64"]},{"name":"Name","fields":["string"]},{"name":"Web","fields":["string"]},{"name":"Img","fields":["string"]},{"name":"CpSwapConfig"},{"name":"AllInfo","fields":[{"defined":{"name":"PlatformConfigInfo"}}]},{"name":"VestingWallet","fields":["pubkey"]},{"name":"PlatformVestingScale","fields":["u64"]},{"name":"PlatformCPCreator","fields":["pubkey"]}]}},{"name":"PlatformCurveParam","type":{"kind":"struct","fields":[{"name":"epoch","docs":["The epoch for update interval, 0 means not update"],"type":"u64"},{"name":"index","docs":["The curve params index"],"type":"u8"},{"name":"global_config","docs":["The global config address"],"type":"pubkey"},{"name":"bonding_curve_param","docs":["bonding curve param"],"type":{"defined":{"name":"BondingCurveParam"}}},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",50]}}]}},{"name":"PlatformGlobalAccess","type":{"kind":"struct","fields":[{"name":"bump","type":"u8"},{"name":"global_config","type":"pubkey"},{"name":"platform_config","type":"pubkey"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",8]}}]}},{"name":"PlatformParams","docs":["Represents the parameters for initializing a platform config account","# Fields","* `migrate_nft_info` - The platform configures liquidity info during migration(Only support MigrateType::CPSWAP)","* `fee_rate` - Fee rate of the platform","* `name` - Name of the platform","* `web` - Website of the platform","* `img` - Image link of the platform","/// * `creator_fee_rate` - The fee rate charged by the creator for each transaction."],"type":{"kind":"struct","fields":[{"name":"migrate_nft_info","type":{"defined":{"name":"MigrateNftInfo"}}},{"name":"fee_rate","type":"u64"},{"name":"name","type":"string"},{"name":"web","type":"string"},{"name":"img","type":"string"},{"name":"creator_fee_rate","type":"u64"},{"name":"platform_vesting_scale","type":"u64"}]}},{"name":"PoolCreateEvent","docs":["Emitted when pool created"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"creator","type":"pubkey"},{"name":"config","type":"pubkey"},{"name":"base_mint_param","type":{"defined":{"name":"MintParams"}}},{"name":"curve_param","type":{"defined":{"name":"CurveParams"}}},{"name":"vesting_param","type":{"defined":{"name":"VestingParams"}}},{"name":"amm_fee_on","type":{"defined":{"name":"AmmCreatorFeeOn"}}}]}},{"name":"PoolState","docs":["Represents the state of a trading pool in the protocol","Stores all essential information about pool balances, fees, and configuration"],"type":{"kind":"struct","fields":[{"name":"epoch","docs":["Account update epoch"],"type":"u64"},{"name":"auth_bump","docs":["Bump seed used for PDA address derivation"],"type":"u8"},{"name":"status","docs":["Current status of the pool","* 0: Pool is funding","* 1: Pool funding is end, waiting for migration","* 2: Pool migration is done"],"type":"u8"},{"name":"base_decimals","docs":["Decimals of the pool base token"],"type":"u8"},{"name":"quote_decimals","docs":["Decimals of the pool quote token"],"type":"u8"},{"name":"migrate_type","docs":["Migrate to AMM or CpSwap, 0: amm, 1: cpswap"],"type":"u8"},{"name":"supply","docs":["Supply of the pool base token"],"type":"u64"},{"name":"total_base_sell","docs":["Total sell amount of the base token"],"type":"u64"},{"name":"virtual_base","docs":["For different curves, virtual_base and virtual_quote have different meanings","For constant product curve, virtual_base and virtual_quote are virtual liquidity, virtual_quote/virtual_base is the initial price","For linear price curve, virtual_base is the price slope parameter a, virtual_quote has no effect","For fixed price curve, virtual_quote/virtual_base is the initial price"],"type":"u64"},{"name":"virtual_quote","type":"u64"},{"name":"real_base","docs":["Actual base token amount in the pool","Represents the real tokens available for trading"],"type":"u64"},{"name":"real_quote","docs":["Actual quote token amount in the pool","Represents the real tokens available for trading"],"type":"u64"},{"name":"total_quote_fund_raising","docs":["The total quote fund raising of the pool"],"type":"u64"},{"name":"quote_protocol_fee","docs":["Accumulated trading fees in quote tokens","Can be collected by the protocol fee owner"],"type":"u64"},{"name":"platform_fee","docs":["Accumulated platform fees in quote tokens","Can be collected by the platform wallet stored in platform config"],"type":"u64"},{"name":"migrate_fee","docs":["The fee of migrate to amm"],"type":"u64"},{"name":"vesting_schedule","docs":["Vesting schedule for the base token"],"type":{"defined":{"name":"VestingSchedule"}}},{"name":"global_config","docs":["Public key of the global configuration account","Contains protocol-wide settings this pool adheres to"],"type":"pubkey"},{"name":"platform_config","docs":["Public key of the platform configuration account","Contains platform-wide settings this pool adheres to"],"type":"pubkey"},{"name":"base_mint","docs":["Public key of the base mint address"],"type":"pubkey"},{"name":"quote_mint","docs":["Public key of the quote mint address"],"type":"pubkey"},{"name":"base_vault","docs":["Public key of the base token vault","Holds the actual base tokens owned by the pool"],"type":"pubkey"},{"name":"quote_vault","docs":["Public key of the quote token vault","Holds the actual quote tokens owned by the pool"],"type":"pubkey"},{"name":"creator","docs":["The creator of base token"],"type":"pubkey"},{"name":"token_program_flag","docs":["token program bits","bit0: base token program flag","0: spl_token_program","1: token_program_2022","","bit1: quote token program flag","0: spl_token_program","1: token_program_2022"],"type":"u8"},{"name":"amm_creator_fee_on","docs":["migrate to cpmm, creator fee on quote token or both token"],"type":{"defined":{"name":"AmmCreatorFeeOn"}}},{"name":"platform_vesting_share","docs":["platform vesting token amount"],"type":"u64"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u8",54]}}]}},{"name":"PoolStatus","docs":["Represents the different states a pool can be in","* Fund - Initial state where pool is accepting funds","* Migrate - Pool funding has ended and waiting for migration","* Trade - Pool migration is complete and amm trading is enabled"],"type":{"kind":"enum","variants":[{"name":"Fund"},{"name":"Migrate"},{"name":"Trade"}]}},{"name":"TradeDirection","docs":["Specifies the direction of a trade in the bonding curve","This is important because curves can treat tokens differently through weights or offsets"],"type":{"kind":"enum","variants":[{"name":"Buy"},{"name":"Sell"}]}},{"name":"TradeEvent","docs":["Emitted when trade process"],"type":{"kind":"struct","fields":[{"name":"pool_state","type":"pubkey"},{"name":"total_base_sell","type":"u64"},{"name":"virtual_base","type":"u64"},{"name":"virtual_quote","type":"u64"},{"name":"real_base_before","type":"u64"},{"name":"real_quote_before","type":"u64"},{"name":"real_base_after","type":"u64"},{"name":"real_quote_after","type":"u64"},{"name":"amount_in","type":"u64"},{"name":"amount_out","type":"u64"},{"name":"protocol_fee","type":"u64"},{"name":"platform_fee","type":"u64"},{"name":"creator_fee","type":"u64"},{"name":"share_fee","type":"u64"},{"name":"trade_direction","type":{"defined":{"name":"TradeDirection"}}},{"name":"pool_status","type":{"defined":{"name":"PoolStatus"}}},{"name":"exact_in","type":"bool"}]}},{"name":"TransferFeeExtensionParams","type":{"kind":"struct","fields":[{"name":"transfer_fee_basis_points","docs":["denominator is 10000, currently, this value cannot exceed 5%, which is 500."],"type":"u16"},{"name":"maximum_fee","docs":["Maximum fee on each transfers, the value must exceed supply * transfer_fee_basis_points / 10000"],"type":"u64"}]}},{"name":"VestingParams","type":{"kind":"struct","fields":[{"name":"total_locked_amount","type":"u64"},{"name":"cliff_period","type":"u64"},{"name":"unlock_period","type":"u64"}]}},{"name":"VestingRecord","type":{"kind":"struct","fields":[{"name":"epoch","docs":["Account update epoch"],"type":"u64"},{"name":"pool","docs":["The pool state account"],"type":"pubkey"},{"name":"beneficiary","docs":["The beneficiary of the vesting account"],"type":"pubkey"},{"name":"claimed_amount","docs":["The amount of tokens claimed"],"type":"u64"},{"name":"token_share_amount","docs":["The share amount of the token to be vested"],"type":"u64"},{"name":"padding","docs":["padding for future updates"],"type":{"array":["u64",8]}}]}},{"name":"VestingSchedule","type":{"kind":"struct","fields":[{"name":"total_locked_amount","type":"u64"},{"name":"cliff_period","type":"u64"},{"name":"unlock_period","type":"u64"},{"name":"start_time","type":"u64"},{"name":"allocated_share_amount","docs":["Total allocated share amount of the base token, not greater than total_locked_amount"],"type":"u64"}]}}]} \ No newline at end of file diff --git a/idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json b/idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json new file mode 100644 index 0000000..eeb48fa --- /dev/null +++ b/idls/raydium_lock.LockrWmn6K5twhz3y9w1dQERbmgSaRkfnTeTKbpofwE.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"raydium_liquidity_locking","instructions":[{"name":"lockClmmPosition","docs":["Lock an existing clmm's position","","# Arguments","","* `ctx` - The context of accounts","* `with_metadata` - Create NFT with metadata or not",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true,"docs":["Pay to create account lamports"]},{"name":"positionNftOwner","isMut":false,"isSigner":true,"docs":["The position NFT owner"]},{"name":"feeNftOwner","isMut":false,"isSigner":false},{"name":"positionNftAccount","isMut":true,"isSigner":false,"docs":["The token account for the tokenized position"]},{"name":"personalPosition","isMut":false,"isSigner":false,"docs":["Lock personal position associated with position_nft_account's mint"]},{"name":"positionNftMint","isMut":false,"isSigner":false,"docs":["Position NFT mint to create a ATA `locked_nft_account` belongs to program"]},{"name":"lockedNftAccount","isMut":true,"isSigner":false,"docs":["Program's token account where `position_nft_account` will transfer to"]},{"name":"lockedPosition","isMut":true,"isSigner":false,"docs":["Store the locked information of the personal position"]},{"name":"feeNftMint","isMut":true,"isSigner":true,"docs":["Create a unique fee nft mint"]},{"name":"feeNftAccount","isMut":true,"isSigner":false,"docs":["Token account where fee nft will be minted to"]},{"name":"metadataAccount","isMut":true,"isSigner":false,"docs":["To store metaplex metadata"]},{"name":"metadataProgram","isMut":false,"isSigner":false,"docs":["Program to create NFT metadata account"]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Program to create an ATA for receiving fee NFT"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Sysvar for token mint and ATA creation"]},{"name":"feeNftTokenProgram","isMut":false,"isSigner":false,"docs":["Token program fee NFT mint/account belongs to"]},{"name":"lockedNftTokenProgram","isMut":false,"isSigner":false,"docs":["Token program position NFT mint/account belongs to"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["Program to create new account"]}],"args":[{"name":"withMetadata","type":"bool"}]},{"name":"collectClmmFeesAndRewards","docs":["collect clmm locked postion fees and rewards","# Arguments","","* `ctx` - The context of accounts",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"feeNftOwner","isMut":false,"isSigner":true,"docs":["The owner who has fee nft account"]},{"name":"feeNftAccount","isMut":false,"isSigner":false,"docs":["Fee token account"]},{"name":"lockedPosition","isMut":false,"isSigner":false,"docs":["Store the locked the information of position"]},{"name":"clmmProgram","isMut":false,"isSigner":false,"docs":["clmm program"]},{"name":"lockedNftAccount","isMut":true,"isSigner":false,"docs":["Program ATA locked NFT account or user ATA position NFT account"]},{"name":"personalPosition","isMut":true,"isSigner":false,"docs":["Decrease liquidity for this position"]},{"name":"poolState","isMut":true,"isSigner":false},{"name":"protocolPosition","isMut":true,"isSigner":false},{"name":"token0Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_0"]},{"name":"token1Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_1"]},{"name":"tickArrayLower","isMut":true,"isSigner":false,"docs":["Stores init state for the lower tick"]},{"name":"tickArrayUpper","isMut":true,"isSigner":false,"docs":["Stores init state for the upper tick"]},{"name":"recipientToken0Account","isMut":true,"isSigner":false,"docs":["The destination token account for receive amount_0"]},{"name":"recipientToken1Account","isMut":true,"isSigner":false,"docs":["The destination token account for receive amount_1"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["SPL program to transfer out tokens"]},{"name":"tokenProgram2022","isMut":false,"isSigner":false,"docs":["Token program 2022"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["memo program"]},{"name":"vault0Mint","isMut":false,"isSigner":false,"docs":["The mint of token vault 0"]},{"name":"vault1Mint","isMut":false,"isSigner":false,"docs":["The mint of token vault 1"]}],"args":[]},{"name":"lockCpLiquidity","docs":["Lock cpSwap liquidity and mint a nft to collect locked liquidity's fee.","","# Arguments","","* `ctx` - The context of accounts","* `lp_amount` - The lp amount to lock","* `with_metadata` - Create NFT with metadata or not",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true,"docs":["Pay to create account lamports"]},{"name":"liquidityOwner","isMut":false,"isSigner":true,"docs":["who want to lock liquidity"]},{"name":"feeNftOwner","isMut":false,"isSigner":false},{"name":"feeNftMint","isMut":true,"isSigner":true,"docs":["Create a unique fee nft mint"]},{"name":"feeNftAccount","isMut":true,"isSigner":false,"docs":["Token account where fee nft will be minted to"]},{"name":"poolState","isMut":false,"isSigner":false,"docs":["Indicates which pool the locked liquidity belong to"]},{"name":"lockedLiquidity","isMut":true,"isSigner":false,"docs":["Store the locked information of liquidity"]},{"name":"lpMint","isMut":false,"isSigner":false,"docs":["The mint of liquidity token"]},{"name":"liquidityOwnerLp","isMut":true,"isSigner":false,"docs":["liquidity owner lp token account"]},{"name":"lockedLpVault","isMut":true,"isSigner":false,"docs":["Locked lp token deposit to"]},{"name":"token0Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_0"]},{"name":"token1Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_1"]},{"name":"metadataAccount","isMut":true,"isSigner":false,"docs":["To store metaplex metadata"]},{"name":"rent","isMut":false,"isSigner":false,"docs":["Sysvar for token mint and ATA creation"]},{"name":"systemProgram","isMut":false,"isSigner":false,"docs":["Program to create the new account"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["Program to create/transfer mint/token account"]},{"name":"associatedTokenProgram","isMut":false,"isSigner":false,"docs":["Program to create an ATA for receiving fee NFT"]},{"name":"metadataProgram","isMut":false,"isSigner":false,"docs":["Program to create NFT metadata accunt"]}],"args":[{"name":"lpAmount","type":"u64"},{"name":"withMetadata","type":"bool"}]},{"name":"collectCpFees","docs":["collect cpSwap locked liquidity's fees","# Arguments","","* `ctx` - The context of accounts","* `fee_lp_amount` - The amount lp want to claim",""],"accounts":[{"name":"authority","isMut":false,"isSigner":false},{"name":"feeNftOwner","isMut":false,"isSigner":true,"docs":["Fee nft owner who is allowed to receive fees"]},{"name":"feeNftAccount","isMut":false,"isSigner":false,"docs":["Fee token account"]},{"name":"lockedLiquidity","isMut":true,"isSigner":false,"docs":["Store the locked the information of liquidity"]},{"name":"cpSwapProgram","isMut":false,"isSigner":false,"docs":["cpswap program"]},{"name":"cpAuthority","isMut":false,"isSigner":false},{"name":"poolState","isMut":true,"isSigner":false,"docs":["Pool state account"]},{"name":"lpMint","isMut":true,"isSigner":false,"docs":["lp mint"]},{"name":"recipientToken0Account","isMut":true,"isSigner":false,"docs":["The token account for receive token_0"]},{"name":"recipientToken1Account","isMut":true,"isSigner":false,"docs":["The token account for receive token_1"]},{"name":"token0Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_0"]},{"name":"token1Vault","isMut":true,"isSigner":false,"docs":["The address that holds pool tokens for token_1"]},{"name":"vault0Mint","isMut":false,"isSigner":false,"docs":["The mint of token_0 vault"]},{"name":"vault1Mint","isMut":false,"isSigner":false,"docs":["The mint of token_1 vault"]},{"name":"lockedLpVault","isMut":true,"isSigner":false,"docs":["locked lp token account"]},{"name":"tokenProgram","isMut":false,"isSigner":false,"docs":["token Program"]},{"name":"tokenProgram2022","isMut":false,"isSigner":false,"docs":["Token program 2022"]},{"name":"memoProgram","isMut":false,"isSigner":false,"docs":["memo program"]}],"args":[{"name":"feeLpAmount","type":"u64"}]}],"accounts":[{"name":"LockedCpLiquidityState","type":{"kind":"struct","fields":[{"name":"lockedLpAmount","docs":["The Locked liquidity amount without claimed lp fee"],"type":"u64"},{"name":"claimedLpAmount","docs":["Claimed lp fee amount"],"type":"u64"},{"name":"unclaimedLpAmount","docs":["Unclaimed lp fee amount"],"type":"u64"},{"name":"lastLp","docs":["Last updated cp pool lp total supply"],"type":"u64"},{"name":"lastK","docs":["Last updated cp pool k"],"type":"u128"},{"name":"recentEpoch","docs":["Account update recent epoch"],"type":"u64"},{"name":"poolId","docs":["The ID of the pool with which this record is connected"],"type":"publicKey"},{"name":"feeNftMint","docs":["nft mint to check who has authority to collect fee"],"type":"publicKey"},{"name":"lockedOwner","docs":["The owner who has locked liquidity"],"type":"publicKey"},{"name":"lockedLpMint","docs":["The mint of locked lp token"],"type":"publicKey"},{"name":"padding","docs":["Unused bytes for future upgrades."],"type":{"array":["u64",8]}}]}},{"name":"LockedClmmPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"positionOwner","docs":["The owner who has locked clmm NFT"],"type":"publicKey"},{"name":"poolId","docs":["The ID of the pool with which this record is connected"],"type":"publicKey"},{"name":"positionId","docs":["The ID of the position with which this record is connected"],"type":"publicKey"},{"name":"lockedNftAccount","docs":["Program ATA locked NFT account or user ATA position NFT account"],"type":"publicKey"},{"name":"feeNftMint","docs":["nft mint to check who has authority to collect fee"],"type":"publicKey"},{"name":"recentEpoch","docs":["account update recent epoch"],"type":"u64"},{"name":"padding","docs":["Unused bytes for future upgrades."],"type":{"array":["u64",8]}}]}}],"events":[{"name":"SettleCpFeeEvent","fields":[{"name":"deltaAmount","type":"u64","index":false},{"name":"unclaimedAmount","type":"u64","index":false},{"name":"lockedAmount","type":"u64","index":false},{"name":"currPoolLp","type":"u64","index":false},{"name":"lastPoolLp","type":"u64","index":false},{"name":"currK","type":"u128","index":false},{"name":"lastK","type":"u128","index":false}]}]} \ No newline at end of file diff --git a/idls/saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json b/idls/saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json new file mode 100644 index 0000000..e827bc7 --- /dev/null +++ b/idls/saber_decimal.DecZY86MU5Gj7kppfUCEmd4LbXXuyZH1yHaP2NTqdiZB.json @@ -0,0 +1 @@ +{"version":"0.0.0","name":"add_decimals","instructions":[{"name":"initializeWrapper","accounts":[{"name":"wrapper","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":false,"isSigner":false},{"name":"underlyingMint","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"deposit","accounts":[{"name":"wrapper","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userUnderlyingTokens","isMut":true,"isSigner":false},{"name":"userWrappedTokens","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"depositAmount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"wrapper","isMut":false,"isSigner":false},{"name":"wrapperMint","isMut":true,"isSigner":false},{"name":"wrapperUnderlyingTokens","isMut":true,"isSigner":false},{"name":"owner","isMut":false,"isSigner":true},{"name":"userUnderlyingTokens","isMut":true,"isSigner":false},{"name":"userWrappedTokens","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"maxBurnAmount","type":"u64"}]}],"accounts":[{"name":"WrappedToken","type":{"kind":"struct","fields":[{"name":"decimals","type":"u8"},{"name":"multiplier","type":"u64"},{"name":"wrapperUnderlyingMint","type":"publicKey"},{"name":"wrapperUnderlyingTokens","type":"publicKey"},{"name":"wrapperMint","type":"publicKey"}]}}],"events":[{"name":"InitEvent","fields":[{"name":"payer","type":"publicKey","index":false},{"name":"decimals","type":"u8","index":false},{"name":"multiplier","type":"u64","index":false},{"name":"wrapperUnderlyingMint","type":"publicKey","index":false},{"name":"wrapperUnderlyingTokens","type":"publicKey","index":false},{"name":"wrapperMint","type":"publicKey","index":false}]},{"name":"DepositEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"underlyingMint","type":"publicKey","index":false},{"name":"wrappedMint","type":"publicKey","index":false},{"name":"depositAmount","type":"u64","index":false},{"name":"mintAmount","type":"u64","index":false}]},{"name":"WithdrawEvent","fields":[{"name":"owner","type":"publicKey","index":false},{"name":"underlyingMint","type":"publicKey","index":false},{"name":"wrappedMint","type":"publicKey","index":false},{"name":"withdrawAmount","type":"u64","index":false},{"name":"burnAmount","type":"u64","index":false},{"name":"dustAmount","type":"u64","index":false}]}],"errors":[{"code":300,"name":"InitNonEmptyAccount","msg":"Wrapper underlying tokens account must be empty."},{"code":301,"name":"InitWrapperSupplyNonZero","msg":"Supply of the wrapper mint is non-zero"},{"code":302,"name":"InitWrapperUnderlyingOwnerMismatch","msg":"Owner of the wrapper underlying tokens account must be the wrapper"},{"code":303,"name":"InitWrapperUnderlyingMintMismatch","msg":"Underlying mint does not match underlying tokens account mint"},{"code":304,"name":"InitMintAuthorityMismatch","msg":"Mint authority mismatch"},{"code":305,"name":"InitMultiplierOverflow","msg":"Initial decimals too high"},{"code":306,"name":"InitWrapperDecimalsTooLow","msg":"The number of target decimals must be greater than or equal to the underlying asset's decimals."},{"code":307,"name":"MintAmountOverflow","msg":"Mint amount overflow. This error happens when the token cannot support this many decimals added to the token."},{"code":308,"name":"InvalidBurnAmount","msg":"Failed to convert burn amount from withdraw amount."},{"code":309,"name":"InvalidWithdrawAmount","msg":"Failed to convert withdraw amount from wrapped amount."},{"code":310,"name":"InsufficientUnderlyingBalance","msg":"User does not have enough underlying tokens"},{"code":311,"name":"InsufficientWrappedBalance","msg":"User does not have enough wrapped tokens"},{"code":312,"name":"ZeroAmount","msg":"Cannot send zero tokens"},{"code":313,"name":"UnknownAction","msg":"Unknown router action"}]} \ No newline at end of file diff --git a/idls/stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json b/idls/stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json new file mode 100644 index 0000000..24a105f --- /dev/null +++ b/idls/stabble_clmm.6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6.json @@ -0,0 +1 @@ +{"address":"6dMXqGZ3ga2dikrYS9ovDXgHGh5RUsb2RTUj6hrQXhk6","metadata":{"name":"amm_v3","version":"0.1.0","spec":"0.1.0","description":"Anchor client and source for Raydium concentrated liquidity AMM"},"instructions":[{"name":"close_position","docs":["Close the user's position and NFT account. If the NFT mint belongs to token2022, it will also be closed and the funds returned to the NFT owner.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[123,134,81,0,49,68,98,98],"accounts":[{"name":"nft_owner","docs":["The position nft owner"],"writable":true,"signer":true},{"name":"position_nft_mint","docs":["Mint address bound to the personal position."],"writable":true},{"name":"position_nft_account","docs":["User token account where position NFT be minted to"],"writable":true},{"name":"personal_position","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"system_program","docs":["System program to close the position state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Token/Token2022 program to close token/mint account"]}],"args":[]},{"name":"close_protocol_position","docs":["The CLMM protocol decides to discard the protocol position account, which can reduce users' opening costs.","After the original protocol position account is closed, the gas fee will be refunded to the user who created it.","","# Arguments","","* `ctx` - The context of accounts",""],"discriminator":[201,117,152,144,85,85,108,178],"accounts":[{"name":"admin","writable":true,"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"protocol_position","writable":true}],"args":[]},{"name":"collect_fund_fee","docs":["Collect the fund fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[167,138,78,149,223,194,6,126],"accounts":[{"name":"owner","docs":["Only admin or fund_owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores fund_owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_protocol_fee","docs":["Collect the protocol fee accrued to the pool","","# Arguments","","* `ctx` - The context of accounts","* `amount_0_requested` - The maximum amount of token_0 to send, can be 0 to collect fees in only token_1","* `amount_1_requested` - The maximum amount of token_1 to send, can be 0 to collect fees in only token_0",""],"discriminator":[136,136,252,221,194,66,126,89],"accounts":[{"name":"owner","docs":["Only admin or config owner can collect fee now"],"signer":true},{"name":"pool_state","docs":["Pool state stores accumulated protocol fee amount"],"writable":true},{"name":"amm_config","docs":["Amm config account stores owner"]},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"writable":true},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"writable":true},{"name":"token_program","docs":["The SPL program to perform token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["The SPL program 2022 to perform token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"amount_0_requested","type":"u64"},{"name":"amount_1_requested","type":"u64"}]},{"name":"collect_remaining_rewards","docs":["Collect remaining reward token for reward founder","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info",""],"discriminator":[18,237,166,197,34,16,213,144],"accounts":[{"name":"reward_funder","docs":["The founder who init reward info previously"],"signer":true},{"name":"funder_token_account","docs":["The funder's reward token account"],"writable":true},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"reward_token_vault","docs":["Reward vault transfer remaining token to founder token account"],"writable":true},{"name":"reward_vault_mint","docs":["The mint of reward token vault"]},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"reward_index","type":"u8"}]},{"name":"create_amm_config","docs":["# Arguments","","* `ctx`- The accounts needed by instruction.","* `index` - The index of clmm config, there may be multiple config.","* `tick_spacing` - The tickspacing binding with config, cannot be changed.","* `trade_fee_rate` - Trade fee rate, can be changed.","* `protocol_fee_rate` - The rate of protocol fee within trade fee.","* `fund_fee_rate` - The rate of fund fee within trade fee.",""],"discriminator":[137,52,237,212,215,117,108,104],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"amm_config","docs":["Initialize config state account to store protocol owner address and fee rates."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[97,109,109,95,99,111,110,102,105,103]},{"kind":"arg","path":"index"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"index","type":"u16"},{"name":"tick_spacing","type":"u16"},{"name":"trade_fee_rate","type":"u32"},{"name":"protocol_fee_rate","type":"u32"},{"name":"fund_fee_rate","type":"u32"}]},{"name":"create_operation_account","docs":["Creates an operation account for the program","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[63,87,148,33,109,35,8,104],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"writable":true,"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"create_pool","docs":["Creates a pool for the given token pair and the initial price","","# Arguments","","* `ctx`- The context of accounts","* `sqrt_price_x64` - the initial sqrt price (amount_token_1 / amount_token_0) of the pool as a Q64.64","Note: The open_time must be smaller than the current block_timestamp on chain."],"discriminator":[233,146,209,142,207,104,64,188],"accounts":[{"name":"pool_creator","docs":["Address paying to create the pool. Can be anyone"],"writable":true,"signer":true},{"name":"amm_config","docs":["Which config the pool belongs to."]},{"name":"pool_state","docs":["Initialize an account to store the pool state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"amm_config"},{"kind":"account","path":"token_mint_0"},{"kind":"account","path":"token_mint_1"}]}},{"name":"token_mint_0","docs":["Token_0 mint, the key must be smaller then token_1 mint."]},{"name":"token_mint_1","docs":["Token_1 mint"]},{"name":"token_vault_0","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_0"}]}},{"name":"token_vault_1","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"token_mint_1"}]}},{"name":"observation_state","docs":["Initialize an account to store oracle observations"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,98,115,101,114,118,97,116,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"tick_array_bitmap","docs":["Initialize an account to store if a tick array is initialized."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,116,105,99,107,95,97,114,114,97,121,95,98,105,116,109,97,112,95,101,120,116,101,110,115,105,111,110]},{"kind":"account","path":"pool_state"}]}},{"name":"token_program_0","docs":["Spl token program or token program 2022"]},{"name":"token_program_1","docs":["Spl token program or token program 2022"]},{"name":"system_program","docs":["To create a new program account"],"address":"11111111111111111111111111111111"},{"name":"rent","docs":["Sysvar for program account"],"address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"sqrt_price_x64","type":"u128"},{"name":"open_time","type":"u64"}]},{"name":"create_support_mint_associated","docs":["Create support token22 mint account which can create pool and send rewards with ignoring the not support extensions."],"discriminator":[17,251,65,92,136,242,14,169],"accounts":[{"name":"owner","docs":["Address to be set as protocol owner."],"writable":true,"signer":true},{"name":"token_mint","docs":["Support token mint"]},{"name":"support_mint_associated","docs":["Initialize support mint state account to store support mint address and bump."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[115,117,112,112,111,114,116,95,109,105,110,116]},{"kind":"account","path":"token_mint"}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"decrease_liquidity_v2","docs":["Decreases liquidity for an existing position, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The amount by which liquidity will be decreased","* `amount_0_min` - The minimum amount of token_0 that should be accounted for the burned liquidity","* `amount_1_min` - The minimum amount of token_1 that should be accounted for the burned liquidity",""],"discriminator":[58,127,188,62,79,82,196,96],"accounts":[{"name":"nft_owner","docs":["The position owner or delegated authority"],"signer":true},{"name":"nft_account","docs":["The token account for the tokenized position"]},{"name":"personal_position","docs":["Decrease liquidity for this position"],"writable":true},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"token_vault_0","docs":["Token_0 vault"],"writable":true},{"name":"token_vault_1","docs":["Token_1 vault"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"recipient_token_account_0","docs":["The destination token account for receive amount_0"],"writable":true},{"name":"recipient_token_account_1","docs":["The destination token account for receive amount_1"],"writable":true},{"name":"token_program","docs":["SPL program to transfer out tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_min","type":"u64"},{"name":"amount_1_min","type":"u64"}]},{"name":"increase_liquidity_v2","docs":["Increases liquidity for an existing position, with amount paid by `payer`, support Token2022","","# Arguments","","* `ctx` - The context of accounts","* `liquidity` - The desired liquidity to be added, if zero, calculate liquidity base amount_0 or amount_1 according base_flag","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `base_flag` - must be specified if liquidity is zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[133,29,89,223,69,238,176,10],"accounts":[{"name":"nft_owner","docs":["Pays to mint the position"],"signer":true},{"name":"nft_account","docs":["The token account for nft"]},{"name":"pool_state","writable":true},{"name":"protocol_position"},{"name":"personal_position","docs":["Increase liquidity for this position"],"writable":true},{"name":"tick_array_lower","docs":["Stores init state for the lower tick"],"writable":true},{"name":"tick_array_upper","docs":["Stores init state for the upper tick"],"writable":true},{"name":"token_account_0","docs":["The payer's token account for token_0"],"writable":true},{"name":"token_account_1","docs":["The token account spending token_1 to mint the position"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"token_program","docs":["Program to create mint account and mint tokens"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"initialize_reward","docs":["Initialize a reward info for a given pool and reward index","","# Arguments","","* `ctx`- The context of accounts","* `reward_index` - the index to reward info","* `open_time` - reward open timestamp","* `end_time` - reward end timestamp","* `emissions_per_second_x64` - Token reward per second are earned per unit of liquidity.",""],"discriminator":[95,135,192,196,242,129,230,68],"accounts":[{"name":"reward_funder","docs":["The founder deposit reward token to vault"],"writable":true,"signer":true},{"name":"funder_token_account","writable":true},{"name":"amm_config","docs":["For check the reward_funder authority"]},{"name":"pool_state","docs":["Set reward for this pool"],"writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"reward_token_mint","docs":["Reward mint"]},{"name":"reward_token_vault","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108,95,114,101,119,97,114,100,95,118,97,117,108,116]},{"kind":"account","path":"pool_state"},{"kind":"account","path":"reward_token_mint"}]}},{"name":"reward_token_program"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"param","type":{"defined":{"name":"InitializeRewardParam"}}}]},{"name":"open_position_with_token22_nft","docs":["Creates a new position wrapped in a Token2022 NFT without relying on metadata_program and metadata_account, reduce the cost for user to create a personal position.","","# Arguments","","* `ctx` - The context of accounts","* `tick_lower_index` - The low boundary of market","* `tick_upper_index` - The upper boundary of market","* `tick_array_lower_start_index` - The start index of tick array which include tick low","* `tick_array_upper_start_index` - The start index of tick array which include tick upper","* `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","* `amount_0_max` - The max amount of token_0 to spend, which serves as a slippage check","* `amount_1_max` - The max amount of token_1 to spend, which serves as a slippage check","* `with_metadata` - The flag indicating whether to create NFT mint metadata","* `base_flag` - if the liquidity specified as zero, true: calculate liquidity base amount_0_max otherwise base amount_1_max",""],"discriminator":[77,255,174,82,125,29,201,46],"accounts":[{"name":"payer","docs":["Pays to mint the position"],"writable":true,"signer":true},{"name":"position_nft_owner"},{"name":"position_nft_mint","docs":["Unique token mint address, initialize in contract"],"writable":true,"signer":true},{"name":"position_nft_account","writable":true},{"name":"pool_state","docs":["Add liquidity for this pool"],"writable":true},{"name":"protocol_position"},{"name":"tick_array_lower","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_lower_start_index"}]}},{"name":"tick_array_upper","writable":true,"pda":{"seeds":[{"kind":"const","value":[116,105,99,107,95,97,114,114,97,121]},{"kind":"account","path":"pool_state"},{"kind":"arg","path":"tick_array_upper_start_index"}]}},{"name":"personal_position","docs":["personal position state"],"writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,115,105,116,105,111,110]},{"kind":"account","path":"position_nft_mint"}]}},{"name":"token_account_0","docs":["The token_0 account deposit token to the pool"],"writable":true},{"name":"token_account_1","docs":["The token_1 account deposit token to the pool"],"writable":true},{"name":"token_vault_0","docs":["The address that holds pool tokens for token_0"],"writable":true},{"name":"token_vault_1","docs":["The address that holds pool tokens for token_1"],"writable":true},{"name":"rent","docs":["Sysvar for token mint and ATA creation"],"address":"SysvarRent111111111111111111111111111111111"},{"name":"system_program","docs":["Program to create the position manager state account"],"address":"11111111111111111111111111111111"},{"name":"token_program","docs":["Program to transfer for token account"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Program to create an ATA for receiving position NFT"],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"token_program_2022","docs":["Program to create NFT mint/token account and transfer for token22 account"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"vault_0_mint","docs":["The mint of token vault 0"]},{"name":"vault_1_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"tick_lower_index","type":"i32"},{"name":"tick_upper_index","type":"i32"},{"name":"tick_array_lower_start_index","type":"i32"},{"name":"tick_array_upper_start_index","type":"i32"},{"name":"liquidity","type":"u128"},{"name":"amount_0_max","type":"u64"},{"name":"amount_1_max","type":"u64"},{"name":"with_metadata","type":"bool"},{"name":"base_flag","type":{"option":"bool"}}]},{"name":"set_reward_params","docs":["Reset reward param, start a new reward cycle or extend the current cycle.","","# Arguments","","* `ctx` - The context of accounts","* `reward_index` - The index of reward token in the pool.","* `emissions_per_second_x64` - The per second emission reward, when extend the current cycle,","new value can't be less than old value","* `open_time` - reward open timestamp, must be set when starting a new cycle","* `end_time` - reward end timestamp",""],"discriminator":[112,52,167,75,32,201,211,137],"accounts":[{"name":"authority","docs":["Address to be set as protocol owner. It pays to create factory state account."],"signer":true},{"name":"amm_config"},{"name":"pool_state","writable":true},{"name":"operation_state","docs":["load info from the account to judge reward permission"],"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"token_program","docs":["Token program"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["Token program 2022"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"}],"args":[{"name":"reward_index","type":"u8"},{"name":"emissions_per_second_x64","type":"u128"},{"name":"open_time","type":"u64"},{"name":"end_time","type":"u64"}]},{"name":"swap_router_base_in","docs":["Swap token for as much as possible of another token across the path provided, base input","","# Arguments","","* `ctx` - The context of accounts","* `amount_in` - Token amount to be swapped in","* `amount_out_minimum` - Panic if output amount is below minimum amount. For slippage.",""],"discriminator":[69,125,115,218,245,186,242,196],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"input_token_account","docs":["The token account that pays input tokens for the swap"],"writable":true},{"name":"input_token_mint","docs":["The mint of input token"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"}],"args":[{"name":"amount_in","type":"u64"},{"name":"amount_out_minimum","type":"u64"}]},{"name":"swap_v2","docs":["Swaps one token for as much as possible of another token across a single pool, support token program 2022","","# Arguments","","* `ctx` - The context of accounts","* `amount` - Arranged in pairs with other_amount_threshold. (amount_in, amount_out_minimum) or (amount_out, amount_in_maximum)","* `other_amount_threshold` - For slippage check","* `sqrt_price_limit` - The Q64.64 sqrt price √P limit. If zero for one, the price cannot","* `is_base_input` - swap base input or swap base output",""],"discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"payer","docs":["The user performing the swap"],"signer":true},{"name":"amm_config","docs":["The factory state to read protocol fees"]},{"name":"pool_state","docs":["The program account of the pool in which the swap will be performed"],"writable":true},{"name":"input_token_account","docs":["The user token account for input token"],"writable":true},{"name":"output_token_account","docs":["The user token account for output token"],"writable":true},{"name":"input_vault","docs":["The vault token account for input token"],"writable":true},{"name":"output_vault","docs":["The vault token account for output token"],"writable":true},{"name":"observation_state","docs":["The program account for the most recent oracle observation"],"writable":true},{"name":"token_program","docs":["SPL program for token transfers"],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"token_program_2022","docs":["SPL program 2022 for token transfers"],"address":"TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb"},{"name":"memo_program","docs":["Memo program"],"address":"MemoSq4gqABAXKb96qnH8TysNcWxMyWCqXgDLGmfcHr"},{"name":"input_vault_mint","docs":["The mint of token vault 0"]},{"name":"output_vault_mint","docs":["The mint of token vault 1"]}],"args":[{"name":"amount","type":"u64"},{"name":"other_amount_threshold","type":"u64"},{"name":"sqrt_price_limit_x64","type":"u128"},{"name":"is_base_input","type":"bool"}]},{"name":"transfer_reward_owner","docs":["Transfer reward owner","","# Arguments","","* `ctx`- The context of accounts","* `new_owner`- new owner pubkey",""],"discriminator":[7,22,12,83,242,43,48,121],"accounts":[{"name":"authority","docs":["Address to be set as operation account owner."],"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"pool_state","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"update_amm_config","docs":["Updates the owner of the clmm config","Must be called by the current owner or admin","","# Arguments","","* `ctx`- The context of accounts","* `trade_fee_rate`- The new trade fee rate of clmm config, be set when `param` is 0","* `protocol_fee_rate`- The new protocol fee rate of clmm config, be set when `param` is 1","* `fund_fee_rate`- The new fund fee rate of clmm config, be set when `param` is 2","* `new_owner`- The config's new owner, be set when `param` is 3","* `new_fund_owner`- The config's new fund owner, be set when `param` is 4","* `param`- The value can be 0 | 1 | 2 | 3 | 4, otherwise will report a error",""],"discriminator":[49,60,174,136,154,28,116,200],"accounts":[{"name":"owner","docs":["The clmm config owner or admin"],"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"amm_config","docs":["Amm config account to be changed"],"writable":true}],"args":[{"name":"param","type":"u8"},{"name":"value","type":"u32"}]},{"name":"update_operation_account","docs":["Update the operation account","","# Arguments","","* `ctx`- The context of accounts","* `param`- The value can be 0 | 1 | 2 | 3, otherwise will report a error","* `keys`- update operation owner when the `param` is 0","remove operation owner when the `param` is 1","update whitelist mint when the `param` is 2","remove whitelist mint when the `param` is 3",""],"discriminator":[127,70,119,40,188,227,61,7],"accounts":[{"name":"owner","docs":["Address to be set as operation account owner."],"signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"operation_state","docs":["Initialize operation state account to store operation owner address and white list mint."],"writable":true,"pda":{"seeds":[{"kind":"const","value":[111,112,101,114,97,116,105,111,110]}]}},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[{"name":"param","type":"u8"},{"name":"keys","type":{"vec":"pubkey"}}]},{"name":"update_pool_status","docs":["Update pool status for given value","","# Arguments","","* `ctx`- The context of accounts","* `status` - The value of status",""],"discriminator":[130,87,108,6,46,224,117,123],"accounts":[{"name":"authority","signer":true,"address":"3kXrf8w8Z6EjLJU4S8dAkpRL2von8z7Eh3kJnFrmo7Z2"},{"name":"pool_state","writable":true}],"args":[{"name":"status","type":"u8"}]},{"name":"update_reward_infos","docs":["Update rewards info of the given pool, can be called for everyone","","# Arguments","","* `ctx`- The context of accounts",""],"discriminator":[163,172,224,52,11,154,106,223],"accounts":[{"name":"pool_state","docs":["The liquidity pool for which reward info to update"],"writable":true}],"args":[]}],"accounts":[{"name":"AmmConfig","discriminator":[218,244,33,104,203,203,43,111]},{"name":"ObservationState","discriminator":[122,174,197,53,129,9,165,132]},{"name":"OperationState","discriminator":[19,236,58,237,81,222,183,252]},{"name":"PersonalPositionState","discriminator":[70,111,150,126,230,15,25,117]},{"name":"PoolState","discriminator":[247,237,227,245,215,195,222,70]},{"name":"ProtocolPositionState","discriminator":[100,226,145,99,146,218,160,106]},{"name":"SupportMintAssociated","discriminator":[134,40,183,79,12,112,162,53]},{"name":"TickArrayBitmapExtension","discriminator":[60,150,36,219,97,128,139,153]},{"name":"TickArrayState","discriminator":[192,155,85,205,49,249,129,42]}],"events":[{"name":"CollectPersonalFeeEvent","discriminator":[166,174,105,192,81,161,83,105]},{"name":"CollectProtocolFeeEvent","discriminator":[206,87,17,79,45,41,213,61]},{"name":"ConfigChangeEvent","discriminator":[247,189,7,119,106,112,95,151]},{"name":"CreatePersonalPositionEvent","discriminator":[100,30,87,249,196,223,154,206]},{"name":"DecreaseLiquidityEvent","discriminator":[58,222,86,58,68,50,85,56]},{"name":"IncreaseLiquidityEvent","discriminator":[49,79,105,212,32,34,30,84]},{"name":"LiquidityCalculateEvent","discriminator":[237,112,148,230,57,84,180,162]},{"name":"LiquidityChangeEvent","discriminator":[126,240,175,206,158,88,153,107]},{"name":"PoolCreatedEvent","discriminator":[25,94,75,47,112,99,53,63]},{"name":"SwapEvent","discriminator":[64,198,205,232,38,8,113,226]},{"name":"UpdateRewardInfosEvent","discriminator":[109,127,186,78,114,65,37,236]}],"errors":[{"code":6000,"name":"LOK","msg":"LOK"},{"code":6001,"name":"NotApproved","msg":"Not approved"},{"code":6002,"name":"InvalidUpdateConfigFlag","msg":"invalid update clmm config flag"},{"code":6003,"name":"AccountLack","msg":"Account lack"},{"code":6004,"name":"ClosePositionErr","msg":"Remove liquitity, collect fees owed and reward then you can close position account"},{"code":6005,"name":"ZeroMintAmount","msg":"Minting amount should be greater than 0"},{"code":6006,"name":"InvalidTickIndex","msg":"Tick out of range"},{"code":6007,"name":"TickInvalidOrder","msg":"The lower tick must be below the upper tick"},{"code":6008,"name":"TickLowerOverflow","msg":"The tick must be greater, or equal to the minimum tick(-443636)"},{"code":6009,"name":"TickUpperOverflow","msg":"The tick must be lesser than, or equal to the maximum tick(443636)"},{"code":6010,"name":"TickAndSpacingNotMatch","msg":"tick % tick_spacing must be zero"},{"code":6011,"name":"InvalidTickArray","msg":"Invalid tick array account"},{"code":6012,"name":"InvalidTickArrayBoundary","msg":"Invalid tick array boundary"},{"code":6013,"name":"SqrtPriceLimitOverflow","msg":"Square root price limit overflow"},{"code":6014,"name":"SqrtPriceX64","msg":"sqrt_price_x64 out of range"},{"code":6015,"name":"LiquiditySubValueErr","msg":"Liquidity sub delta L must be smaller than before"},{"code":6016,"name":"LiquidityAddValueErr","msg":"Liquidity add delta L must be greater, or equal to before"},{"code":6017,"name":"InvalidLiquidity","msg":"Invalid liquidity when update position"},{"code":6018,"name":"ForbidBothZeroForSupplyLiquidity","msg":"Both token amount must not be zero while supply liquidity"},{"code":6019,"name":"LiquidityInsufficient","msg":"Liquidity insufficient"},{"code":6020,"name":"TransactionTooOld","msg":"Transaction too old"},{"code":6021,"name":"PriceSlippageCheck","msg":"Price slippage check"},{"code":6022,"name":"TooLittleOutputReceived","msg":"Too little output received"},{"code":6023,"name":"TooMuchInputPaid","msg":"Too much input paid"},{"code":6024,"name":"ZeroAmountSpecified","msg":"Swap special amount can not be zero"},{"code":6025,"name":"InvalidInputPoolVault","msg":"Input pool vault is invalid"},{"code":6026,"name":"TooSmallInputOrOutputAmount","msg":"Swap input or output amount is too small"},{"code":6027,"name":"NotEnoughTickArrayAccount","msg":"Not enought tick array account"},{"code":6028,"name":"InvalidFirstTickArrayAccount","msg":"Invalid first tick array account"},{"code":6029,"name":"InvalidRewardIndex","msg":"Invalid reward index"},{"code":6030,"name":"FullRewardInfo","msg":"The init reward token reach to the max"},{"code":6031,"name":"RewardTokenAlreadyInUse","msg":"The init reward token already in use"},{"code":6032,"name":"ExceptRewardMint","msg":"The reward tokens must contain one of pool vault mint except the last reward"},{"code":6033,"name":"InvalidRewardInitParam","msg":"Invalid reward init param"},{"code":6034,"name":"InvalidRewardDesiredAmount","msg":"Invalid collect reward desired amount"},{"code":6035,"name":"InvalidRewardInputAccountNumber","msg":"Invalid collect reward input account number"},{"code":6036,"name":"InvalidRewardPeriod","msg":"Invalid reward period"},{"code":6037,"name":"NotApproveUpdateRewardEmissiones","msg":"Modification of emissiones is allowed within 72 hours from the end of the previous cycle"},{"code":6038,"name":"UnInitializedRewardInfo","msg":"uninitialized reward info"},{"code":6039,"name":"NotSupportMint","msg":"Not support token_2022 mint extension"},{"code":6040,"name":"MissingTickArrayBitmapExtensionAccount","msg":"Missing tickarray bitmap extension account"},{"code":6041,"name":"InsufficientLiquidityForDirection","msg":"Insufficient liquidity for this direction"},{"code":6042,"name":"MaxTokenOverflow","msg":"Max token overflow"},{"code":6043,"name":"CalculateOverflow","msg":"Calculate overflow"},{"code":6044,"name":"TransferFeeCalculateNotMatch","msg":"TransferFee calculate not match"}],"types":[{"name":"AmmConfig","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"index","type":"u16"},{"name":"owner","docs":["Address of the protocol owner"],"type":"pubkey"},{"name":"protocol_fee_rate","docs":["The protocol fee"],"type":"u32"},{"name":"trade_fee_rate","docs":["The trade fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"tick_spacing","docs":["The tick spacing"],"type":"u16"},{"name":"fund_fee_rate","docs":["The fund fee, denominated in hundredths of a bip (10^-6)"],"type":"u32"},{"name":"padding_u32","type":"u32"},{"name":"fund_owner","type":"pubkey"},{"name":"padding","type":{"array":["u64",3]}}]}},{"name":"CollectPersonalFeeEvent","docs":["Emitted when tokens are collected for a position"],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which underlying tokens were collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The token account that received the collected token_0 tokens"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The token account that received the collected token_1 tokens"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 owed to the position that was collected"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 owed to the position that was collected"],"type":"u64"}]}},{"name":"CollectProtocolFeeEvent","docs":["Emitted when the collected protocol fees are withdrawn by the factory owner"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool whose protocol fee is collected"],"type":"pubkey"},{"name":"recipient_token_account_0","docs":["The address that receives the collected token_0 protocol fees"],"type":"pubkey"},{"name":"recipient_token_account_1","docs":["The address that receives the collected token_1 protocol fees"],"type":"pubkey"},{"name":"amount_0","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_0 protocol fees that is withdrawn"],"type":"u64"}]}},{"name":"ConfigChangeEvent","docs":["Emitted when create or update a config"],"type":{"kind":"struct","fields":[{"name":"index","type":"u16"},{"name":"owner","type":"pubkey"},{"name":"protocol_fee_rate","type":"u32"},{"name":"trade_fee_rate","type":"u32"},{"name":"tick_spacing","type":"u16"},{"name":"fund_fee_rate","type":"u32"},{"name":"fund_owner","type":"pubkey"}]}},{"name":"CreatePersonalPositionEvent","docs":["Emitted when create a new position"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which liquidity was added"],"type":"pubkey"},{"name":"personal_position","docs":["The personal position"],"type":"pubkey"},{"name":"nft_mint","docs":["The nft mint address for the position"],"type":"pubkey"},{"name":"minter","docs":["The address that create the position"],"type":"pubkey"},{"name":"nft_owner","docs":["The owner of the position and recipient of any minted liquidity"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity minted to the position range"],"type":"u128"},{"name":"deposit_amount_0","docs":["The amount of token_0 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_1","docs":["The amount of token_1 was deposit for the liquidity"],"type":"u64"},{"name":"deposit_amount_0_transfer_fee","docs":["The token transfer fee for deposit_amount_0"],"type":"u64"},{"name":"deposit_amount_1_transfer_fee","docs":["The token transfer fee for deposit_amount_1"],"type":"u64"}]}},{"name":"DecreaseLiquidityEvent","docs":["Emitted when liquidity is decreased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was decreased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the position was decreased"],"type":"u128"},{"name":"decrease_amount_0","docs":["The amount of token_0 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"decrease_amount_1","docs":["The amount of token_1 that was paid for the decrease in liquidity"],"type":"u64"},{"name":"fee_amount_0","type":"u64"},{"name":"fee_amount_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"reward_amounts","docs":["The amount of rewards"],"type":{"array":["u64",3]}},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee"],"type":"u64"}]}},{"name":"IncreaseLiquidityEvent","docs":["Emitted when liquidity is increased."],"type":{"kind":"struct","fields":[{"name":"position_nft_mint","docs":["The ID of the token for which liquidity was increased"],"type":"pubkey"},{"name":"liquidity","docs":["The amount by which liquidity for the NFT position was increased"],"type":"u128"},{"name":"amount_0","docs":["The amount of token_0 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_1","docs":["The amount of token_1 that was paid for the increase in liquidity"],"type":"u64"},{"name":"amount_0_transfer_fee","docs":["The token transfer fee for amount_0"],"type":"u64"},{"name":"amount_1_transfer_fee","docs":["The token transfer fee for amount_1"],"type":"u64"}]}},{"name":"InitializeRewardParam","type":{"kind":"struct","fields":[{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Token reward per second are earned per unit of liquidity"],"type":"u128"}]}},{"name":"LiquidityCalculateEvent","docs":["Emitted when liquidity decreased or increase."],"type":{"kind":"struct","fields":[{"name":"pool_liquidity","docs":["The pool liquidity before decrease or increase"],"type":"u128"},{"name":"pool_sqrt_price_x64","docs":["The pool price when decrease or increase in liquidity"],"type":"u128"},{"name":"pool_tick","docs":["The pool tick when decrease or increase in liquidity"],"type":"i32"},{"name":"calc_amount_0","docs":["The amount of token_0 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"calc_amount_1","docs":["The amount of token_1 that was calculated for the decrease or increase in liquidity"],"type":"u64"},{"name":"trade_fee_owed_0","type":"u64"},{"name":"trade_fee_owed_1","docs":["The amount of token_1 fee"],"type":"u64"},{"name":"transfer_fee_0","docs":["The amount of token_0 transfer fee without trade_fee_amount_0"],"type":"u64"},{"name":"transfer_fee_1","docs":["The amount of token_1 transfer fee without trade_fee_amount_0"],"type":"u64"}]}},{"name":"LiquidityChangeEvent","docs":["Emitted pool liquidity change when increase and decrease liquidity"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for swap"],"type":"pubkey"},{"name":"tick","docs":["The tick of the pool"],"type":"i32"},{"name":"tick_lower","docs":["The tick lower of position"],"type":"i32"},{"name":"tick_upper","docs":["The tick lower of position"],"type":"i32"},{"name":"liquidity_before","docs":["The liquidity of the pool before liquidity change"],"type":"u128"},{"name":"liquidity_after","docs":["The liquidity of the pool after liquidity change"],"type":"u128"}]}},{"name":"Observation","docs":["The element of observations in ObservationState"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"block_timestamp","docs":["The block timestamp of the observation"],"type":"u32"},{"name":"tick_cumulative","docs":["the cumulative of tick during the duration time"],"type":"i64"},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"ObservationState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"initialized","docs":["Whether the ObservationState is initialized"],"type":"bool"},{"name":"recent_epoch","docs":["recent update epoch"],"type":"u64"},{"name":"observation_index","docs":["the most-recently updated index of the observations array"],"type":"u16"},{"name":"pool_id","docs":["belongs to which pool"],"type":"pubkey"},{"name":"observations","docs":["observation array"],"type":{"array":[{"defined":{"name":"Observation"}},100]}},{"name":"padding","docs":["padding for feature update"],"type":{"array":["u64",4]}}]}},{"name":"OperationState","docs":["Holds the current owner of the factory"],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"operation_owners","docs":["Address of the operation owner"],"type":{"array":["pubkey",10]}},{"name":"whitelist_mints","docs":["The mint address of whitelist to emit reward"],"type":{"array":["pubkey",100]}}]}},{"name":"PersonalPositionState","type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"nft_mint","docs":["Mint address of the tokenized position"],"type":"pubkey"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth of the aggregate position as of the last action on the individual position"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0, as of the last computation"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1, as of the last computation"],"type":"u64"},{"name":"reward_infos","type":{"array":[{"defined":{"name":"PositionRewardInfo"}},3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"PoolCreatedEvent","docs":["Emitted when a pool is created and initialized with a starting price",""],"type":{"kind":"struct","fields":[{"name":"token_mint_0","docs":["The first token of the pool by address sort order"],"type":"pubkey"},{"name":"token_mint_1","docs":["The second token of the pool by address sort order"],"type":"pubkey"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"pool_state","docs":["The address of the created pool"],"type":"pubkey"},{"name":"sqrt_price_x64","docs":["The initial sqrt price of the pool, as a Q64.64"],"type":"u128"},{"name":"tick","docs":["The initial tick of the pool, i.e. log base 1.0001 of the starting price of the pool"],"type":"i32"},{"name":"token_vault_0","docs":["Vault of token_0"],"type":"pubkey"},{"name":"token_vault_1","docs":["Vault of token_1"],"type":"pubkey"},{"name":"amm_config","docs":["The PublicKey of the config account with fee rates etc"],"type":"pubkey"}]}},{"name":"PoolState","docs":["The pool state","","PDA of `[POOL_SEED, config, token_mint_0, token_mint_1]`",""],"serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":{"array":["u8",1]}},{"name":"amm_config","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"token_mint_0","docs":["Token pair of the pool, where token_mint_0 address < token_mint_1 address"],"type":"pubkey"},{"name":"token_mint_1","type":"pubkey"},{"name":"token_vault_0","docs":["Token pair vault"],"type":"pubkey"},{"name":"token_vault_1","type":"pubkey"},{"name":"observation_key","docs":["observation account key"],"type":"pubkey"},{"name":"mint_decimals_0","docs":["mint0 and mint1 decimals"],"type":"u8"},{"name":"mint_decimals_1","type":"u8"},{"name":"tick_spacing","docs":["The minimum number of ticks between initialized ticks"],"type":"u16"},{"name":"liquidity","docs":["The currently in range liquidity available to the pool."],"type":"u128"},{"name":"sqrt_price_x64","docs":["The current price of the pool as a sqrt(token_1/token_0) Q64.64 value"],"type":"u128"},{"name":"tick_current","docs":["The current tick of the pool, i.e. according to the last tick transition that was run."],"type":"i32"},{"name":"padding3","type":"u16"},{"name":"padding4","type":"u16"},{"name":"fee_growth_global_0_x64","docs":["The fee growth as a Q64.64 number, i.e. fees of token_0 and token_1 collected per","unit of liquidity for the entire life of the pool."],"type":"u128"},{"name":"fee_growth_global_1_x64","type":"u128"},{"name":"protocol_fees_token_0","docs":["The amounts of token_0 and token_1 that are owed to the protocol."],"type":"u64"},{"name":"protocol_fees_token_1","type":"u64"},{"name":"swap_in_amount_token_0","docs":["The amounts in and out of swap token_0 and token_1"],"type":"u128"},{"name":"swap_out_amount_token_1","type":"u128"},{"name":"swap_in_amount_token_1","type":"u128"},{"name":"swap_out_amount_token_0","type":"u128"},{"name":"status","docs":["Bitwise representation of the state of the pool","bit0, 1: disable open position and increase liquidity, 0: normal","bit1, 1: disable decrease liquidity, 0: normal","bit2, 1: disable collect fee, 0: normal","bit3, 1: disable collect reward, 0: normal","bit4, 1: disable swap, 0: normal"],"type":"u8"},{"name":"padding","docs":["Leave blank for future use"],"type":{"array":["u8",7]}},{"name":"reward_infos","type":{"array":[{"defined":{"name":"RewardInfo"}},3]}},{"name":"tick_array_bitmap","docs":["Packed initialized tick array state"],"type":{"array":["u64",16]}},{"name":"total_fees_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_claimed_token_0","docs":["except protocol_fee and fund_fee"],"type":"u64"},{"name":"total_fees_token_1","type":"u64"},{"name":"total_fees_claimed_token_1","type":"u64"},{"name":"fund_fees_token_0","type":"u64"},{"name":"fund_fees_token_1","type":"u64"},{"name":"open_time","type":"u64"},{"name":"recent_epoch","type":"u64"},{"name":"padding1","type":{"array":["u64",24]}},{"name":"padding2","type":{"array":["u64",32]}}]}},{"name":"PositionRewardInfo","type":{"kind":"struct","fields":[{"name":"growth_inside_last_x64","type":"u128"},{"name":"reward_amount_owed","type":"u64"}]}},{"name":"ProtocolPositionState","docs":["Info stored for each user's position"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"pool_id","docs":["The ID of the pool with which this token is connected"],"type":"pubkey"},{"name":"tick_lower_index","docs":["The lower bound tick of the position"],"type":"i32"},{"name":"tick_upper_index","docs":["The upper bound tick of the position"],"type":"i32"},{"name":"liquidity","docs":["The amount of liquidity owned by this position"],"type":"u128"},{"name":"fee_growth_inside_0_last_x64","docs":["The token_0 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"fee_growth_inside_1_last_x64","docs":["The token_1 fee growth per unit of liquidity as of the last update to liquidity or fees owed"],"type":"u128"},{"name":"token_fees_owed_0","docs":["The fees owed to the position owner in token_0"],"type":"u64"},{"name":"token_fees_owed_1","docs":["The fees owed to the position owner in token_1"],"type":"u64"},{"name":"reward_growth_inside","docs":["The reward growth per unit of liquidity as of the last update to liquidity"],"type":{"array":["u128",3]}},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u64",7]}}]}},{"name":"RewardInfo","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"reward_state","docs":["Reward state"],"type":"u8"},{"name":"open_time","docs":["Reward open time"],"type":"u64"},{"name":"end_time","docs":["Reward end time"],"type":"u64"},{"name":"last_update_time","docs":["Reward last update time"],"type":"u64"},{"name":"emissions_per_second_x64","docs":["Q64.64 number indicates how many tokens per second are earned per unit of liquidity."],"type":"u128"},{"name":"reward_total_emissioned","docs":["The total amount of reward emissioned"],"type":"u64"},{"name":"reward_claimed","docs":["The total amount of claimed reward"],"type":"u64"},{"name":"token_mint","docs":["Reward token mint."],"type":"pubkey"},{"name":"token_vault","docs":["Reward vault token account."],"type":"pubkey"},{"name":"authority","docs":["The owner that has permission to set reward param"],"type":"pubkey"},{"name":"reward_growth_global_x64","docs":["Q64.64 number that tracks the total tokens earned per unit of liquidity since the reward","emissions were turned on."],"type":"u128"}]}},{"name":"SupportMintAssociated","docs":["Holds the current owner of the factory"],"type":{"kind":"struct","fields":[{"name":"bump","docs":["Bump to identify PDA"],"type":"u8"},{"name":"mint","docs":["Address of the supported token22 mint"],"type":"pubkey"},{"name":"padding","type":{"array":["u64",8]}}]}},{"name":"SwapEvent","docs":["Emitted by when a swap is performed for a pool"],"type":{"kind":"struct","fields":[{"name":"pool_state","docs":["The pool for which token_0 and token_1 were swapped"],"type":"pubkey"},{"name":"sender","docs":["The address that initiated the swap call, and that received the callback"],"type":"pubkey"},{"name":"token_account_0","docs":["The payer token account in zero for one swaps, or the recipient token account","in one for zero swaps"],"type":"pubkey"},{"name":"token_account_1","docs":["The payer token account in one for zero swaps, or the recipient token account","in zero for one swaps"],"type":"pubkey"},{"name":"amount_0","docs":["The real delta amount of the token_0 of the pool or user"],"type":"u64"},{"name":"transfer_fee_0","docs":["The transfer fee charged by the withheld_amount of the token_0"],"type":"u64"},{"name":"amount_1","docs":["The real delta of the token_1 of the pool or user"],"type":"u64"},{"name":"transfer_fee_1","docs":["The transfer fee charged by the withheld_amount of the token_1"],"type":"u64"},{"name":"zero_for_one","docs":["if true, amount_0 is negtive and amount_1 is positive"],"type":"bool"},{"name":"sqrt_price_x64","docs":["The sqrt(price) of the pool after the swap, as a Q64.64"],"type":"u128"},{"name":"liquidity","docs":["The liquidity of the pool after the swap"],"type":"u128"},{"name":"tick","docs":["The log base 1.0001 of price of the pool after the swap"],"type":"i32"}]}},{"name":"TickArrayBitmapExtension","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"positive_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is positive"],"type":{"array":[{"array":["u64",8]},14]}},{"name":"negative_tick_array_bitmap","docs":["Packed initialized tick array state for start_tick_index is negitive"],"type":{"array":[{"array":["u64",8]},14]}}]}},{"name":"TickArrayState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"pool_id","type":"pubkey"},{"name":"start_tick_index","type":"i32"},{"name":"ticks","type":{"array":[{"defined":{"name":"TickState"}},60]}},{"name":"initialized_tick_count","type":"u8"},{"name":"recent_epoch","type":"u64"},{"name":"padding","type":{"array":["u8",107]}}]}},{"name":"TickState","serialization":"bytemuckunsafe","repr":{"kind":"c","packed":true},"type":{"kind":"struct","fields":[{"name":"tick","type":"i32"},{"name":"liquidity_net","docs":["Amount of net liquidity added (subtracted) when tick is crossed from left to right (right to left)"],"type":"i128"},{"name":"liquidity_gross","docs":["The total position liquidity that references this tick"],"type":"u128"},{"name":"fee_growth_outside_0_x64","docs":["Fee growth per unit of liquidity on the _other_ side of this tick (relative to the current tick)","only has relative meaning, not absolute — the value depends on when the tick is initialized"],"type":"u128"},{"name":"fee_growth_outside_1_x64","type":"u128"},{"name":"reward_growths_outside_x64","type":{"array":["u128",3]}},{"name":"padding","type":{"array":["u32",13]}}]}},{"name":"UpdateRewardInfosEvent","docs":["Emitted when Reward are updated for a pool"],"type":{"kind":"struct","fields":[{"name":"reward_growth_global_x64","docs":["Reward info"],"type":{"array":["u128",3]}}]}}]} \ No newline at end of file diff --git a/idls/stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json b/idls/stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json new file mode 100644 index 0000000..77d460f --- /dev/null +++ b/idls/stabble_stable_swap.swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ.json @@ -0,0 +1 @@ +{"address":"swapNyd8XiQwJ6ianp9snpu4brUqFxadzvHebnAXjJZ","metadata":{"name":"stable_swap","version":"1.5.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"accept_owner","discriminator":[176,23,41,28,23,111,8,4],"accounts":[{"name":"pending_owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"approve_strategy","discriminator":[7,141,162,60,71,115,26,146],"accounts":[{"name":"admin_only","accounts":[{"name":"pool","writable":true},{"name":"vault"},{"name":"admin","signer":true}]},{"name":"strategy","writable":true}],"args":[]},{"name":"change_amp_factor","discriminator":[56,238,189,35,200,157,42,66],"accounts":[{"name":"pool","writable":true},{"name":"vault"},{"name":"admin","signer":true}],"args":[{"name":"new_amp_factor","type":"u16"},{"name":"ramp_duration","type":"u32"}]},{"name":"change_max_supply","discriminator":[93,176,0,205,69,63,87,80],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_max_supply","type":"u64"}]},{"name":"change_swap_fee","discriminator":[231,15,132,51,132,165,64,170],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_swap_fee","type":"u64"}]},{"name":"change_swap_fee_privileged","discriminator":[155,200,14,91,105,38,220,119],"accounts":[{"name":"pool","writable":true},{"name":"vault"},{"name":"admin","signer":true}],"args":[{"name":"new_swap_fee","type":"u64"}]},{"name":"close_strategy","discriminator":[56,247,170,246,89,221,134,200],"accounts":[{"name":"owner_only","accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}]},{"name":"strategy","writable":true},{"name":"rent_collector","writable":true}],"args":[]},{"name":"create_strategy","discriminator":[152,160,107,148,245,190,127,224],"accounts":[{"name":"owner_only","accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}]},{"name":"strategy","writable":true}],"args":[{"name":"amp_min_factor","type":"u16"},{"name":"amp_max_factor","type":"u16"},{"name":"ramp_min_step","type":"u16"},{"name":"ramp_max_step","type":"u16"},{"name":"ramp_min_duration","type":"u32"},{"name":"ramp_max_duration","type":"u32"}]},{"name":"deposit","docs":["add liquidity"],"discriminator":[242,35,198,137,82,225,242,182],"accounts":[{"name":"user","signer":true},{"name":"user_pool_token","writable":true},{"name":"mint","writable":true},{"name":"pool","writable":true},{"name":"pool_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"token_program"},{"name":"token_program_2022"}],"args":[{"name":"amounts","type":{"vec":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"exec_strategy","discriminator":[249,46,55,57,31,38,61,27],"accounts":[{"name":"strategy"},{"name":"pool","writable":true}],"args":[{"name":"ramp_step","type":"u16"},{"name":"ramp_duration","type":"u32"}]},{"name":"initialize","docs":["initialize a pool"],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"owner","signer":true},{"name":"mint"},{"name":"pool","writable":true},{"name":"pool_authority"},{"name":"withdraw_authority"},{"name":"vault"}],"args":[{"name":"amp_factor","type":"u16"},{"name":"swap_fee","type":"u64"},{"name":"max_caps","type":{"vec":"u64"}}]},{"name":"pause","discriminator":[211,22,221,251,74,121,193,47],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"reject_owner","discriminator":[238,206,198,215,51,178,133,228],"accounts":[{"name":"pending_owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"shutdown","docs":["shutdown the zero-liquidity pool"],"discriminator":[146,204,241,213,86,21,253,211],"accounts":[{"name":"owner","writable":true},{"name":"pool","writable":true}],"args":[]},{"name":"swap","docs":["swap"],"discriminator":[248,198,158,145,225,117,135,200],"accounts":[{"name":"user","signer":true},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"vault_token_in","writable":true},{"name":"vault_token_out","writable":true},{"name":"beneficiary_token_out","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"}],"args":[{"name":"amount_in","type":{"option":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"swap_v2","discriminator":[43,4,237,11,26,201,30,98],"accounts":[{"name":"user","signer":true},{"name":"mint_in"},{"name":"mint_out"},{"name":"user_token_in","writable":true},{"name":"user_token_out","writable":true},{"name":"vault_token_in","writable":true},{"name":"vault_token_out","writable":true},{"name":"beneficiary_token_out","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"},{"name":"token_2022_program"}],"args":[{"name":"amount_in","type":{"option":"u64"}},{"name":"minimum_amount_out","type":"u64"}]},{"name":"transfer_owner","discriminator":[245,25,221,175,106,229,225,45],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[{"name":"new_owner","type":"pubkey"}]},{"name":"unpause","discriminator":[169,144,4,38,10,141,188,255],"accounts":[{"name":"owner","signer":true},{"name":"pool","writable":true}],"args":[]},{"name":"withdraw","docs":["remove liquidity"],"discriminator":[183,18,70,156,148,109,161,34],"accounts":[{"name":"user","signer":true},{"name":"user_pool_token","writable":true},{"name":"mint","writable":true},{"name":"pool","writable":true},{"name":"withdraw_authority"},{"name":"vault"},{"name":"vault_authority"},{"name":"vault_program"},{"name":"token_program"},{"name":"token_program_2022"}],"args":[{"name":"amount","type":"u64"},{"name":"minimum_amounts_out","type":{"vec":"u64"}}]}],"accounts":[{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]},{"name":"Strategy","discriminator":[174,110,39,119,82,106,169,102]},{"name":"Vault","discriminator":[211,8,232,43,2,152,117,119]}],"events":[{"name":"PoolBalanceUpdatedEvent","discriminator":[172,82,114,207,27,103,211,4]},{"name":"PoolUpdatedEvent","discriminator":[128,39,94,221,230,222,127,141]}],"types":[{"name":"Pool","type":{"kind":"struct","fields":[{"name":"owner","type":"pubkey"},{"name":"vault","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"authority_bump","type":"u8"},{"name":"is_active","type":"bool"},{"name":"amp_initial_factor","type":"u16"},{"name":"amp_target_factor","type":"u16"},{"name":"ramp_start_ts","type":"i64"},{"name":"ramp_stop_ts","type":"i64"},{"name":"swap_fee","type":"u64"},{"name":"tokens","type":{"vec":{"defined":{"name":"PoolToken"}}}},{"name":"pending_owner","type":{"option":"pubkey"}},{"name":"max_supply","type":"u64"}]}},{"name":"PoolBalanceUpdatedData","type":{"kind":"struct","fields":[{"name":"balances","type":{"vec":"u64"}}]}},{"name":"PoolBalanceUpdatedEvent","type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"data","type":{"defined":{"name":"PoolBalanceUpdatedData"}}}]}},{"name":"PoolToken","type":{"kind":"struct","fields":[{"name":"mint","type":"pubkey"},{"name":"decimals","type":"u8"},{"name":"scaling_up","type":"bool"},{"name":"scaling_factor","type":"u64"},{"name":"balance","type":"u64"}]}},{"name":"PoolUpdatedData","type":{"kind":"struct","fields":[{"name":"is_active","type":"bool"},{"name":"amp_initial_factor","type":"u16"},{"name":"amp_target_factor","type":"u16"},{"name":"ramp_start_ts","type":"i64"},{"name":"ramp_stop_ts","type":"i64"},{"name":"swap_fee","type":"u64"},{"name":"max_supply","type":"u64"}]}},{"name":"PoolUpdatedEvent","type":{"kind":"struct","fields":[{"name":"pubkey","type":"pubkey"},{"name":"data","type":{"defined":{"name":"PoolUpdatedData"}}}]}},{"name":"Strategy","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"is_active","type":"bool"},{"name":"amp_min_factor","type":"u16"},{"name":"amp_max_factor","type":"u16"},{"name":"ramp_min_step","type":"u16"},{"name":"ramp_max_step","type":"u16"},{"name":"ramp_min_duration","type":"u32"},{"name":"ramp_max_duration","type":"u32"}]}},{"name":"Vault","type":{"kind":"struct","fields":[{"name":"admin","type":"pubkey"},{"name":"withdraw_authority","docs":["PDA of pool programs seeded by vault address"],"type":"pubkey"},{"name":"withdraw_authority_bump","docs":["bump seed of withdraw_authority PDA"],"type":"u8"},{"name":"authority_bump","docs":["bump seed of vault_authority PDA"],"type":"u8"},{"name":"is_active","type":"bool"},{"name":"beneficiary","type":"pubkey"},{"name":"beneficiary_fee","type":"u64"},{"name":"pending_admin","type":{"option":"pubkey"}}]}}]} \ No newline at end of file diff --git a/idls/stabble_weighted_swap.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json b/idls/stabble_weighted_swap.swapFpHZwjELNnjvThjajtiVmkz3yPQEHjLtka2fwHW.json new file mode 100644 index 0000000..e69de29 diff --git a/idls/streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json b/idls/streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json new file mode 100644 index 0000000..3068154 --- /dev/null +++ b/idls/streamflow.strmRqUCoQUgGUan5YhzUZa6KqdzwX5L6FpUxfmKg5m.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"timelock","instructions":[{"name":"create","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"recipient","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":true},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"recipientTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeOracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"timelockProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"startTime","type":"u64"},{"name":"netAmountDeposited","type":"u64"},{"name":"period","type":"u64"},{"name":"amountPerPeriod","type":"u64"},{"name":"cliff","type":"u64"},{"name":"cliffAmount","type":"u64"},{"name":"cancelableBySender","type":"bool"},{"name":"cancelableByRecipient","type":"bool"},{"name":"automaticWithdrawal","type":"bool"},{"name":"transferableBySender","type":"bool"},{"name":"transferableByRecipient","type":"bool"},{"name":"canTopup","type":"bool"},{"name":"streamName","type":{"array":["u8",64]}},{"name":"withdrawFrequency","type":"u64"},{"name":"pausable","type":{"option":"bool"}},{"name":"canUpdateRate","type":{"option":"bool"}}]},{"name":"createUnchecked","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeOracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"timelockProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"startTime","type":"u64"},{"name":"netAmountDeposited","type":"u64"},{"name":"period","type":"u64"},{"name":"amountPerPeriod","type":"u64"},{"name":"cliff","type":"u64"},{"name":"cliffAmount","type":"u64"},{"name":"cancelableBySender","type":"bool"},{"name":"cancelableByRecipient","type":"bool"},{"name":"automaticWithdrawal","type":"bool"},{"name":"transferableBySender","type":"bool"},{"name":"transferableByRecipient","type":"bool"},{"name":"canTopup","type":"bool"},{"name":"streamName","type":{"array":["u8",64]}},{"name":"withdrawFrequency","type":"u64"},{"name":"recipient","type":"publicKey"},{"name":"partner","type":"publicKey"},{"name":"pausable","type":"bool"},{"name":"canUpdateRate","type":"bool"}]},{"name":"createUncheckedWithPayer","accounts":[{"name":"payer","isMut":true,"isSigner":true},{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"feeOracle","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"timelockProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"startTime","type":"u64"},{"name":"netAmountDeposited","type":"u64"},{"name":"period","type":"u64"},{"name":"amountPerPeriod","type":"u64"},{"name":"cliff","type":"u64"},{"name":"cliffAmount","type":"u64"},{"name":"cancelableBySender","type":"bool"},{"name":"cancelableByRecipient","type":"bool"},{"name":"automaticWithdrawal","type":"bool"},{"name":"transferableBySender","type":"bool"},{"name":"transferableByRecipient","type":"bool"},{"name":"canTopup","type":"bool"},{"name":"streamName","type":{"array":["u8",64]}},{"name":"withdrawFrequency","type":"u64"},{"name":"recipient","type":"publicKey"},{"name":"partner","type":"publicKey"},{"name":"pausable","type":"bool"},{"name":"canUpdateRate","type":"bool"}]},{"name":"withdraw","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"recipient","isMut":true,"isSigner":false},{"name":"recipientTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"cancel","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"sender","isMut":true,"isSigner":false},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"recipient","isMut":true,"isSigner":false},{"name":"recipientTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"transferRecipient","accounts":[{"name":"authority","isMut":true,"isSigner":true},{"name":"newRecipient","isMut":true,"isSigner":false},{"name":"newRecipientTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"associatedTokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"topup","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"senderTokens","isMut":true,"isSigner":false},{"name":"metadata","isMut":true,"isSigner":false},{"name":"escrowTokens","isMut":true,"isSigner":false},{"name":"streamflowTreasury","isMut":true,"isSigner":false},{"name":"streamflowTreasuryTokens","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"partner","isMut":true,"isSigner":false},{"name":"partnerTokens","isMut":true,"isSigner":false},{"name":"mint","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"pause","accounts":[{"name":"sender","isMut":false,"isSigner":true},{"name":"metadata","isMut":true,"isSigner":false}],"args":[]},{"name":"unpause","accounts":[{"name":"sender","isMut":false,"isSigner":true},{"name":"metadata","isMut":true,"isSigner":false}],"args":[]},{"name":"update","accounts":[{"name":"sender","isMut":true,"isSigner":true},{"name":"metadata","isMut":true,"isSigner":false},{"name":"withdrawor","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"enableAutomaticWithdrawal","type":{"option":"bool"}},{"name":"withdrawFrequency","type":{"option":"u64"}},{"name":"amountPerPeriod","type":{"option":"u64"}}]}]} \ No newline at end of file diff --git a/idls/vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json b/idls/vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json new file mode 100644 index 0000000..4998453 --- /dev/null +++ b/idls/vertigo.vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ.json @@ -0,0 +1 @@ +{"address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ","metadata":{"name":"amm","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"buy","discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"user","signer":true},{"name":"owner"},{"name":"mint_a"},{"name":"mint_b"},{"name":"user_ta_a","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"user_ta_b","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"vault_b","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_b"}]}},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}]},{"name":"claim","discriminator":[62,198,214,193,213,159,108,210],"accounts":[{"name":"pool","writable":true},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"claimer","signer":true},{"name":"mint_a","docs":["The token mint of the tokens used in the pool."]},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"receiver_ta_a","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"token_program_a"}],"args":[]},{"name":"create","discriminator":[24,30,200,40,5,28,7,119],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"owner","signer":true},{"name":"token_wallet_authority","signer":true},{"name":"mint_a"},{"name":"mint_b"},{"name":"token_wallet_b","docs":["Token wallet that funds the pool with token B."],"writable":true},{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"vault_b","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_b"}]}},{"name":"token_program_a","docs":["Required programs and sysvars"]},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"params","type":{"defined":{"name":"CreateParams"}}}]},{"name":"quote_buy","discriminator":[83,9,231,110,146,31,40,12],"accounts":[{"name":"pool","pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"owner"},{"name":"user"},{"name":"mint_a"},{"name":"mint_b"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}],"returns":{"defined":{"name":"SwapResult"}}},{"name":"quote_sell","discriminator":[5,178,49,206,140,231,131,145],"accounts":[{"name":"pool","pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"owner"},{"name":"user"},{"name":"mint_a"},{"name":"mint_b"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}],"returns":{"defined":{"name":"SwapResult"}}},{"name":"sell","discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"pool","writable":true,"pda":{"seeds":[{"kind":"const","value":[112,111,111,108]},{"kind":"account","path":"owner"},{"kind":"account","path":"mint_a"},{"kind":"account","path":"mint_b"}]}},{"name":"user","signer":true},{"name":"owner"},{"name":"mint_a"},{"name":"mint_b"},{"name":"user_ta_a","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"user_ta_b","docs":["Can be any token account owned by the user for this mint"],"writable":true},{"name":"vault_a","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_a"}]}},{"name":"vault_b","writable":true,"pda":{"seeds":[{"kind":"account","path":"pool"},{"kind":"account","path":"mint_b"}]}},{"name":"token_program_a"},{"name":"token_program_b"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"program","address":"vrTGoBuy5rYSxAfV3jaRJWHH6nN9WK4NRExGxsk1bCJ"}],"args":[{"name":"params","type":{"defined":{"name":"SwapParams"}}}]}],"accounts":[{"name":"Pool","discriminator":[241,154,109,4,17,177,109,188]}],"events":[{"name":"BuyEvent","discriminator":[103,244,82,31,44,245,119,119]},{"name":"PoolCreated","discriminator":[202,44,41,88,104,220,157,82]},{"name":"SellEvent","discriminator":[62,47,55,10,165,3,220,42]}],"errors":[{"code":6000,"name":"PoolDisabled","msg":"Pool Disabled"},{"code":6001,"name":"OwnerMustBeSystemAccount","msg":"Owner must be a system account (wallet), not a PDA"},{"code":6002,"name":"InvalidFeeDecay","msg":"Invalid Fee Decay"},{"code":6003,"name":"InvalidInitialTokenReserves","msg":"Initial token reserves must be greater than 0"},{"code":6004,"name":"InvalidMint","msg":"Invalid Mint"},{"code":6005,"name":"InvalidTokenAccount","msg":"Invalid Token Account"},{"code":6006,"name":"InsufficientFunds","msg":"Insufficient Funds"},{"code":6007,"name":"InvalidShift","msg":"Shift must be greater than 0"},{"code":6008,"name":"InvalidFees","msg":"Fees must be between 0 and 10000 basis points"},{"code":6009,"name":"MathOverflow","msg":"MathOverflow"},{"code":6010,"name":"InsufficientOutput","msg":"Insufficient output"},{"code":6011,"name":"InsufficientInput","msg":"Insufficient input"},{"code":6012,"name":"IllegalClaimant","msg":"Illegal Claimant"},{"code":6013,"name":"PoolEmpty","msg":"Pool Empty"}],"types":[{"name":"BuyEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"amount_a","type":"u64"},{"name":"amount_b","type":"u64"},{"name":"new_reserves_a","type":"u128"},{"name":"new_reserves_b","type":"u128"},{"name":"fee_a","type":"u64"}]}},{"name":"CreateParams","type":{"kind":"struct","fields":[{"name":"shift","type":"u128"},{"name":"initial_token_b_reserves","type":"u64"},{"name":"fee_params","type":{"defined":{"name":"FeeParams"}}}]}},{"name":"FeeParams","type":{"kind":"struct","fields":[{"name":"normalization_period","docs":["The normalization period in slots.","During this period, the fee will decay from 100% to the base fee."],"type":"u64"},{"name":"decay","docs":["Normalization period fee decay rate.","Higher values decay faster."],"type":"f64"},{"name":"reference","docs":["Reference slot for the fee calculation."],"type":"u64"},{"name":"royalties_bps","docs":["Royalties in basis points."],"type":"u16"},{"name":"privileged_swapper","docs":["Number of fee exempt buys."],"type":{"option":"pubkey"}}]}},{"name":"Pool","type":{"kind":"struct","fields":[{"name":"enabled","type":"bool"},{"name":"owner","type":"pubkey"},{"name":"mint_a","type":"pubkey"},{"name":"mint_b","type":"pubkey"},{"name":"token_a_reserves","type":"u128"},{"name":"token_b_reserves","type":"u128"},{"name":"shift","type":"u128"},{"name":"royalties","type":"u64"},{"name":"vertigo_fees","type":"u64"},{"name":"bump","type":"u8"},{"name":"fee_params","type":{"defined":{"name":"FeeParams"}}}]}},{"name":"PoolCreated","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"mint_a","type":"pubkey"},{"name":"mint_b","type":"pubkey"},{"name":"owner","type":"pubkey"},{"name":"initial_token_reserves","type":"u64"},{"name":"shift","type":"u128"},{"name":"fee_params","type":{"defined":{"name":"FeeParams"}}}]}},{"name":"SellEvent","type":{"kind":"struct","fields":[{"name":"pool","type":"pubkey"},{"name":"user","type":"pubkey"},{"name":"amount_a","type":"u64"},{"name":"amount_b","type":"u64"},{"name":"new_reserves_a","type":"u128"},{"name":"new_reserves_b","type":"u128"},{"name":"fee_a","type":"u64"}]}},{"name":"SwapParams","type":{"kind":"struct","fields":[{"name":"amount","type":"u64"},{"name":"limit","type":"u64"}]}},{"name":"SwapResult","type":{"kind":"struct","fields":[{"name":"new_reserves_a","type":"u128"},{"name":"new_reserves_b","type":"u128"},{"name":"amount_a","type":"u64"},{"name":"amount_b","type":"u64"},{"name":"fee_a","type":"u64"}]}}]} \ No newline at end of file diff --git a/idls/virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json b/idls/virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json new file mode 100644 index 0000000..c0c7861 --- /dev/null +++ b/idls/virtuals.5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki.json @@ -0,0 +1 @@ +{"address":"5U3EU2ubXtK84QcRjWVmYt9RaDyA8gKxdUrPFXmZyaki","metadata":{"name":"virtuals_program","version":"0.1.0","spec":"0.1.0","description":"Created with Anchor"},"instructions":[{"name":"buy","discriminator":[102,6,61,18,1,218,235,234],"accounts":[{"name":"user","signer":true},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_mint"},{"name":"user_virtuals_ata","writable":true},{"name":"user_token_ata","writable":true},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform_prototype","writable":true,"address":"933jV351WDG23QTcHPqLFJxyYRrEPWRTR3qoPWi3jwEL"},{"name":"platform_prototype_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_prototype"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"amount","type":"u64"},{"name":"max_amount_out","type":"u64"}]},{"name":"claim_fees","discriminator":[82,251,233,156,12,52,184,202],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform","writable":true,"address":"FxKXqCKXdxPbfYau83ZkGUXgcZWhKBTfAjGg2KzYSopS"},{"name":"platform_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"creator_virtuals_ata","writable":true},{"name":"creator_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool.creator","account":"VirtualsPool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"pool","writable":true},{"name":"lp_mint","writable":true},{"name":"lock_escrow","writable":true},{"name":"escrow_vault","writable":true},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"virtuals_vault","writable":true},{"name":"token_vault","writable":true},{"name":"virtuals_token_vault","writable":true},{"name":"token_token_vault","writable":true},{"name":"virtuals_vault_lp_mint","writable":true},{"name":"token_vault_lp_mint","writable":true},{"name":"virtuals_vault_lp","writable":true},{"name":"token_vault_lp","writable":true},{"name":"vault_program","address":"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"dynamic_amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"}],"args":[]},{"name":"create_meteora_pool","discriminator":[246,254,33,37,225,176,41,232],"accounts":[{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"meteora_deployer","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,101,111,114,97,95,100,101,112,108,111,121,101,114]}]}},{"name":"meteora_deployer_virtuals_ata","writable":true},{"name":"meteora_deployer_token_ata","writable":true},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lock_escrow","writable":true},{"name":"escrow_vault","writable":true},{"name":"pool","writable":true},{"name":"config","address":"B6FT4AHhQJ7BttrC1i223km5bYRUA2nVwBR7k5TVwLtx"},{"name":"lp_mint","writable":true},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"virtuals_vault","writable":true},{"name":"token_vault","writable":true},{"name":"virtuals_token_vault","writable":true},{"name":"token_token_vault","writable":true},{"name":"virtuals_vault_lp_mint","writable":true},{"name":"token_vault_lp_mint","writable":true},{"name":"virtuals_vault_lp","writable":true},{"name":"token_vault_lp","writable":true},{"name":"pool_virtuals_ata","writable":true},{"name":"pool_token_ata","writable":true},{"name":"meteora_deployer_pool_lp","writable":true},{"name":"protocol_virtuals_fee","writable":true},{"name":"protocol_token_fee","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"token_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"metadata_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"account","path":"metadata_program"}}},{"name":"rent","docs":["Rent account."],"address":"SysvarRent111111111111111111111111111111111"},{"name":"mint_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"vault_program","address":"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Associated token program."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"},{"name":"dynamic_amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"}],"args":[]},{"name":"initialize","docs":["# Initialize Pool","","This is where Virtuals creates a new mint address and pool and mints the initial 1,000,000,000 tokens.","This enabels Virtuals to premine addresses and \\","sell\\\\","them to customers without any delays of mining the","address. While this instruction could be permissioned, it is currently permissionless. As such, we make","sure to handle all the necessary checks such as: address suffix, zero supply, 6 decimals, correct mint","authority."],"discriminator":[175,175,109,31,13,152,155,237],"accounts":[{"name":"payer","writable":true,"signer":true},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint","writable":true},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]},{"name":"initialize_meteora_accounts","discriminator":[53,12,118,158,253,239,185,214],"accounts":[{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"meteora_deployer","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,101,111,114,97,95,100,101,112,108,111,121,101,114]}]}},{"name":"meteora_deployer_virtuals_ata","writable":true},{"name":"meteora_deployer_token_ata","writable":true},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"lock_escrow","writable":true},{"name":"escrow_vault","writable":true},{"name":"pool","writable":true},{"name":"config","address":"B6FT4AHhQJ7BttrC1i223km5bYRUA2nVwBR7k5TVwLtx"},{"name":"lp_mint","writable":true},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"virtuals_vault","writable":true},{"name":"token_vault","writable":true},{"name":"virtuals_token_vault","writable":true},{"name":"token_token_vault","writable":true},{"name":"virtuals_vault_lp_mint","writable":true},{"name":"token_vault_lp_mint","writable":true},{"name":"virtuals_vault_lp","writable":true},{"name":"token_vault_lp","writable":true},{"name":"pool_virtuals_ata","writable":true},{"name":"pool_token_ata","writable":true},{"name":"meteora_deployer_pool_lp","writable":true},{"name":"protocol_virtuals_fee","writable":true},{"name":"protocol_token_fee","writable":true},{"name":"payer","writable":true,"signer":true},{"name":"token_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"metadata_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"account","path":"metadata_program"}}},{"name":"rent","docs":["Rent account."],"address":"SysvarRent111111111111111111111111111111111"},{"name":"mint_metadata","writable":true},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"vault_program","address":"24Uqj9JCLxUeoC3hGfh5W3s9FM9uCHDS2SG3LYwBpyTi"},{"name":"token_program","docs":["Token program."],"address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","docs":["Associated token program."],"address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","docs":["System program."],"address":"11111111111111111111111111111111"},{"name":"dynamic_amm_program","address":"Eo7WjKq67rjJQSZxS6z3YkapzY3eMj6Xy8X5EQVn5UaB"}],"args":[]},{"name":"launch","docs":["","This is where a user comes along and purchases a mint address and pool. The user will provide a name,","symbol and URI containing offchain metadata. The contract will initialize a new onchain metadata","account containing these values, then revoke the mint authority.",""],"discriminator":[153,241,93,225,22,69,74,61],"accounts":[{"name":"creator","writable":true,"signer":true},{"name":"creator_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_mint","writable":true},{"name":"platform_prototype","writable":true,"address":"933jV351WDG23QTcHPqLFJxyYRrEPWRTR3qoPWi3jwEL"},{"name":"platform_prototype_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_prototype"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_metadata","writable":true,"pda":{"seeds":[{"kind":"const","value":[109,101,116,97,100,97,116,97]},{"kind":"account","path":"metadata_program"},{"kind":"account","path":"token_mint"}],"program":{"kind":"account","path":"metadata_program"}}},{"name":"metadata_program","address":"metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s"},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"},{"name":"rent","address":"SysvarRent111111111111111111111111111111111"}],"args":[{"name":"symbol","type":"string"},{"name":"name","type":"string"},{"name":"uri","type":"string"}]},{"name":"sell","discriminator":[51,230,133,164,1,127,131,173],"accounts":[{"name":"user","signer":true},{"name":"vpool","writable":true,"pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_mint"},{"name":"user_virtuals_ata","writable":true},{"name":"user_token_ata","writable":true},{"name":"vpool_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"platform_prototype","writable":true,"address":"933jV351WDG23QTcHPqLFJxyYRrEPWRTR3qoPWi3jwEL"},{"name":"platform_prototype_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"platform_prototype"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"vpool"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"const","value":[40,82,144,230,223,30,203,194,218,8,182,83,3,69,230,99,143,96,63,54,49,170,42,186,128,143,177,157,236,50,113,76]}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"}],"args":[{"name":"amount","type":"u64"},{"name":"min_amount_out","type":"u64"}]},{"name":"update_pool_creator","discriminator":[113,225,166,185,94,231,96,28],"accounts":[{"name":"creator","writable":true,"signer":true,"relations":["vpool"]},{"name":"new_creator"},{"name":"virtuals_mint","address":"3iQL8BFS2vE7mww4ehAqQHAsbmRNCrPxizWAT2Zfyr9y"},{"name":"token_mint"},{"name":"new_creator_virtuals_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"new_creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"virtuals_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"new_creator_token_ata","writable":true,"pda":{"seeds":[{"kind":"account","path":"new_creator"},{"kind":"const","value":[6,221,246,225,215,101,161,147,217,203,225,70,206,235,121,172,28,180,133,237,95,91,55,145,58,140,245,133,126,255,0,169]},{"kind":"account","path":"token_mint"}],"program":{"kind":"const","value":[140,151,37,143,78,36,137,241,187,61,16,41,20,142,13,131,11,90,19,153,218,255,16,132,4,142,123,216,219,233,248,89]}}},{"name":"vpool","pda":{"seeds":[{"kind":"const","value":[118,112,111,111,108]},{"kind":"account","path":"token_mint"}]}},{"name":"token_program","address":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"name":"associated_token_program","address":"ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL"},{"name":"system_program","address":"11111111111111111111111111111111"}],"args":[]}],"accounts":[{"name":"VirtualsPool","discriminator":[71,118,5,203,5,98,135,116]}],"events":[{"name":"BuyEvent","discriminator":[103,244,82,31,44,245,119,119]},{"name":"GraduationEvent","discriminator":[10,246,223,127,48,98,149,55]},{"name":"LaunchEvent","discriminator":[27,193,47,130,115,92,239,94]},{"name":"SellEvent","discriminator":[62,47,55,10,165,3,220,42]}],"errors":[{"code":6000,"name":"InvalidMintAddress","msg":"Invalid mint address"},{"code":6001,"name":"InvalidMintParams","msg":"Invalid mint params"},{"code":6002,"name":"CurveError","msg":"Curve error"},{"code":6003,"name":"InvalidFee","msg":"Fee cannot exceed 100%"},{"code":6004,"name":"NameTooLong","msg":"Name too long. Max length = 20"},{"code":6005,"name":"SymbolTooLong","msg":"Symbol too long. Max length = 10"},{"code":6006,"name":"URITooLong","msg":"URI too long. Max length = 200"},{"code":6007,"name":"InvalidAmount","msg":"Amount must be >0"},{"code":6008,"name":"SlippageExceeded","msg":"Slippage exceeded"},{"code":6009,"name":"InvalidVPoolState","msg":"Invalid vpool state"},{"code":6010,"name":"InvalidName","msg":"Invalid name"},{"code":6011,"name":"InvalidSymbol","msg":"Invalid symbol"},{"code":6012,"name":"InvalidURI","msg":"Invalid URI"}],"types":[{"name":"BuyEvent","type":{"kind":"struct","fields":[{"name":"buy_amount","type":"u64"},{"name":"virtuals_amount","type":"u64"}]}},{"name":"GraduationEvent","type":{"kind":"struct","fields":[{"name":"vpool","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"balance","type":"u64"}]}},{"name":"LaunchEvent","type":{"kind":"struct","fields":[{"name":"vpool","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"creator","type":"pubkey"}]}},{"name":"PoolState","type":{"kind":"enum","variants":[{"name":"Initialized"},{"name":"Active"},{"name":"Graduated"},{"name":"Migrated"}]}},{"name":"SellEvent","type":{"kind":"struct","fields":[{"name":"sell_amount","type":"u64"},{"name":"virtuals_amount","type":"u64"}]}},{"name":"VirtualsPool","type":{"kind":"struct","fields":[{"name":"creator","type":"pubkey"},{"name":"mint","type":"pubkey"},{"name":"virtual_y","type":"u64"},{"name":"graduation_x","type":"u64"},{"name":"state","type":{"defined":{"name":"PoolState"}}},{"name":"bump","type":"u8"}]}}]} \ No newline at end of file diff --git a/idls/woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json b/idls/woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json new file mode 100644 index 0000000..dd5fa49 --- /dev/null +++ b/idls/woofi.WooFif76YGRNjk1pA8wCsN67aQsD9f9iLsz4NcJ1AVb.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"woofi","instructions":[{"name":"createConfig","accounts":[{"name":"authority","isMut":true,"isSigner":true},{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createWooracle","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"feedAccount","isMut":false,"isSigner":false},{"name":"priceUpdate","isMut":false,"isSigner":false},{"name":"quoteTokenMint","isMut":false,"isSigner":false},{"name":"quoteFeedAccount","isMut":false,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false}],"args":[{"name":"maximumAge","type":"u64"}]},{"name":"setOracleMaximumAge","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"maximumAge","type":"u64"}]},{"name":"setStaleDuration","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"staleDuration","type":"i64"}]},{"name":"setWooBound","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"bound","type":"u64"}]},{"name":"setWooRange","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"rangeMin","type":"u128"},{"name":"rangeMax","type":"u128"}]},{"name":"setWooPrice","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"price","type":"u128"}]},{"name":"setWooCoeff","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"coeff","type":"u64"}]},{"name":"setWooSpread","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"spread","type":"u64"}]},{"name":"setWooAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"adminAuthority","type":{"vec":"publicKey"}}]},{"name":"setGuardianAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"guardianAuthority","type":{"vec":"publicKey"}}]},{"name":"setLendingManager","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"lendingManagers","type":{"vec":"publicKey"}}]},{"name":"setSuperchargerVaultWhitelist","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"superchargerVaults","type":{"vec":"publicKey"}}]},{"name":"setWooState","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"price","type":"u128"},{"name":"coeff","type":"u64"},{"name":"spread","type":"u64"}]},{"name":"getPrice","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"priceUpdate","isMut":false,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false}],"args":[],"returns":{"defined":"GetPriceResult"}},{"name":"createPool","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"quoteTokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":true},{"name":"wooracle","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"createWooAmmPool","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"wooammpool","isMut":true,"isSigner":false},{"name":"wooracleA","isMut":false,"isSigner":false},{"name":"woopoolA","isMut":false,"isSigner":false},{"name":"wooracleB","isMut":false,"isSigner":false},{"name":"woopoolB","isMut":false,"isSigner":false},{"name":"woopoolQuote","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"setPoolAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"adminAuthority","type":{"vec":"publicKey"}}]},{"name":"setFeeAdmin","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"feeAuthority","type":{"vec":"publicKey"}}]},{"name":"setPauseRole","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"pauseAuthority","type":{"vec":"publicKey"}}]},{"name":"pause","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"unpause","accounts":[{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"setPoolFeeRate","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"feeRate","type":"u16"}]},{"name":"setPoolMaxGamma","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"maxGamma","type":"u128"}]},{"name":"setPoolMaxNotionalSwap","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"maxNotionalSwap","type":"u128"}]},{"name":"setPoolCapBal","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"capBal","type":"u128"}]},{"name":"setPoolMinSwapAmount","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"minSwapAmount","type":"u128"}]},{"name":"tryQuery","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracleFrom","isMut":false,"isSigner":false},{"name":"woopoolFrom","isMut":false,"isSigner":false},{"name":"priceUpdateFrom","isMut":true,"isSigner":false},{"name":"wooracleTo","isMut":false,"isSigner":false},{"name":"woopoolTo","isMut":false,"isSigner":false},{"name":"priceUpdateTo","isMut":true,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false}],"args":[{"name":"fromAmount","type":"u128"}],"returns":{"defined":"QueryResult"}},{"name":"query","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracleFrom","isMut":false,"isSigner":false},{"name":"woopoolFrom","isMut":false,"isSigner":false},{"name":"tokenVaultFrom","isMut":true,"isSigner":false},{"name":"priceUpdateFrom","isMut":true,"isSigner":false},{"name":"wooracleTo","isMut":false,"isSigner":false},{"name":"woopoolTo","isMut":false,"isSigner":false},{"name":"tokenVaultTo","isMut":false,"isSigner":false},{"name":"priceUpdateTo","isMut":true,"isSigner":false},{"name":"woopoolQuote","isMut":false,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false},{"name":"quoteTokenVault","isMut":false,"isSigner":false}],"args":[{"name":"fromAmount","type":"u128"},{"name":"minToAmount","type":"u128"}],"returns":{"defined":"QueryResult"}},{"name":"swap","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"payer","isMut":false,"isSigner":true},{"name":"wooracleFrom","isMut":true,"isSigner":false},{"name":"woopoolFrom","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountFrom","isMut":true,"isSigner":false},{"name":"tokenVaultFrom","isMut":true,"isSigner":false},{"name":"priceUpdateFrom","isMut":true,"isSigner":false},{"name":"wooracleTo","isMut":true,"isSigner":false},{"name":"woopoolTo","isMut":true,"isSigner":false},{"name":"tokenOwnerAccountTo","isMut":true,"isSigner":false},{"name":"tokenVaultTo","isMut":true,"isSigner":false},{"name":"priceUpdateTo","isMut":true,"isSigner":false},{"name":"woopoolQuote","isMut":true,"isSigner":false},{"name":"quotePriceUpdate","isMut":false,"isSigner":false},{"name":"quoteTokenVault","isMut":true,"isSigner":false},{"name":"rebateTo","isMut":false,"isSigner":false}],"args":[{"name":"fromAmount","type":"u128"},{"name":"minToAmount","type":"u128"}]},{"name":"deposit","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenOwnerAccount","isMut":true,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u128"}]},{"name":"withdraw","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"toTokenAccount","isMut":true,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u128"}]},{"name":"claimFee","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"claimFeeToAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"claimFeeAmount","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"claimFeeToAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"claimAmount","type":"u128"}]},{"name":"incaseTokenGotStuck","accounts":[{"name":"tokenMint","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"toTokenAccount","isMut":true,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u128"}]},{"name":"setWooconfigNewAuthority","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":true,"isSigner":false},{"name":"newAuthority","isMut":false,"isSigner":false}],"args":[]},{"name":"claimWooconfigAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":true,"isSigner":false}],"args":[]},{"name":"claimWooracleAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooracle","isMut":true,"isSigner":false}],"args":[]},{"name":"claimWoopoolAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"woopool","isMut":true,"isSigner":false}],"args":[]},{"name":"claimWooammpoolAuthority","accounts":[{"name":"newAuthority","isMut":false,"isSigner":true},{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"wooammpool","isMut":true,"isSigner":false}],"args":[]},{"name":"repayByLendingManager","accounts":[{"name":"wooconfig","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"woopool","isMut":true,"isSigner":false},{"name":"tokenVault","isMut":true,"isSigner":false},{"name":"superChargerVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"repayAmount","type":"u128"}]}],"accounts":[{"name":"WooAmmPool","type":{"kind":"struct","fields":[{"name":"wooconfig","type":"publicKey"},{"name":"wooammpoolBump","type":{"array":["u8",1]}},{"name":"authority","type":"publicKey"},{"name":"wooracleA","type":"publicKey"},{"name":"woopoolA","type":"publicKey"},{"name":"feedAccountA","type":"publicKey"},{"name":"priceUpdateA","type":"publicKey"},{"name":"tokenMintA","type":"publicKey"},{"name":"tokenVaultA","type":"publicKey"},{"name":"wooracleB","type":"publicKey"},{"name":"woopoolB","type":"publicKey"},{"name":"feedAccountB","type":"publicKey"},{"name":"priceUpdateB","type":"publicKey"},{"name":"tokenMintB","type":"publicKey"},{"name":"tokenVaultB","type":"publicKey"},{"name":"quoteTokenMint","type":"publicKey"},{"name":"quoteFeedAccount","type":"publicKey"},{"name":"quotePriceUpdate","type":"publicKey"},{"name":"quoteWoopool","type":"publicKey"},{"name":"quoteVault","type":"publicKey"}]}},{"name":"WooConfig","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"paused","type":"bool"},{"name":"woopoolAdminAuthority","type":{"vec":"publicKey"}},{"name":"wooracleAdminAuthority","type":{"vec":"publicKey"}},{"name":"feeAuthority","type":{"vec":"publicKey"}},{"name":"guardianAuthority","type":{"vec":"publicKey"}},{"name":"pauseAuthority","type":{"vec":"publicKey"}},{"name":"lendingManagerAuthority","type":{"vec":"publicKey"}},{"name":"superchargerVaultWhitelist","type":{"vec":"publicKey"}},{"name":"newAuthority","type":"publicKey"}]}},{"name":"WooPool","type":{"kind":"struct","fields":[{"name":"wooconfig","type":"publicKey"},{"name":"woopoolBump","type":{"array":["u8",1]}},{"name":"authority","type":"publicKey"},{"name":"wooracle","type":"publicKey"},{"name":"feeRate","type":"u16"},{"name":"maxGamma","type":"u128"},{"name":"maxNotionalSwap","type":"u128"},{"name":"capBal","type":"u128"},{"name":"minSwapAmount","type":"u128"},{"name":"unclaimedFee","type":"u128"},{"name":"tokenMint","type":"publicKey"},{"name":"tokenVault","type":"publicKey"},{"name":"quoteTokenMint","type":"publicKey"},{"name":"baseDecimals","type":"u8"}]}},{"name":"Wooracle","type":{"kind":"struct","fields":[{"name":"wooconfig","type":"publicKey"},{"name":"authority","type":"publicKey"},{"name":"tokenMint","type":"publicKey"},{"name":"feedAccount","type":"publicKey"},{"name":"priceUpdate","type":"publicKey"},{"name":"maximumAge","type":"u64"},{"name":"priceDecimals","type":"u8"},{"name":"quoteDecimals","type":"u8"},{"name":"baseDecimals","type":"u8"},{"name":"updatedAt","type":"i64"},{"name":"staleDuration","type":"i64"},{"name":"bound","type":"u64"},{"name":"price","type":"u128"},{"name":"coeff","type":"u64"},{"name":"spread","type":"u64"},{"name":"rangeMin","type":"u128"},{"name":"rangeMax","type":"u128"},{"name":"quoteTokenMint","type":"publicKey"},{"name":"quoteFeedAccount","type":"publicKey"},{"name":"quotePriceUpdate","type":"publicKey"}]}}],"types":[{"name":"GetPriceResult","type":{"kind":"struct","fields":[{"name":"priceOut","type":"u128"},{"name":"feasibleOut","type":"bool"}]}},{"name":"GetStateResult","type":{"kind":"struct","fields":[{"name":"priceOut","type":"u128"},{"name":"spread","type":"u64"},{"name":"coeff","type":"u64"},{"name":"feasibleOut","type":"bool"}]}},{"name":"QueryResult","type":{"kind":"struct","fields":[{"name":"toAmount","type":"u128"},{"name":"swapFee","type":"u128"}]}}],"events":[{"name":"PauseEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false}]},{"name":"UnPauseEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false}]},{"name":"DepositEvent","fields":[{"name":"tokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"depositAmount","type":"u128","index":false}]},{"name":"WithdrawEvent","fields":[{"name":"tokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"withdrawAmount","type":"u128","index":false}]},{"name":"RepayEvent","fields":[{"name":"tokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"repayAmount","type":"u128","index":false}]},{"name":"ClaimFeeEvent","fields":[{"name":"quoteTokenMint","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"claimFeeToAccount","type":"publicKey","index":false},{"name":"claimAmount","type":"u128","index":false}]},{"name":"WooPoolAdminUpdatedEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"admins","type":{"vec":"publicKey"},"index":false}]},{"name":"FeeAdminUpdatedEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"feeAdmins","type":{"vec":"publicKey"},"index":false}]},{"name":"PauseRoleUpdatedEvent","fields":[{"name":"wooconfig","type":"publicKey","index":false},{"name":"authority","type":"publicKey","index":false},{"name":"pauseRoles","type":{"vec":"publicKey"},"index":false}]},{"name":"SwapEvent","fields":[{"name":"sender","type":"publicKey","index":false},{"name":"fromTokenMint","type":"publicKey","index":false},{"name":"toTokenMint","type":"publicKey","index":false},{"name":"fromAmount","type":"u128","index":false},{"name":"toAmount","type":"u128","index":false},{"name":"fromAccount","type":"publicKey","index":false},{"name":"toAccount","type":"publicKey","index":false},{"name":"rebateTo","type":"publicKey","index":false},{"name":"swapVol","type":"u128","index":false},{"name":"swapFee","type":"u128","index":false}]}],"errors":[{"code":6000,"name":"DivideByZero","msg":"Unable to divide by zero"},{"code":6001,"name":"NumberCastError","msg":"Unable to cast number into BigInt"},{"code":6002,"name":"FeeRateMaxExceeded","msg":"Exceeded max fee rate"},{"code":6003,"name":"MathOverflow","msg":"Mathematical operation with overflow"},{"code":6004,"name":"MulDivOverflow","msg":"Muldiv overflow"},{"code":6005,"name":"ProtocolFeeMaxExceeded","msg":"Exceeded max protocol fee"},{"code":6006,"name":"ProtocolFeeNotEnough","msg":"Protocol fee not enough"},{"code":6007,"name":"RebateFeeMaxExceeded","msg":"Exceeded max rebate fee"},{"code":6008,"name":"RebateFeeNotEnough","msg":"Rebate fee not enough"},{"code":6009,"name":"ReserveMaxExceeded","msg":"Exceeded max reserve"},{"code":6010,"name":"ReserveNotEnough","msg":"Reserve not enough"},{"code":6011,"name":"ReserveLessThanFee","msg":"Reserve less than fee"},{"code":6012,"name":"TooManyAuthorities","msg":"Too Many Authorities"},{"code":6013,"name":"WooOracleBoundLimit","msg":"Woo oracle bound exceed limit"},{"code":6014,"name":"WooOracleNotFeasible","msg":"Woo oracle is not feasible"},{"code":6015,"name":"WooOraclePriceNotValid","msg":"Woo oracle price is not valid"},{"code":6016,"name":"WooOraclePriceRangeMin","msg":"Woo oracle price below range MIN"},{"code":6017,"name":"WooOraclePriceRangeMax","msg":"Woo oracle price exceed range MAX"},{"code":6018,"name":"WooOracleSpreadExceed","msg":"Woo oracle spread exceed 1E18"},{"code":6019,"name":"WooPoolExceedMaxNotionalValue","msg":"Woo pp exceed max notional value"},{"code":6020,"name":"WooPoolExceedMaxGamma","msg":"Woo pp exceed max gamma"},{"code":6021,"name":"NotEnoughBalance","msg":"Src Balance < LP Deposit Amount."},{"code":6022,"name":"NotEnoughOut","msg":"Not enough out"},{"code":6023,"name":"AmountOutBelowMinimum","msg":"Amount out below minimum threshold"},{"code":6024,"name":"BalanceCapExceeds","msg":"Amount exceeds max balance cap"},{"code":6025,"name":"SwapPoolInvalid","msg":"Swap pool invalid"},{"code":6026,"name":"InvalidAuthority","msg":"invalid authority"}]} \ No newline at end of file diff --git a/idls/zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json b/idls/zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json new file mode 100644 index 0000000..789b291 --- /dev/null +++ b/idls/zeta.ZETAxsqBRek56DhiGXrn75yj2NHU3aYUnxvHXpkf3aD.json @@ -0,0 +1 @@ +{"version":"0.1.0","name":"zeta","instructions":[{"name":"initializeZetaPricing","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[{"name":"args","type":{"defined":"InitializeZetaPricingArgs"}}]},{"name":"updateZetaPricingPubkeys","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateZetaPricingPubkeysArgs"}}]},{"name":"initializeZetaGroup","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"underlyingMint","isMut":false,"isSigner":false},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false},{"name":"underlying","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeZetaGroupArgs"}}]},{"name":"overrideExpiry","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"zetaGroup","isMut":true,"isSigner":false}],"args":[{"name":"args","type":{"defined":"OverrideExpiryArgs"}}]},{"name":"migrateToCrossMarginAccount","accounts":[{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"initializeCrossMarginAccountManager","accounts":[{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeCrossMarginAccount","accounts":[{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"subaccountIndex","type":"u8"}]},{"name":"initializeMarginAccount","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeSpreadAccount","accounts":[{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"closeCrossMarginAccountManager","accounts":[{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"closeCrossMarginAccount","accounts":[{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"crossMarginAccountManager","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true}],"args":[{"name":"subaccountIndex","type":"u8"}]},{"name":"closeMarginAccount","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"closeSpreadAccount","accounts":[{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"zetaGroup","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeUnderlying","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"state","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"underlying","isMut":true,"isSigner":false},{"name":"underlyingMint","isMut":false,"isSigner":false}],"args":[{"name":"flexUnderlying","type":"bool"}]},{"name":"initializePerpSyncQueue","accounts":[{"name":"admin","isMut":false,"isSigner":true},{"name":"zetaProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeMarketIndexes","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marketIndexes","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeMarketNode","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeMarketNodeArgs"}}]},{"name":"halt","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"unhalt","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"updateHaltState","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"HaltStateArgs"}}]},{"name":"updateVolatility","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateVolatilityArgs"}}]},{"name":"updateInterestRate","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"greeks","isMut":true,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateInterestRateArgs"}}]},{"name":"addPerpMarketIndex","accounts":[{"name":"marketIndexes","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"addMarketIndexes","accounts":[{"name":"marketIndexes","isMut":true,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false}],"args":[]},{"name":"initializeZetaState","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"referralsAdmin","isMut":false,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"secondaryAdmin","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeStateArgs"}}]},{"name":"initializeZetaTreasuryWallet","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[]},{"name":"initializeZetaReferralsRewardsWallet","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateAdmin","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateSecondaryAdmin","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateReferralsAdmin","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"newAdmin","isMut":true,"isSigner":true}],"args":[]},{"name":"updateZetaState","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateStateArgs"}}]},{"name":"updateOracle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"oracle","isMut":false,"isSigner":false}],"args":[]},{"name":"updateOracleBackupFeed","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"oracle","isMut":false,"isSigner":false}],"args":[]},{"name":"updatePricingParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdatePricingParametersArgs"}}]},{"name":"updateMarginParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateMarginParametersArgs"}},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"updateZetaGroupMarginParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateMarginParametersArgs"}}]},{"name":"updatePerpParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdatePerpParametersArgs"}},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"updateZetaGroupPerpParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdatePerpParametersArgs"}}]},{"name":"updateZetaGroupExpiryParameters","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"defined":"UpdateZetaGroupExpiryArgs"}}]},{"name":"toggleZetaGroupPerpsOnly","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]},{"name":"cleanZetaMarkets","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false}],"args":[]},{"name":"cleanZetaMarketHalted","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"bids","isMut":false,"isSigner":false},{"name":"asks","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"settlePositionsHalted","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeMarketStrikes","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"expireSeriesOverride","accounts":[],"args":[{"name":"args","type":{"defined":"ExpireSeriesOverrideArgs"}}]},{"name":"expireSeries","accounts":[],"args":[{"name":"settlementNonce","type":"u8"}]},{"name":"initializeZetaMarket","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marketIndexes","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"baseMint","isMut":true,"isSigner":false},{"name":"quoteMint","isMut":true,"isSigner":false},{"name":"zetaBaseVault","isMut":true,"isSigner":false},{"name":"zetaQuoteVault","isMut":true,"isSigner":false},{"name":"dexBaseVault","isMut":true,"isSigner":false},{"name":"dexQuoteVault","isMut":true,"isSigner":false},{"name":"vaultOwner","isMut":false,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"args","type":{"defined":"InitializeMarketArgs"}}]},{"name":"initializeMarketTifEpochCycle","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"market","isMut":true,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false}],"args":[{"name":"epochLength","type":"u16"}]},{"name":"updatePricingV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"perpMarket","isMut":false,"isSigner":false},{"name":"perpBids","isMut":false,"isSigner":false},{"name":"perpAsks","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"applyPerpFunding","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"deposit","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositV2","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositInsuranceVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"zetaVault","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"depositInsuranceVaultV2","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"zetaVault","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdraw","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"socializedLossAccount","isMut":true,"isSigner":false}],"args":[{"name":"amount","type":"u64"}]},{"name":"withdrawInsuranceVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"percentageAmount","type":"u64"}]},{"name":"withdrawInsuranceVaultV2","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"pricing","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[{"name":"percentageAmount","type":"u64"}]},{"name":"initializeOpenOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeOpenOrdersV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeOpenOrdersV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"payer","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"closeOpenOrders","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false}],"args":[{"name":"mapNonce","type":"u8"}]},{"name":"closeOpenOrdersV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false}],"args":[{"name":"mapNonce","type":"u8"}]},{"name":"closeOpenOrdersV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"crossMarginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":true,"isSigner":true},{"name":"market","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrdersMap","isMut":true,"isSigner":false}],"args":[{"name":"mapNonce","type":"u8"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"initializeWhitelistDepositAccount","accounts":[{"name":"whitelistDepositAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"user","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeWhitelistInsuranceAccount","accounts":[{"name":"whitelistInsuranceAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"user","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeWhitelistTradingFeesAccount","accounts":[{"name":"whitelistTradingFeesAccount","isMut":true,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"user","isMut":false,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeInsuranceDepositAccount","accounts":[{"name":"insuranceDepositAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":false},{"name":"payer","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false},{"name":"whitelistInsuranceAccount","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeCombinedInsuranceVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeCombinedVault","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"initializeCombinedSocializedLossAccount","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"usdcMint","isMut":false,"isSigner":false},{"name":"admin","isMut":true,"isSigner":true},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"nonce","type":"u8"}]},{"name":"placeOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"clientOrderId","type":{"option":"u64"}}]},{"name":"placeOrderV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}}]},{"name":"placeOrderV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}}]},{"name":"placePerpOrder","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}}]},{"name":"placePerpOrderV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}},{"name":"tifOffset","type":{"option":"u16"}}]},{"name":"placeOrderV4","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketNode","isMut":true,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}},{"name":"tifOffset","type":{"option":"u16"}}]},{"name":"placePerpOrderV3","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"rent","isMut":false,"isSigner":false},{"name":"marketAccounts","accounts":[{"name":"market","isMut":true,"isSigner":false},{"name":"requestQueue","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"orderPayerTokenAccount","isMut":true,"isSigner":false},{"name":"coinVault","isMut":true,"isSigner":false},{"name":"pcVault","isMut":true,"isSigner":false},{"name":"coinWallet","isMut":true,"isSigner":false},{"name":"pcWallet","isMut":true,"isSigner":false}]},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"marketMint","isMut":true,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"price","type":"u64"},{"name":"size","type":"u64"},{"name":"side","type":{"defined":"Side"}},{"name":"orderType","type":{"defined":"OrderType"}},{"name":"clientOrderId","type":{"option":"u64"}},{"name":"tag","type":{"option":"string"}},{"name":"tifOffset","type":{"option":"u16"}},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrder","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderNoError","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelAllMarketOrders","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderHalted","accounts":[{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderByClientOrderId","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"cancelOrderByClientOrderIdNoError","accounts":[{"name":"authority","isMut":false,"isSigner":true},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"clientOrderId","type":"u64"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"pruneExpiredTifOrders","accounts":[{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"state","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}],"args":[]},{"name":"forceCancelOrderByOrderIdV2","accounts":[{"name":"pricing","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"forceCancelOrderByOrderId","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"side","type":{"defined":"Side"}},{"name":"orderId","type":"u128"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"forceCancelOrdersV2","accounts":[{"name":"pricing","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"forceCancelOrders","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"cancelAccounts","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"openOrders","isMut":true,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"bids","isMut":true,"isSigner":false},{"name":"asks","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false}]}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"crankEventQueue","docs":["The only events that need to be cranked are maker fills."],"accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"eventQueue","isMut":true,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"perpSyncQueue","isMut":true,"isSigner":false}],"args":[{"name":"asset","type":{"defined":"Asset"}}]},{"name":"collectTreasuryFunds","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"collectionTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"amount","type":"u64"}]},{"name":"treasuryMovement","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[{"name":"treasuryMovementType","type":{"defined":"TreasuryMovementType"}},{"name":"amount","type":"u64"}]},{"name":"rebalanceInsuranceVault","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaVault","isMut":true,"isSigner":false},{"name":"insuranceVault","isMut":true,"isSigner":false},{"name":"treasuryWallet","isMut":true,"isSigner":false},{"name":"socializedLossAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"liquidateV2","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"liquidator","isMut":false,"isSigner":true},{"name":"liquidatorAccount","isMut":true,"isSigner":false},{"name":"pricing","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"liquidatedAccount","isMut":true,"isSigner":false}],"args":[{"name":"size","type":"u64"},{"name":"asset","type":{"defined":"Asset"}}]},{"name":"liquidate","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"liquidator","isMut":false,"isSigner":true},{"name":"liquidatorMarginAccount","isMut":true,"isSigner":false},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false},{"name":"market","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"liquidatedMarginAccount","isMut":true,"isSigner":false}],"args":[{"name":"size","type":"u64"}]},{"name":"burnVaultTokens","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"mint","isMut":true,"isSigner":false},{"name":"vault","isMut":true,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"settleDexFunds","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"market","isMut":true,"isSigner":false},{"name":"zetaBaseVault","isMut":true,"isSigner":false},{"name":"zetaQuoteVault","isMut":true,"isSigner":false},{"name":"dexBaseVault","isMut":true,"isSigner":false},{"name":"dexQuoteVault","isMut":true,"isSigner":false},{"name":"vaultOwner","isMut":false,"isSigner":false},{"name":"mintAuthority","isMut":false,"isSigner":false},{"name":"serumAuthority","isMut":false,"isSigner":false},{"name":"dexProgram","isMut":false,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"positionMovement","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true},{"name":"greeks","isMut":false,"isSigner":false},{"name":"oracle","isMut":false,"isSigner":false},{"name":"oracleBackupFeed","isMut":false,"isSigner":false},{"name":"oracleBackupProgram","isMut":false,"isSigner":false}],"args":[{"name":"movementType","type":{"defined":"MovementType"}},{"name":"movements","type":{"vec":{"defined":"PositionMovementArg"}}}]},{"name":"transferExcessSpreadBalance","accounts":[{"name":"zetaGroup","isMut":false,"isSigner":false},{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"spreadAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[]},{"name":"toggleMarketMaker","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true},{"name":"marginAccount","isMut":true,"isSigner":false}],"args":[{"name":"isMarketMaker","type":"bool"}]},{"name":"initializeReferrerAccount","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"referUser","accounts":[{"name":"user","isMut":true,"isSigner":true},{"name":"referrerAccount","isMut":false,"isSigner":false},{"name":"referralAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[]},{"name":"initializeReferrerAlias","accounts":[{"name":"referrer","isMut":true,"isSigner":true},{"name":"referrerAlias","isMut":true,"isSigner":false},{"name":"referrerAccount","isMut":true,"isSigner":false},{"name":"systemProgram","isMut":false,"isSigner":false}],"args":[{"name":"alias","type":"string"}]},{"name":"setReferralsRewards","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"referralsAdmin","isMut":false,"isSigner":true}],"args":[{"name":"args","type":{"vec":{"defined":"SetReferralsRewardsArgs"}}}]},{"name":"claimReferralsRewards","accounts":[{"name":"state","isMut":false,"isSigner":false},{"name":"referralsRewardsWallet","isMut":true,"isSigner":false},{"name":"userReferralsAccount","isMut":true,"isSigner":false},{"name":"userTokenAccount","isMut":true,"isSigner":false},{"name":"tokenProgram","isMut":false,"isSigner":false},{"name":"user","isMut":false,"isSigner":true}],"args":[]},{"name":"editDelegatedPubkey","accounts":[{"name":"marginAccount","isMut":true,"isSigner":false},{"name":"authority","isMut":false,"isSigner":true}],"args":[{"name":"newKey","type":"publicKey"}]},{"name":"resetNumFlexUnderlyings","accounts":[{"name":"state","isMut":true,"isSigner":false},{"name":"admin","isMut":false,"isSigner":true}],"args":[]}],"accounts":[{"name":"Pricing","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"markPrices","type":{"array":["u64",5]}},{"name":"markPricesPadding","type":{"array":["u64",20]}},{"name":"updateTimestamps","type":{"array":["u64",5]}},{"name":"updateTimestampsPadding","type":{"array":["u64",20]}},{"name":"fundingDeltas","type":{"array":[{"defined":"AnchorDecimal"},5]}},{"name":"fundingDeltasPadding","type":{"array":[{"defined":"AnchorDecimal"},20]}},{"name":"latestFundingRates","type":{"array":[{"defined":"AnchorDecimal"},5]}},{"name":"latestFundingRatesPadding","type":{"array":[{"defined":"AnchorDecimal"},20]}},{"name":"latestMidpoints","type":{"array":["u64",5]}},{"name":"latestMidpointsPadding","type":{"array":["u64",20]}},{"name":"oracles","type":{"array":["publicKey",5]}},{"name":"oraclesPadding","type":{"array":["publicKey",20]}},{"name":"oracleBackupFeeds","type":{"array":["publicKey",5]}},{"name":"oracleBackupFeedsPadding","type":{"array":["publicKey",20]}},{"name":"markets","type":{"array":["publicKey",5]}},{"name":"marketsPadding","type":{"array":["publicKey",20]}},{"name":"perpSyncQueues","type":{"array":["publicKey",5]}},{"name":"perpSyncQueuesPadding","type":{"array":["publicKey",20]}},{"name":"perpParameters","type":{"array":[{"defined":"PerpParameters"},5]}},{"name":"perpParametersPadding","type":{"array":[{"defined":"PerpParameters"},20]}},{"name":"marginParameters","type":{"array":[{"defined":"MarginParameters"},5]}},{"name":"marginParametersPadding","type":{"array":[{"defined":"MarginParameters"},20]}},{"name":"products","type":{"array":[{"defined":"Product"},5]}},{"name":"productsPadding","type":{"array":[{"defined":"Product"},20]}},{"name":"zetaGroupKeys","type":{"array":["publicKey",5]}},{"name":"zetaGroupKeysPadding","type":{"array":["publicKey",20]}},{"name":"totalInsuranceVaultDeposits","type":"u64"},{"name":"lastWithdrawTimestamp","type":"u64"},{"name":"netOutflowSum","type":"i64"},{"name":"haltForcePricing","type":{"array":["bool",5]}},{"name":"haltForcePricingPadding","type":{"array":["bool",20]}},{"name":"padding","type":{"array":["u8",2707]}}]}},{"name":"Greeks","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"markPrices","type":{"array":["u64",46]}},{"name":"markPricesPadding","type":{"array":["u64",91]}},{"name":"perpMarkPrice","type":"u64"},{"name":"productGreeks","type":{"array":[{"defined":"ProductGreeks"},22]}},{"name":"productGreeksPadding","type":{"array":[{"defined":"ProductGreeks"},44]}},{"name":"updateTimestamp","type":{"array":["u64",2]}},{"name":"updateTimestampPadding","type":{"array":["u64",4]}},{"name":"retreatExpirationTimestamp","type":{"array":["u64",2]}},{"name":"retreatExpirationTimestampPadding","type":{"array":["u64",4]}},{"name":"interestRate","type":{"array":["i64",2]}},{"name":"interestRatePadding","type":{"array":["i64",4]}},{"name":"nodes","type":{"array":["u64",5]}},{"name":"volatility","type":{"array":["u64",10]}},{"name":"volatilityPadding","type":{"array":["u64",20]}},{"name":"nodeKeys","type":{"array":["publicKey",138]}},{"name":"haltForcePricing","type":{"array":["bool",6]}},{"name":"perpUpdateTimestamp","type":"u64"},{"name":"perpFundingDelta","type":{"defined":"AnchorDecimal"}},{"name":"perpLatestFundingRate","type":{"defined":"AnchorDecimal"}},{"name":"perpLatestMidpoint","type":"u64"},{"name":"padding","type":{"array":["u8",1593]}}]}},{"name":"MarketIndexes","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"initialized","type":"bool"},{"name":"indexes","type":{"array":["u8",138]}}]}},{"name":"OpenOrdersMap","type":{"kind":"struct","fields":[{"name":"userKey","type":"publicKey"}]}},{"name":"CrossOpenOrdersMap","type":{"kind":"struct","fields":[{"name":"userKey","type":"publicKey"},{"name":"subaccountIndex","type":"u8"}]}},{"name":"State","type":{"kind":"struct","fields":[{"name":"admin","type":"publicKey"},{"name":"stateNonce","type":"u8"},{"name":"serumNonce","type":"u8"},{"name":"mintAuthNonce","type":"u8"},{"name":"numUnderlyings","type":"u8"},{"name":"numFlexUnderlyings","type":"u8"},{"name":"null","type":{"array":["u8",7]}},{"name":"strikeInitializationThresholdSeconds","type":"u32"},{"name":"pricingFrequencySeconds","type":"u32"},{"name":"liquidatorLiquidationPercentage","type":"u32"},{"name":"insuranceVaultLiquidationPercentage","type":"u32"},{"name":"nativeD1TradeFeePercentage","type":"u64"},{"name":"nativeD1UnderlyingFeePercentage","type":"u64"},{"name":"nativeWhitelistUnderlyingFeePercentage","type":"u64"},{"name":"nativeDepositLimit","type":"u64"},{"name":"expirationThresholdSeconds","type":"u32"},{"name":"positionMovementFeeBps","type":"u8"},{"name":"marginConcessionPercentage","type":"u8"},{"name":"treasuryWalletNonce","type":"u8"},{"name":"nativeOptionTradeFeePercentage","type":"u64"},{"name":"nativeOptionUnderlyingFeePercentage","type":"u64"},{"name":"referralsAdmin","type":"publicKey"},{"name":"referralsRewardsWalletNonce","type":"u8"},{"name":"maxPerpDeltaAge","type":"u16"},{"name":"secondaryAdmin","type":"publicKey"},{"name":"vaultNonce","type":"u8"},{"name":"insuranceVaultNonce","type":"u8"},{"name":"deprecatedTotalInsuranceVaultDeposits","type":"u64"},{"name":"nativeWithdrawLimit","type":"u64"},{"name":"withdrawLimitEpochSeconds","type":"u32"},{"name":"nativeOpenInterestLimit","type":"u64"},{"name":"haltStates","type":{"array":[{"defined":"HaltStateV2"},5]}},{"name":"haltStatesPadding","type":{"array":[{"defined":"HaltStateV2"},20]}},{"name":"padding","type":{"array":["u8",338]}}]}},{"name":"Underlying","type":{"kind":"struct","fields":[{"name":"mint","type":"publicKey"}]}},{"name":"SettlementAccount","type":{"kind":"struct","fields":[{"name":"settlementPrice","type":"u64"},{"name":"strikes","type":{"array":["u64",23]}}]}},{"name":"PerpSyncQueue","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"head","type":"u16"},{"name":"length","type":"u16"},{"name":"queue","type":{"array":[{"defined":"AnchorDecimal"},600]}}]}},{"name":"ZetaGroup","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"noncePadding","type":{"array":["u8",2]}},{"name":"frontExpiryIndex","type":"u8"},{"name":"haltState","type":{"defined":"HaltState"}},{"name":"underlyingMint","type":"publicKey"},{"name":"oracle","type":"publicKey"},{"name":"greeks","type":"publicKey"},{"name":"pricingParameters","type":{"defined":"PricingParameters"}},{"name":"marginParameters","type":{"defined":"MarginParameters"}},{"name":"marginParametersPadding","type":{"array":["u8",104]}},{"name":"products","type":{"array":[{"defined":"Product"},46]}},{"name":"productsPadding","type":{"array":[{"defined":"Product"},91]}},{"name":"perp","type":{"defined":"Product"}},{"name":"expirySeries","type":{"array":[{"defined":"ExpirySeries"},2]}},{"name":"expirySeriesPadding","type":{"array":[{"defined":"ExpirySeries"},4]}},{"name":"deprecatedPadding","type":{"array":["u8",8]}},{"name":"asset","type":{"defined":"Asset"}},{"name":"expiryIntervalSeconds","type":"u32"},{"name":"newExpiryThresholdSeconds","type":"u32"},{"name":"perpParameters","type":{"defined":"PerpParameters"}},{"name":"perpSyncQueue","type":"publicKey"},{"name":"oracleBackupFeed","type":"publicKey"},{"name":"perpsOnly","type":"bool"},{"name":"flexUnderlying","type":"bool"},{"name":"padding","type":{"array":["u8",964]}}]}},{"name":"MarketNode","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"nonce","type":"u8"},{"name":"nodeUpdates","type":{"array":["i64",5]}},{"name":"interestUpdate","type":"i64"}]}},{"name":"SpreadAccount","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"nonce","type":"u8"},{"name":"balance","type":"u64"},{"name":"seriesExpiry","type":{"array":["u64",5]}},{"name":"seriesExpiryPadding","type":"u64"},{"name":"positions","type":{"array":[{"defined":"Position"},46]}},{"name":"positionsPadding","type":{"array":[{"defined":"Position"},92]}},{"name":"asset","type":{"defined":"Asset"}},{"name":"padding","type":{"array":["u8",262]}}]}},{"name":"CrossMarginAccountManager","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"authority","type":"publicKey"},{"name":"accounts","type":{"array":[{"defined":"CrossMarginAccountInfo"},25]}}]}},{"name":"CrossMarginAccount","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"delegatedPubkey","type":"publicKey"},{"name":"balance","type":"u64"},{"name":"subaccountIndex","type":"u8"},{"name":"nonce","type":"u8"},{"name":"forceCancelFlag","type":"bool"},{"name":"accountType","type":{"defined":"MarginAccountType"}},{"name":"openOrdersNonces","type":{"array":["u8",5]}},{"name":"openOrdersNoncesPadding","type":{"array":["u8",20]}},{"name":"rebalanceAmount","type":"i64"},{"name":"lastFundingDeltas","type":{"array":[{"defined":"AnchorDecimal"},5]}},{"name":"lastFundingDeltasPadding","type":{"array":[{"defined":"AnchorDecimal"},20]}},{"name":"productLedgers","type":{"array":[{"defined":"ProductLedger"},5]}},{"name":"productLedgersPadding","type":{"array":[{"defined":"ProductLedger"},20]}},{"name":"padding","type":{"array":["u8",2000]}}]}},{"name":"MarginAccount","type":{"kind":"struct","fields":[{"name":"authority","type":"publicKey"},{"name":"nonce","type":"u8"},{"name":"balance","type":"u64"},{"name":"forceCancelFlag","type":"bool"},{"name":"openOrdersNonce","type":{"array":["u8",138]}},{"name":"seriesExpiry","type":{"array":["u64",5]}},{"name":"seriesExpiryPadding","type":"u64"},{"name":"productLedgers","type":{"array":[{"defined":"ProductLedger"},46]}},{"name":"productLedgersPadding","type":{"array":[{"defined":"ProductLedger"},91]}},{"name":"perpProductLedger","type":{"defined":"ProductLedger"}},{"name":"rebalanceAmount","type":"i64"},{"name":"asset","type":{"defined":"Asset"}},{"name":"accountType","type":{"defined":"MarginAccountType"}},{"name":"lastFundingDelta","type":{"defined":"AnchorDecimal"}},{"name":"delegatedPubkey","type":"publicKey"},{"name":"padding","type":{"array":["u8",338]}}]}},{"name":"SocializedLossAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"overbankruptAmount","type":"u64"}]}},{"name":"WhitelistDepositAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"userKey","type":"publicKey"}]}},{"name":"WhitelistInsuranceAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"userKey","type":"publicKey"}]}},{"name":"InsuranceDepositAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"amount","type":"u64"}]}},{"name":"WhitelistTradingFeesAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"userKey","type":"publicKey"}]}},{"name":"ReferrerAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"hasAlias","type":"bool"},{"name":"referrer","type":"publicKey"},{"name":"pendingRewards","type":"u64"},{"name":"claimedRewards","type":"u64"}]}},{"name":"ReferralAccount","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"referrer","type":"publicKey"},{"name":"user","type":"publicKey"},{"name":"timestamp","type":"u64"},{"name":"pendingRewards","type":"u64"},{"name":"claimedRewards","type":"u64"}]}},{"name":"ReferrerAlias","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"alias","type":{"array":["u8",15]}},{"name":"referrer","type":"publicKey"}]}}],"types":[{"name":"ProductGreeks","type":{"kind":"struct","fields":[{"name":"delta","type":"u64"},{"name":"vega","type":{"defined":"AnchorDecimal"}},{"name":"volatility","type":{"defined":"AnchorDecimal"}}]}},{"name":"AnchorDecimal","type":{"kind":"struct","fields":[{"name":"flags","type":"u32"},{"name":"hi","type":"u32"},{"name":"lo","type":"u32"},{"name":"mid","type":"u32"}]}},{"name":"HaltStateV2","type":{"kind":"struct","fields":[{"name":"halted","type":"bool"},{"name":"timestamp","type":"u64"},{"name":"spotPrice","type":"u64"},{"name":"marketCleaned","type":"bool"}]}},{"name":"HaltState","type":{"kind":"struct","fields":[{"name":"halted","type":"bool"},{"name":"spotPrice","type":"u64"},{"name":"timestamp","type":"u64"},{"name":"markPricesSet","type":{"array":["bool",2]}},{"name":"markPricesSetPadding","type":{"array":["bool",3]}},{"name":"perpMarkPriceSet","type":"bool"},{"name":"marketNodesCleaned","type":{"array":["bool",2]}},{"name":"marketNodesCleanedPadding","type":{"array":["bool",4]}},{"name":"marketCleaned","type":{"array":["bool",46]}},{"name":"marketCleanedPadding","type":{"array":["bool",91]}},{"name":"perpMarketCleaned","type":"bool"}]}},{"name":"PricingParameters","type":{"kind":"struct","fields":[{"name":"optionTradeNormalizer","type":{"defined":"AnchorDecimal"}},{"name":"futureTradeNormalizer","type":{"defined":"AnchorDecimal"}},{"name":"maxVolatilityRetreat","type":{"defined":"AnchorDecimal"}},{"name":"maxInterestRetreat","type":{"defined":"AnchorDecimal"}},{"name":"maxDelta","type":"u64"},{"name":"minDelta","type":"u64"},{"name":"minVolatility","type":"u64"},{"name":"maxVolatility","type":"u64"},{"name":"minInterestRate","type":"i64"},{"name":"maxInterestRate","type":"i64"}]}},{"name":"MarginParameters","type":{"kind":"struct","fields":[{"name":"futureMarginInitial","type":"u64"},{"name":"futureMarginMaintenance","type":"u64"}]}},{"name":"PerpParameters","type":{"kind":"struct","fields":[{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"impactCashDelta","type":"u64"}]}},{"name":"ExpirySeries","type":{"kind":"struct","fields":[{"name":"activeTs","type":"u64"},{"name":"expiryTs","type":"u64"},{"name":"dirty","type":"bool"},{"name":"padding","type":{"array":["u8",15]}}]}},{"name":"Strike","type":{"kind":"struct","fields":[{"name":"isSet","type":"bool"},{"name":"value","type":"u64"}]}},{"name":"Product","type":{"kind":"struct","fields":[{"name":"market","type":"publicKey"},{"name":"strike","type":{"defined":"Strike"}},{"name":"dirty","type":"bool"},{"name":"kind","type":{"defined":"Kind"}}]}},{"name":"Position","type":{"kind":"struct","fields":[{"name":"size","type":"i64"},{"name":"costOfTrades","type":"u64"}]}},{"name":"OrderState","type":{"kind":"struct","fields":[{"name":"closingOrders","type":"u64"},{"name":"openingOrders","type":{"array":["u64",2]}}]}},{"name":"ProductLedger","type":{"kind":"struct","fields":[{"name":"position","type":{"defined":"Position"}},{"name":"orderState","type":{"defined":"OrderState"}}]}},{"name":"CrossMarginAccountInfo","type":{"kind":"struct","fields":[{"name":"initialized","type":"bool"},{"name":"name","type":{"array":["u8",10]}}]}},{"name":"HaltStateArgs","type":{"kind":"struct","fields":[{"name":"asset","type":{"defined":"Asset"}},{"name":"spotPrice","type":"u64"},{"name":"timestamp","type":"u64"}]}},{"name":"HaltArgs","type":{"kind":"struct","fields":[{"name":"spotPrices","type":{"array":["u64",5]}},{"name":"timestamp","type":"u64"}]}},{"name":"UpdateVolatilityArgs","type":{"kind":"struct","fields":[{"name":"expiryIndex","type":"u8"},{"name":"volatility","type":{"array":["u64",5]}}]}},{"name":"UpdateInterestRateArgs","type":{"kind":"struct","fields":[{"name":"expiryIndex","type":"u8"},{"name":"interestRate","type":"i64"}]}},{"name":"SetReferralsRewardsArgs","type":{"kind":"struct","fields":[{"name":"referralsAccountKey","type":"publicKey"},{"name":"pendingRewards","type":"u64"},{"name":"overwrite","type":"bool"}]}},{"name":"ExpireSeriesOverrideArgs","type":{"kind":"struct","fields":[{"name":"settlementNonce","type":"u8"},{"name":"settlementPrice","type":"u64"}]}},{"name":"InitializeMarketArgs","type":{"kind":"struct","fields":[{"name":"asset","type":{"defined":"Asset"}},{"name":"marketNonce","type":"u8"},{"name":"baseMintNonce","type":"u8"},{"name":"quoteMintNonce","type":"u8"},{"name":"zetaBaseVaultNonce","type":"u8"},{"name":"zetaQuoteVaultNonce","type":"u8"},{"name":"dexBaseVaultNonce","type":"u8"},{"name":"dexQuoteVaultNonce","type":"u8"},{"name":"vaultSignerNonce","type":"u64"}]}},{"name":"InitializeStateArgs","type":{"kind":"struct","fields":[{"name":"stateNonce","type":"u8"},{"name":"serumNonce","type":"u8"},{"name":"mintAuthNonce","type":"u8"},{"name":"strikeInitializationThresholdSeconds","type":"u32"},{"name":"pricingFrequencySeconds","type":"u32"},{"name":"liquidatorLiquidationPercentage","type":"u32"},{"name":"insuranceVaultLiquidationPercentage","type":"u32"},{"name":"nativeD1TradeFeePercentage","type":"u64"},{"name":"nativeD1UnderlyingFeePercentage","type":"u64"},{"name":"nativeOptionTradeFeePercentage","type":"u64"},{"name":"nativeOptionUnderlyingFeePercentage","type":"u64"},{"name":"nativeWhitelistUnderlyingFeePercentage","type":"u64"},{"name":"nativeDepositLimit","type":"u64"},{"name":"expirationThresholdSeconds","type":"u32"},{"name":"positionMovementFeeBps","type":"u8"},{"name":"marginConcessionPercentage","type":"u8"},{"name":"maxPerpDeltaAgeSeconds","type":"u16"},{"name":"nativeWithdrawLimit","type":"u64"},{"name":"withdrawLimitEpochSeconds","type":"u32"},{"name":"nativeOpenInterestLimit","type":"u64"}]}},{"name":"InitializeMarketNodeArgs","type":{"kind":"struct","fields":[{"name":"nonce","type":"u8"},{"name":"index","type":"u8"}]}},{"name":"OverrideExpiryArgs","type":{"kind":"struct","fields":[{"name":"expiryIndex","type":"u8"},{"name":"activeTs","type":"u64"},{"name":"expiryTs","type":"u64"}]}},{"name":"UpdateStateArgs","type":{"kind":"struct","fields":[{"name":"strikeInitializationThresholdSeconds","type":"u32"},{"name":"pricingFrequencySeconds","type":"u32"},{"name":"liquidatorLiquidationPercentage","type":"u32"},{"name":"insuranceVaultLiquidationPercentage","type":"u32"},{"name":"nativeD1TradeFeePercentage","type":"u64"},{"name":"nativeD1UnderlyingFeePercentage","type":"u64"},{"name":"nativeOptionTradeFeePercentage","type":"u64"},{"name":"nativeOptionUnderlyingFeePercentage","type":"u64"},{"name":"nativeWhitelistUnderlyingFeePercentage","type":"u64"},{"name":"nativeDepositLimit","type":"u64"},{"name":"expirationThresholdSeconds","type":"u32"},{"name":"positionMovementFeeBps","type":"u8"},{"name":"marginConcessionPercentage","type":"u8"},{"name":"maxPerpDeltaAgeSeconds","type":"u16"},{"name":"nativeWithdrawLimit","type":"u64"},{"name":"withdrawLimitEpochSeconds","type":"u32"},{"name":"nativeOpenInterestLimit","type":"u64"}]}},{"name":"UpdatePricingParametersArgs","type":{"kind":"struct","fields":[{"name":"optionTradeNormalizer","type":"u64"},{"name":"futureTradeNormalizer","type":"u64"},{"name":"maxVolatilityRetreat","type":"u64"},{"name":"maxInterestRetreat","type":"u64"},{"name":"minDelta","type":"u64"},{"name":"maxDelta","type":"u64"},{"name":"minInterestRate","type":"i64"},{"name":"maxInterestRate","type":"i64"},{"name":"minVolatility","type":"u64"},{"name":"maxVolatility","type":"u64"}]}},{"name":"UpdateMarginParametersArgs","type":{"kind":"struct","fields":[{"name":"futureMarginInitial","type":"u64"},{"name":"futureMarginMaintenance","type":"u64"}]}},{"name":"UpdatePerpParametersArgs","type":{"kind":"struct","fields":[{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"perpImpactCashDelta","type":"u64"}]}},{"name":"InitializeZetaGroupArgs","type":{"kind":"struct","fields":[{"name":"perpsOnly","type":"bool"},{"name":"flexUnderlying","type":"bool"},{"name":"assetOverride","type":{"option":{"defined":"Asset"}}},{"name":"zetaGroupNonce","type":"u8"},{"name":"underlyingNonce","type":"u8"},{"name":"greeksNonce","type":"u8"},{"name":"vaultNonce","type":"u8"},{"name":"insuranceVaultNonce","type":"u8"},{"name":"socializedLossAccountNonce","type":"u8"},{"name":"perpSyncQueueNonce","type":"u8"},{"name":"interestRate","type":"i64"},{"name":"volatility","type":{"array":["u64",5]}},{"name":"optionTradeNormalizer","type":"u64"},{"name":"futureTradeNormalizer","type":"u64"},{"name":"maxVolatilityRetreat","type":"u64"},{"name":"maxInterestRetreat","type":"u64"},{"name":"maxDelta","type":"u64"},{"name":"minDelta","type":"u64"},{"name":"minInterestRate","type":"i64"},{"name":"maxInterestRate","type":"i64"},{"name":"minVolatility","type":"u64"},{"name":"maxVolatility","type":"u64"},{"name":"futureMarginInitial","type":"u64"},{"name":"futureMarginMaintenance","type":"u64"},{"name":"expiryIntervalSeconds","type":"u32"},{"name":"newExpiryThresholdSeconds","type":"u32"},{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"perpImpactCashDelta","type":"u64"}]}},{"name":"UpdateZetaGroupExpiryArgs","type":{"kind":"struct","fields":[{"name":"expiryIntervalSeconds","type":"u32"},{"name":"newExpiryThresholdSeconds","type":"u32"}]}},{"name":"UpdateGreeksArgs","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"theo","type":"u64"},{"name":"delta","type":"u32"},{"name":"gamma","type":"u32"},{"name":"volatility","type":"u32"}]}},{"name":"PositionMovementArg","type":{"kind":"struct","fields":[{"name":"index","type":"u8"},{"name":"size","type":"i64"}]}},{"name":"UpdateZetaPricingPubkeysArgs","type":{"kind":"struct","fields":[{"name":"asset","type":{"defined":"Asset"}},{"name":"oracle","type":"publicKey"},{"name":"oracleBackupFeed","type":"publicKey"},{"name":"market","type":"publicKey"},{"name":"perpSyncQueue","type":"publicKey"},{"name":"zetaGroupKey","type":"publicKey"}]}},{"name":"InitializeZetaPricingArgs","type":{"kind":"struct","fields":[{"name":"minFundingRatePercent","type":"i64"},{"name":"maxFundingRatePercent","type":"i64"},{"name":"perpImpactCashDelta","type":"u64"},{"name":"marginInitial","type":"u64"},{"name":"marginMaintenance","type":"u64"},{"name":"pricingNonce","type":"u8"}]}},{"name":"ExpirySeriesStatus","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Initialized"},{"name":"Live"},{"name":"Expired"},{"name":"ExpiredDirty"}]}},{"name":"Kind","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Call"},{"name":"Put"},{"name":"Future"},{"name":"Perp"}]}},{"name":"OrderType","type":{"kind":"enum","variants":[{"name":"Limit"},{"name":"PostOnly"},{"name":"FillOrKill"},{"name":"ImmediateOrCancel"},{"name":"PostOnlySlide"}]}},{"name":"Side","type":{"kind":"enum","variants":[{"name":"Uninitialized"},{"name":"Bid"},{"name":"Ask"}]}},{"name":"Asset","type":{"kind":"enum","variants":[{"name":"SOL"},{"name":"BTC"},{"name":"ETH"},{"name":"APT"},{"name":"ARB"},{"name":"UNDEFINED"}]}},{"name":"MovementType","type":{"kind":"enum","variants":[{"name":"Undefined"},{"name":"Lock"},{"name":"Unlock"}]}},{"name":"TreasuryMovementType","type":{"kind":"enum","variants":[{"name":"Undefined"},{"name":"ToTreasuryFromInsurance"},{"name":"ToInsuranceFromTreasury"},{"name":"ToTreasuryFromReferralsRewards"},{"name":"ToReferralsRewardsFromTreasury"}]}},{"name":"OrderCompleteType","type":{"kind":"enum","variants":[{"name":"Cancel"},{"name":"Fill"},{"name":"Booted"}]}},{"name":"MarginRequirement","type":{"kind":"enum","variants":[{"name":"Initial"},{"name":"Maintenance"},{"name":"MaintenanceIncludingOrders"},{"name":"MarketMakerConcession"}]}},{"name":"MarginAccountType","type":{"kind":"enum","variants":[{"name":"Normal"},{"name":"MarketMaker"}]}},{"name":"PlaceOrderType","type":{"kind":"enum","variants":[{"name":"PlaceOrder"},{"name":"PlacePerpOrder"}]}},{"name":"ValidationType","type":{"kind":"enum","variants":[{"name":"Place"},{"name":"Cancel"},{"name":"OpenOrders"}]}},{"name":"TraitType","type":{"kind":"enum","variants":[{"name":"MarginAccount"},{"name":"CrossMarginAccount"}]}}],"events":[{"name":"TradeEvent","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"index","type":"u8","index":false},{"name":"size","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"isBid","type":"bool","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderId","type":"u128","index":false}]},{"name":"TradeEventV2","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"index","type":"u8","index":false},{"name":"size","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"isBid","type":"bool","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"asset","type":"u8","index":false},{"name":"user","type":"publicKey","index":false},{"name":"isTaker","type":"bool","index":false},{"name":"sequenceNumber","type":"u64","index":false}]},{"name":"TradeEventV3","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"index","type":"u8","index":false},{"name":"size","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"isBid","type":"bool","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false},{"name":"user","type":"publicKey","index":false},{"name":"isTaker","type":"bool","index":false},{"name":"sequenceNumber","type":"u64","index":false}]},{"name":"PositionMovementEvent","fields":[{"name":"netBalanceTransfer","type":"i64","index":false},{"name":"marginAccountBalance","type":"u64","index":false},{"name":"spreadAccountBalance","type":"u64","index":false},{"name":"movementFees","type":"u64","index":false}]},{"name":"PlaceOrderEvent","fields":[{"name":"fee","type":"u64","index":false},{"name":"oraclePrice","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"expiryTs","type":"u64","index":false}]},{"name":"LiquidationEvent","fields":[{"name":"liquidatorReward","type":"u64","index":false},{"name":"insuranceReward","type":"u64","index":false},{"name":"costOfTrades","type":"u64","index":false},{"name":"size","type":"i64","index":false},{"name":"remainingLiquidateeBalance","type":"u64","index":false},{"name":"remainingLiquidatorBalance","type":"u64","index":false},{"name":"markPrice","type":"u64","index":false},{"name":"underlyingPrice","type":"u64","index":false},{"name":"liquidatee","type":"publicKey","index":false},{"name":"liquidator","type":"publicKey","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false}]},{"name":"OrderCompleteEvent","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false},{"name":"marketIndex","type":"u8","index":false},{"name":"side","type":{"defined":"Side"},"index":false},{"name":"unfilledSize","type":"u64","index":false},{"name":"orderId","type":"u128","index":false},{"name":"clientOrderId","type":"u64","index":false},{"name":"orderCompleteType","type":{"defined":"OrderCompleteType"},"index":false}]},{"name":"ApplyFundingEvent","fields":[{"name":"marginAccount","type":"publicKey","index":false},{"name":"user","type":"publicKey","index":false},{"name":"asset","type":{"defined":"Asset"},"index":false},{"name":"balanceChange","type":"i64","index":false},{"name":"remainingBalance","type":"u64","index":false},{"name":"fundingRate","type":"i64","index":false},{"name":"oraclePrice","type":"u64","index":false}]}],"errors":[{"code":6000,"name":"DepositOverflow","msg":"Deposit overflow"},{"code":6001,"name":"Unreachable","msg":"Unreachable"},{"code":6002,"name":"FailedInitialMarginRequirement","msg":"Failed initial margin requirement"},{"code":6003,"name":"LiquidatorFailedMarginRequirement","msg":"Liquidator failed margin requirement"},{"code":6004,"name":"CannotLiquidateOwnAccount","msg":"Cannot liquidate own account"},{"code":6005,"name":"CrankInvalidRemainingAccounts","msg":"Invalid cranking remaining accounts"},{"code":6006,"name":"IncorrectTickSize","msg":"Incorrect tick size"},{"code":6007,"name":"ZeroPrice","msg":"ZeroPrice"},{"code":6008,"name":"ZeroSize","msg":"ZeroSize"},{"code":6009,"name":"ZeroWithdrawableBalance","msg":"Zero withdrawable balance"},{"code":6010,"name":"DepositAmountExceeded","msg":"Deposit amount exceeds limit and user is not whitelisted"},{"code":6011,"name":"WithdrawalAmountExceedsWithdrawableBalance","msg":"Withdrawal amount exceeds withdrawable balance"},{"code":6012,"name":"AccountHasSufficientMarginPostCancels","msg":"Account has sufficient margin post cancels"},{"code":6013,"name":"OverBankrupt","msg":"Over bankrupt"},{"code":6014,"name":"AccountHasSufficientMargin","msg":"Account has sufficient margin"},{"code":6015,"name":"UserHasNoActiveOrders","msg":"User has no active orders"},{"code":6016,"name":"InvalidExpirationInterval","msg":"Invalid expiration interval"},{"code":6017,"name":"ProductMarketsAlreadyInitialized","msg":"Product markets already initialized"},{"code":6018,"name":"InvalidProductMarketKey","msg":"Invalid product market key"},{"code":6019,"name":"MarketNotLive","msg":"Market not live"},{"code":6020,"name":"MarketPricingNotReady","msg":"Market pricing not ready"},{"code":6021,"name":"UserHasRemainingOrdersOnExpiredMarket","msg":"User has remaining orders on expired market"},{"code":6022,"name":"InvalidSeriesExpiration","msg":"Invalid series expiration"},{"code":6023,"name":"InvalidExpiredOrderCancel","msg":"Invalid expired order cancel"},{"code":6024,"name":"NoMarketsToAdd","msg":"No markets to add"},{"code":6025,"name":"UserHasUnsettledPositions","msg":"User has unsettled positions"},{"code":6026,"name":"NoMarginAccountsToSettle","msg":"No margin accounts to settle"},{"code":6027,"name":"CannotSettleUserWithActiveOrders","msg":"Cannot settle users with active orders"},{"code":6028,"name":"OrderbookNotEmpty","msg":"Orderbook not empty"},{"code":6029,"name":"InvalidNumberOfAccounts","msg":"Invalid number of accounts"},{"code":6030,"name":"InvalidMarketAccounts","msg":"Bids or Asks don't match the Market"},{"code":6031,"name":"ProductStrikeUninitialized","msg":"Product strike uninitialized"},{"code":6032,"name":"PricingNotUpToDate","msg":"Pricing not up to date"},{"code":6033,"name":"RetreatsAreStale","msg":"Retreats are stale"},{"code":6034,"name":"ProductDirty","msg":"Product dirty"},{"code":6035,"name":"ProductStrikesInitialized","msg":"Product strikes initialized"},{"code":6036,"name":"StrikeInitializationNotReady","msg":"Strike initialization not ready"},{"code":6037,"name":"UnsupportedKind","msg":"Unsupported kind"},{"code":6038,"name":"InvalidZetaGroup","msg":"Invalid zeta group"},{"code":6039,"name":"InvalidMarginAccount","msg":"Invalid margin account"},{"code":6040,"name":"InvalidGreeksAccount","msg":"Invalid greeks account"},{"code":6041,"name":"InvalidSettlementAccount","msg":"Invalid settlement account"},{"code":6042,"name":"InvalidCancelAuthority","msg":"Invalid cancel authority"},{"code":6043,"name":"CannotUpdatePricingAfterExpiry","msg":"Cannot update pricing after expiry"},{"code":6044,"name":"LoadAccountDiscriminatorAlreadySet","msg":"Account discriminator already set"},{"code":6045,"name":"AccountAlreadyInitialized","msg":"Account already initialized"},{"code":6046,"name":"GreeksAccountSeedsMismatch","msg":"Greeks account seeds mismatch"},{"code":6047,"name":"ZetaGroupAccountSeedsMismatch","msg":"Zeta group account seeds mismatch"},{"code":6048,"name":"MarginAccountSeedsMismatch","msg":"Margin account seeds mismatch"},{"code":6049,"name":"OpenOrdersAccountSeedsMismatch","msg":"Open orders account seeds mismatch"},{"code":6050,"name":"MarketNodeAccountSeedsMismatch","msg":"Market node seeds mismatch"},{"code":6051,"name":"UserTradingFeeWhitelistAccountSeedsMismatch","msg":"User trading fee whitelist account seeds mismatch"},{"code":6052,"name":"UserDepositWhitelistAccountSeedsMismatch","msg":"User deposit whitelist account seeds mismatch"},{"code":6053,"name":"MarketIndexesUninitialized","msg":"Market indexes uninitialized"},{"code":6054,"name":"MarketIndexesAlreadyInitialized","msg":"Market indexes already initialized"},{"code":6055,"name":"CannotGetUnsetStrike","msg":"Cannot get unset strike"},{"code":6056,"name":"CannotSetInitializedStrike","msg":"Cannot set initialized strike"},{"code":6057,"name":"CannotResetUninitializedStrike","msg":"Cannot set initialized strike"},{"code":6058,"name":"CrankMarginAccountNotMutable","msg":"CrankMarginAccountNotMutable"},{"code":6059,"name":"InvalidAdminSigner","msg":"InvalidAdminSigner"},{"code":6060,"name":"UserHasActiveOrders","msg":"User still has active orders"},{"code":6061,"name":"UserForceCancelInProgress","msg":"User has a force cancel in progress"},{"code":6062,"name":"FailedPriceBandCheck","msg":"Failed price band check"},{"code":6063,"name":"UnsortedOpenOrdersAccounts","msg":"Unsorted open orders accounts"},{"code":6064,"name":"AccountNotMutable","msg":"Account not mutable"},{"code":6065,"name":"AccountDiscriminatorMismatch","msg":"Account discriminator mismatch"},{"code":6066,"name":"InvalidMarketNodeIndex","msg":"Invalid market node index"},{"code":6067,"name":"InvalidMarketNode","msg":"Invalid market node"},{"code":6068,"name":"LUTOutOfBounds","msg":"Lut out of bounds"},{"code":6069,"name":"RebalanceInsuranceInvalidRemainingAccounts","msg":"Rebalance insurance vault with no margin accounts"},{"code":6070,"name":"InvalidMintDecimals","msg":"Invalid mint decimals"},{"code":6071,"name":"InvalidZetaGroupOracle","msg":"Invalid oracle for this zeta group"},{"code":6072,"name":"InvalidZetaGroupDepositMint","msg":"Invalid zeta group deposit mint"},{"code":6073,"name":"InvalidZetaGroupRebalanceMint","msg":"Invalid zeta group rebalance insurance vault mint"},{"code":6074,"name":"InvalidDepositAmount","msg":"Invalid deposit amount"},{"code":6075,"name":"InvalidTokenAccountOwner","msg":"Invalid token account owner"},{"code":6076,"name":"InvalidWithdrawAmount","msg":"Invalid withdraw amount"},{"code":6077,"name":"InvalidDepositRemainingAccounts","msg":"Invalid number of remaining accounts in deposit"},{"code":6078,"name":"InvalidPlaceOrderRemainingAccounts","msg":"Invalid number of remaining accounts in place order"},{"code":6079,"name":"ClientOrderIdCannotBeZero","msg":"ClientOrderIdCannotBeZero"},{"code":6080,"name":"ZetaGroupHalted","msg":"Zeta group halted"},{"code":6081,"name":"ZetaGroupNotHalted","msg":"Zeta group not halted"},{"code":6082,"name":"HaltMarkPriceNotSet","msg":"Halt mark price not set"},{"code":6083,"name":"HaltMarketsNotCleaned","msg":"Halt markets not cleaned"},{"code":6084,"name":"HaltMarketNodesNotCleaned","msg":"Halt market nodes not cleaned"},{"code":6085,"name":"CannotExpireOptionsAfterExpirationThreshold","msg":"Cannot expire options after expiration threshold"},{"code":6086,"name":"PostOnlyInCross","msg":"Post only order in cross"},{"code":6087,"name":"FillOrKillNotFullSize","msg":"Fill or kill order was not filled for full size"},{"code":6088,"name":"InvalidOpenOrdersMapOwner","msg":"Invalid open orders map owner"},{"code":6089,"name":"AccountDidNotSerialize","msg":"Failed to serialize the account"},{"code":6090,"name":"OpenOrdersWithNonEmptyPositions","msg":"Cannot close open orders account with non empty positions"},{"code":6091,"name":"CannotCloseNonEmptyMarginAccount","msg":"Cannot close margin account that is not empty"},{"code":6092,"name":"InvalidTagLength","msg":"Invalid tag length"},{"code":6093,"name":"NakedShortCallIsNotAllowed","msg":"Naked short call is not allowed"},{"code":6094,"name":"InvalidSpreadAccount","msg":"Invalid spread account"},{"code":6095,"name":"CannotCloseNonEmptySpreadAccount","msg":"Cannot close non empty spread account"},{"code":6096,"name":"SpreadAccountSeedsMismatch","msg":"Spread account seeds mismatch"},{"code":6097,"name":"SpreadAccountHasUnsettledPositions","msg":"Spread account seeds mismatch"},{"code":6098,"name":"SpreadAccountInvalidExpirySeriesState","msg":"Spread account invalid expiry series state"},{"code":6099,"name":"InsufficientFundsToCollateralizeSpreadAccount","msg":"Insufficient funds to collateralize spread account"},{"code":6100,"name":"FailedMaintenanceMarginRequirement","msg":"Failed maintenance margin requirement"},{"code":6101,"name":"InvalidMovement","msg":"Invalid movement"},{"code":6102,"name":"MovementOnExpiredSeries","msg":"Movement on expired series"},{"code":6103,"name":"InvalidMovementSize","msg":"Invalid movement size"},{"code":6104,"name":"ExceededMaxPositionMovements","msg":"Exceeded max position movements"},{"code":6105,"name":"ExceededMaxSpreadAccountContracts","msg":"Exceeded max spread account contracts"},{"code":6106,"name":"OraclePriceIsInvalid","msg":"Fetched oracle price is invalid"},{"code":6107,"name":"InvalidUnderlyingMint","msg":"Provided underlying mint address is invalid"},{"code":6108,"name":"InvalidReferrerAlias","msg":"Invalid referrer alias - Invalid length"},{"code":6109,"name":"ReferrerAlreadyHasAlias","msg":"Referrer already has alias"},{"code":6110,"name":"InvalidTreasuryMovementAmount","msg":"Invalid treasury movement amount"},{"code":6111,"name":"InvalidReferralsAdminSigner","msg":"Invalid referrals admin signer"},{"code":6112,"name":"InvalidSetReferralsRewardsRemainingAccounts","msg":"Invalid set referrals rewards remaining accounts"},{"code":6113,"name":"SetReferralsRewardsAccountNotMutable","msg":"Referrals account not mutable"},{"code":6114,"name":"InvalidClaimReferralsRewardsAmount","msg":"Invalid claim referrals rewards: not enough in refererals rewards wallet"},{"code":6115,"name":"InvalidClaimReferralsRewardsAccount","msg":"Invalid claim referrals rewards: referrals account is not a referral or referrer account"},{"code":6116,"name":"ReferralAccountSeedsMismatch","msg":"Referral account seeds mismatch"},{"code":6117,"name":"ReferrerAccountSeedsMismatch","msg":"Referrer account seeds mismatch"},{"code":6118,"name":"ProtectedMmMarginAccount","msg":"Market maker accounts are protected from liquidation"},{"code":6119,"name":"CannotWithdrawWithOpenOrders","msg":"Cannot withdraw with open orders"},{"code":6120,"name":"FundingRateNotUpToDate","msg":"Perp funding rate not up to date"},{"code":6121,"name":"PerpSyncQueueFull","msg":"Perp taker/maker sync queue is full"},{"code":6122,"name":"PerpSyncQueueAccountSeedsMismatch","msg":"PerpSyncQueue account seeds mismatch"},{"code":6123,"name":"PerpSyncQueueEmpty","msg":"Program tried to pop from an empty perpSyncQueue"},{"code":6124,"name":"InvalidNonPerpMarket","msg":"Perp product index given in placeOrder, use placePerpOrder"},{"code":6125,"name":"InvalidPerpMarket","msg":"Non-perp product index given in placePerpOrder, use placeOrder"},{"code":6126,"name":"CannotInitializePerpMarketNode","msg":"Not allowed to initialize market node for a perp market"},{"code":6127,"name":"DeprecatedInstruction","msg":"Instruction is deprecated, please use the newer version"},{"code":6128,"name":"ForceCancelExpiredTIFOrdersOnly","msg":"Can only force cancel expired TIF orders"},{"code":6129,"name":"InvalidPlaceOrderAuthority","msg":"Invalid place order authority"},{"code":6130,"name":"InvalidOpenOrdersAuthority","msg":"Invalid open orders authority"},{"code":6131,"name":"InsuranceVaultSeedsMismatch","msg":"Insurance vault seeds mismatch"},{"code":6132,"name":"OpenInterestLimitBreach","msg":"Open interest limit breach, decrease your position"},{"code":6133,"name":"WithdrawLimitBreach","msg":"Withdraw limit breach, wait to withdraw more"},{"code":6134,"name":"InvalidPricingOracle","msg":"Invalid oracle for this pricing account"},{"code":6135,"name":"PricingAccountSeedsMismatch","msg":"Pricing account seeds mismatch"},{"code":6136,"name":"ZetaHalted","msg":"Zeta exchange is halted"},{"code":6137,"name":"ZetaNotHalted","msg":"Zeta exchange is not halted"},{"code":6138,"name":"NotFreshCrossMarginAccount","msg":"Cross margin account is not unused, close it and make a new one"},{"code":6139,"name":"CannotCloseNonEmptyMarginAccountManager","msg":"Cannot close margin account manager that is not empty"},{"code":6140,"name":"CannotMigrateWithOpenOrders","msg":"Cannot migrate to cross margin account with open orders, close all open orders"},{"code":6141,"name":"InvalidMarginAccountType","msg":"Invalid margin account type - account is not MarginAccount or CrossMarginAccount"},{"code":6142,"name":"MarginAccountAssetMismatch","msg":"Margin account asset mismatched with instruction argument asset"},{"code":6143,"name":"FeatureUnavailable","msg":"Feature is not available yet"},{"code":6144,"name":"MarginAccountCannotLiquidateCrossMarginAccount","msg":"MarginAccount cannot liquidate CrossMarginAccount"}]} \ No newline at end of file diff --git a/kb_demo_app/package.json b/kb_demo_app/package.json index 282fd18..2cbff8d 100644 --- a/kb_demo_app/package.json +++ b/kb_demo_app/package.json @@ -1,7 +1,7 @@ { "name": "kb-demo-app", "private": true, - "version": "0.7.52", + "version": "0.7.53", "type": "module", "scripts": { "dev": "vite", diff --git a/kb_demo_app/tauri.conf.json b/kb_demo_app/tauri.conf.json index aae859b..4d1d93d 100644 --- a/kb_demo_app/tauri.conf.json +++ b/kb_demo_app/tauri.conf.json @@ -1,7 +1,7 @@ { "$schema": "https://schema.tauri.app/config/2", "productName": "kb-demo-app", - "version": "0.7.52", + "version": "0.7.53", "identifier": "com.sasedev.kb-demo-app", "build": { "beforeDevCommand": "npm run dev", diff --git a/kb_lib/src/dex.rs b/kb_lib/src/dex.rs index 7ed5735..4972c8a 100644 --- a/kb_lib/src/dex.rs +++ b/kb_lib/src/dex.rs @@ -66,6 +66,7 @@ pub use pump_fun::PumpFunDecodedEvent; pub use pump_fun::PumpFunDecoder; pub use pump_fun::PumpFunTradeDecoded; pub use pump_swap::PumpSwapDecodedEvent; +pub use pump_swap::PumpSwapInstructionDecoded; pub use pump_swap::PumpSwapDecoder; pub use pump_swap::PumpSwapTradeDecoded; pub use raydium_amm_v4::RaydiumAmmV4DecodedEvent; diff --git a/kb_lib/src/dex/pump_swap.rs b/kb_lib/src/dex/pump_swap.rs index a98cb4d..d749154 100644 --- a/kb_lib/src/dex/pump_swap.rs +++ b/kb_lib/src/dex/pump_swap.rs @@ -4,18 +4,990 @@ const PUMP_SWAP_BUY_DISCRIMINATOR: [u8; 8] = [102, 6, 61, 18, 1, 218, 235, 234]; const PUMP_SWAP_SELL_DISCRIMINATOR: [u8; 8] = [51, 230, 133, 164, 1, 127, 131, 173]; +const PUMP_SWAP_BUY_EXACT_QUOTE_IN_DISCRIMINATOR: [u8; 8] = [198, 46, 21, 82, 180, 217, 232, 112]; +const PUMP_SWAP_ADMIN_SET_COIN_CREATOR_DISCRIMINATOR: [u8; 8] = + [242, 40, 117, 145, 73, 96, 105, 104]; +const PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_DISCRIMINATOR: [u8; 8] = + [209, 11, 115, 87, 213, 23, 124, 204]; +const PUMP_SWAP_CLAIM_CASHBACK_DISCRIMINATOR: [u8; 8] = [37, 58, 35, 126, 190, 53, 228, 197]; +const PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_DISCRIMINATOR: [u8; 8] = [16, 4, 71, 28, 204, 1, 40, 27]; +const PUMP_SWAP_CLOSE_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR: [u8; 8] = + [249, 69, 164, 218, 150, 103, 84, 138]; +const PUMP_SWAP_COLLECT_COIN_CREATOR_FEE_DISCRIMINATOR: [u8; 8] = + [160, 57, 89, 42, 181, 139, 43, 66]; +const PUMP_SWAP_CREATE_CONFIG_DISCRIMINATOR: [u8; 8] = [201, 207, 243, 114, 75, 111, 47, 189]; +const PUMP_SWAP_CREATE_POOL_DISCRIMINATOR: [u8; 8] = [233, 146, 209, 142, 207, 104, 64, 188]; +const PUMP_SWAP_DEPOSIT_DISCRIMINATOR: [u8; 8] = [242, 35, 198, 137, 82, 225, 242, 182]; +const PUMP_SWAP_DISABLE_DISCRIMINATOR: [u8; 8] = [185, 173, 187, 90, 216, 15, 238, 233]; +const PUMP_SWAP_EXTEND_ACCOUNT_DISCRIMINATOR: [u8; 8] = [234, 102, 194, 203, 150, 72, 62, 229]; +const PUMP_SWAP_INIT_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR: [u8; 8] = + [94, 6, 202, 115, 255, 96, 232, 183]; +const PUMP_SWAP_MIGRATE_POOL_COIN_CREATOR_DISCRIMINATOR: [u8; 8] = + [208, 8, 159, 4, 74, 175, 16, 58]; +const PUMP_SWAP_SET_COIN_CREATOR_DISCRIMINATOR: [u8; 8] = [210, 149, 128, 45, 188, 58, 78, 175]; +const PUMP_SWAP_SET_RESERVED_FEE_RECIPIENTS_DISCRIMINATOR: [u8; 8] = + [111, 172, 162, 232, 114, 89, 213, 142]; +const PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR: [u8; 8] = + [86, 31, 192, 87, 163, 87, 79, 238]; +const PUMP_SWAP_TOGGLE_CASHBACK_ENABLED_DISCRIMINATOR: [u8; 8] = + [115, 103, 224, 255, 189, 89, 86, 195]; +const PUMP_SWAP_TOGGLE_MAYHEM_MODE_DISCRIMINATOR: [u8; 8] = [1, 9, 111, 208, 100, 31, 255, 163]; +const PUMP_SWAP_TRANSFER_CREATOR_FEES_TO_PUMP_DISCRIMINATOR: [u8; 8] = + [139, 52, 134, 85, 228, 229, 108, 241]; +const PUMP_SWAP_UPDATE_ADMIN_DISCRIMINATOR: [u8; 8] = [161, 176, 40, 213, 60, 184, 179, 228]; +const PUMP_SWAP_UPDATE_FEE_CONFIG_DISCRIMINATOR: [u8; 8] = [104, 184, 103, 242, 88, 151, 107, 20]; +const PUMP_SWAP_WITHDRAW_DISCRIMINATOR: [u8; 8] = [183, 18, 70, 156, 148, 109, 161, 34]; +const PUMP_SWAP_TRANSFER_CREATOR_FEES_TO_PUMP_V2_DISCRIMINATOR: [u8; 8] = + [1, 33, 78, 185, 33, 67, 44, 92]; +const PUMP_SWAP_UPDATE_BUYBACK_CONFIG_DISCRIMINATOR: [u8; 8] = + [251, 224, 171, 146, 160, 26, 113, 233]; +const PUMP_SWAP_SET_RESERVED_FEE_RECIPIENT_DISCRIMINATOR: [u8; 8] = + [207, 189, 178, 71, 167, 122, 68, 180]; +const PUMP_SWAP_ANCHOR_SELF_CPI_LOG_DISCRIMINATOR: [u8; 8] = [228, 69, 165, 46, 81, 203, 154, 29]; +const PUMP_SWAP_BUY_EVENT_DISCRIMINATOR: [u8; 8] = [103, 244, 82, 31, 44, 245, 119, 119]; +const PUMP_SWAP_ADMIN_SET_COIN_CREATOR_EVENT_DISCRIMINATOR: [u8; 8] = + [45, 220, 93, 24, 25, 97, 172, 104]; +const PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_EVENT_DISCRIMINATOR: [u8; 8] = + [147, 250, 108, 120, 247, 29, 67, 222]; +const PUMP_SWAP_CLAIM_CASHBACK_EVENT_DISCRIMINATOR: [u8; 8] = [226, 214, 246, 33, 7, 242, 147, 229]; +const PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_DISCRIMINATOR: [u8; 8] = + [79, 172, 246, 49, 205, 91, 206, 232]; +const PUMP_SWAP_CLOSE_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR: [u8; 8] = + [146, 159, 189, 172, 146, 88, 56, 244]; +const PUMP_SWAP_COLLECT_COIN_CREATOR_FEE_EVENT_DISCRIMINATOR: [u8; 8] = + [232, 245, 194, 238, 234, 218, 58, 89]; +const PUMP_SWAP_CREATE_CONFIG_EVENT_DISCRIMINATOR: [u8; 8] = [107, 52, 89, 129, 55, 226, 81, 22]; +const PUMP_SWAP_CREATE_POOL_EVENT_DISCRIMINATOR: [u8; 8] = [177, 49, 12, 210, 160, 118, 167, 116]; +const PUMP_SWAP_DEPOSIT_EVENT_DISCRIMINATOR: [u8; 8] = [120, 248, 61, 83, 31, 142, 107, 144]; +const PUMP_SWAP_DISABLE_EVENT_DISCRIMINATOR: [u8; 8] = [107, 253, 193, 76, 228, 202, 27, 104]; +const PUMP_SWAP_EXTEND_ACCOUNT_EVENT_DISCRIMINATOR: [u8; 8] = [97, 97, 215, 144, 93, 146, 22, 124]; +const PUMP_SWAP_INIT_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR: [u8; 8] = + [134, 36, 13, 72, 232, 101, 130, 216]; +const PUMP_SWAP_MIGRATE_POOL_COIN_CREATOR_EVENT_DISCRIMINATOR: [u8; 8] = + [170, 221, 82, 199, 147, 165, 247, 46]; +const PUMP_SWAP_RESERVED_FEE_RECIPIENTS_EVENT_DISCRIMINATOR: [u8; 8] = + [43, 188, 250, 18, 221, 75, 187, 95]; +const PUMP_SWAP_SELL_EVENT_DISCRIMINATOR: [u8; 8] = [62, 47, 55, 10, 165, 3, 220, 42]; +const PUMP_SWAP_SET_BONDING_CURVE_COIN_CREATOR_EVENT_DISCRIMINATOR: [u8; 8] = + [242, 231, 235, 102, 65, 99, 189, 211]; +const PUMP_SWAP_SET_METAPLEX_COIN_CREATOR_EVENT_DISCRIMINATOR: [u8; 8] = + [150, 107, 199, 123, 124, 207, 102, 228]; +const PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR: [u8; 8] = + [197, 122, 167, 124, 116, 81, 91, 255]; +const PUMP_SWAP_UPDATE_ADMIN_EVENT_DISCRIMINATOR: [u8; 8] = [225, 152, 171, 87, 246, 63, 66, 234]; +const PUMP_SWAP_UPDATE_FEE_CONFIG_EVENT_DISCRIMINATOR: [u8; 8] = + [90, 23, 65, 35, 62, 244, 188, 208]; +const PUMP_SWAP_WITHDRAW_EVENT_DISCRIMINATOR: [u8; 8] = [22, 9, 133, 26, 160, 44, 71, 192]; #[derive(Debug, Clone, Copy, PartialEq, Eq)] enum PumpSwapInstructionKind { + AdminSetCoinCreator, + AdminUpdateTokenIncentives, Buy, + BuyExactQuoteIn, + ClaimCashback, + ClaimTokenIncentives, + CloseUserVolumeAccumulator, + CollectCoinCreatorFee, + CreateConfig, + CreatePool, + Deposit, + Disable, + ExtendAccount, + InitUserVolumeAccumulator, + MigratePoolCoinCreator, Sell, + SetCoinCreator, + SetReservedFeeRecipients, + SyncUserVolumeAccumulator, + ToggleCashbackEnabled, + ToggleMayhemMode, + TransferCreatorFeesToPump, + UpdateAdmin, + UpdateFeeConfig, + Withdraw, + TransferCreatorFeesToPumpV2, + UpdateBuybackConfig, + SetReservedFeeRecipient, +} + +impl PumpSwapInstructionKind { + fn instruction_name(self) -> &'static str { + match self { + Self::AdminSetCoinCreator => return "admin_set_coin_creator", + Self::AdminUpdateTokenIncentives => return "admin_update_token_incentives", + Self::Buy => return "buy", + Self::BuyExactQuoteIn => return "buy_exact_quote_in", + Self::ClaimCashback => return "claim_cashback", + Self::ClaimTokenIncentives => return "claim_token_incentives", + Self::CloseUserVolumeAccumulator => return "close_user_volume_accumulator", + Self::CollectCoinCreatorFee => return "collect_coin_creator_fee", + Self::CreateConfig => return "create_config", + Self::CreatePool => return "create_pool", + Self::Deposit => return "deposit", + Self::Disable => return "disable", + Self::ExtendAccount => return "extend_account", + Self::InitUserVolumeAccumulator => return "init_user_volume_accumulator", + Self::MigratePoolCoinCreator => return "migrate_pool_coin_creator", + Self::Sell => return "sell", + Self::SetCoinCreator => return "set_coin_creator", + Self::SetReservedFeeRecipients => return "set_reserved_fee_recipients", + Self::SyncUserVolumeAccumulator => return "sync_user_volume_accumulator", + Self::ToggleCashbackEnabled => return "toggle_cashback_enabled", + Self::ToggleMayhemMode => return "toggle_mayhem_mode", + Self::TransferCreatorFeesToPump => return "transfer_creator_fees_to_pump", + Self::UpdateAdmin => return "update_admin", + Self::UpdateFeeConfig => return "update_fee_config", + Self::Withdraw => return "withdraw", + Self::TransferCreatorFeesToPumpV2 => return "transfer_creator_fees_to_pump_v2", + Self::UpdateBuybackConfig => return "update_buyback_config", + Self::SetReservedFeeRecipient => return "set_reserved_fee_recipient", + } + } + + fn event_kind(self) -> std::string::String { + return format!("pump_swap.{}", self.instruction_name()); + } + + fn is_sell_like_trade(self) -> bool { + return self == Self::Sell; + } + + fn is_materializable_trade_candidate(self) -> bool { + return self == Self::Buy || self == Self::Sell; + } + + fn requires_exact_amount_skip(self) -> bool { + return self == Self::BuyExactQuoteIn; + } } #[derive(Debug, Clone)] struct PumpSwapInstructionData { instruction_kind: PumpSwapInstructionKind, - base_amount_raw: std::option::Option, - quote_amount_bound_raw: std::option::Option, + discriminator_hex: std::string::String, + args_json: serde_json::Value, +} + +#[derive(Debug, Clone)] +struct PumpSwapAnchorBuyEvent { + payload_size: usize, + timestamp_raw: std::string::String, + base_amount_out_raw: std::string::String, + max_quote_amount_in_raw: std::string::String, + user_base_token_reserves_raw: std::string::String, + user_quote_token_reserves_raw: std::string::String, + pool_base_token_reserves_raw: std::string::String, + pool_quote_token_reserves_raw: std::string::String, + quote_amount_in_raw: std::string::String, + lp_fee_basis_points_raw: std::string::String, + lp_fee_raw: std::string::String, + protocol_fee_basis_points_raw: std::string::String, + protocol_fee_raw: std::string::String, + quote_amount_in_with_lp_fee_raw: std::string::String, + user_quote_amount_in_raw: std::string::String, + pool: std::string::String, + user: std::string::String, + user_base_token_account: std::string::String, + user_quote_token_account: std::string::String, + protocol_fee_recipient: std::string::String, + protocol_fee_recipient_token_account: std::string::String, + coin_creator: std::string::String, + coin_creator_fee_basis_points_raw: std::string::String, + coin_creator_fee_raw: std::string::String, + track_volume: bool, + total_unclaimed_tokens_raw: std::string::String, + total_claimed_tokens_raw: std::string::String, + current_sol_volume_raw: std::string::String, + last_update_timestamp_raw: std::string::String, + min_base_amount_out_raw: std::string::String, + ix_name: std::string::String, + cashback_fee_basis_points_raw: std::option::Option, + cashback_raw: std::option::Option, + buyback_fee_basis_points_raw: std::option::Option, + buyback_fee_raw: std::option::Option, +} + +#[derive(Debug, Clone)] +struct PumpSwapAnchorEventDecoded { + event_name: &'static str, + event_kind: &'static str, + discriminator_hex: std::string::String, + payload_size: usize, + payload_json: serde_json::Value, + pool_account: std::option::Option, + token_a_mint: std::option::Option, + token_b_mint: std::option::Option, + lp_mint: std::option::Option, +} + +#[derive(Debug, Clone)] +struct PumpSwapInstructionLink { + instruction_id: i64, + instruction_kind: PumpSwapInstructionKind, + pool_account: std::option::Option, +} + +#[derive(Debug, Clone, Copy)] +enum PumpSwapAnchorFieldKind { + U8, + U16, + U64, + I64, + Bool, + Pubkey, + PubkeyArray(usize), +} + +#[derive(Debug, Clone, Copy)] +struct PumpSwapAnchorFieldDescriptor { + name: &'static str, + kind: PumpSwapAnchorFieldKind, +} + +#[derive(Debug, Clone, Copy)] +struct PumpSwapAnchorEventDescriptor { + event_name: &'static str, + event_kind: &'static str, + discriminator: [u8; 8], + fields: &'static [PumpSwapAnchorFieldDescriptor], +} + +const PUMP_SWAP_ADMIN_SET_COIN_CREATOR_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "admin_set_coin_creator_authority", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "old_coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "new_coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "start_time", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "end_time", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "day_number", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "token_supply_per_day", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "seconds_in_a_day", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, +]; +const PUMP_SWAP_CLAIM_CASHBACK_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "amount", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "total_claimed", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "total_cashback_earned", + kind: PumpSwapAnchorFieldKind::U64, + }, +]; +const PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "amount", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "total_claimed_tokens", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "current_sol_volume", + kind: PumpSwapAnchorFieldKind::U64, + }, +]; +const PUMP_SWAP_CLOSE_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "total_unclaimed_tokens", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "total_claimed_tokens", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "current_sol_volume", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "last_update_timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, +]; +const PUMP_SWAP_COLLECT_COIN_CREATOR_FEE_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator_fee", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator_vault_ata", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_CREATE_CONFIG_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "admin", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee_recipients", + kind: PumpSwapAnchorFieldKind::PubkeyArray(8), + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "admin_set_coin_creator_authority", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_CREATE_POOL_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "index", + kind: PumpSwapAnchorFieldKind::U16, + }, + PumpSwapAnchorFieldDescriptor { + name: "creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "quote_mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_mint_decimals", + kind: PumpSwapAnchorFieldKind::U8, + }, + PumpSwapAnchorFieldDescriptor { + name: "quote_mint_decimals", + kind: PumpSwapAnchorFieldKind::U8, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "quote_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_base_amount", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_quote_amount", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "minimum_liquidity", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "initial_liquidity", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_token_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_bump", + kind: PumpSwapAnchorFieldKind::U8, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_base_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "is_mayhem_mode", + kind: PumpSwapAnchorFieldKind::Bool, + }, +]; +const PUMP_SWAP_DEPOSIT_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_token_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "max_base_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "max_quote_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_base_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_base_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_quote_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "quote_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_mint_supply", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_base_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_pool_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_DISABLE_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "admin", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "disable_create_pool", + kind: PumpSwapAnchorFieldKind::Bool, + }, + PumpSwapAnchorFieldDescriptor { + name: "disable_deposit", + kind: PumpSwapAnchorFieldKind::Bool, + }, + PumpSwapAnchorFieldDescriptor { + name: "disable_withdraw", + kind: PumpSwapAnchorFieldKind::Bool, + }, + PumpSwapAnchorFieldDescriptor { + name: "disable_buy", + kind: PumpSwapAnchorFieldKind::Bool, + }, + PumpSwapAnchorFieldDescriptor { + name: "disable_sell", + kind: PumpSwapAnchorFieldKind::Bool, + }, +]; +const PUMP_SWAP_EXTEND_ACCOUNT_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "current_size", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "new_size", + kind: PumpSwapAnchorFieldKind::U64, + }, +]; +const PUMP_SWAP_INIT_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "payer", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, +]; +const PUMP_SWAP_MIGRATE_POOL_COIN_CREATOR_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "sharing_config", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "old_coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "new_coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_RESERVED_FEE_RECIPIENTS_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "reserved_fee_recipient", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "reserved_fee_recipients", + kind: PumpSwapAnchorFieldKind::PubkeyArray(7), + }, +]; +const PUMP_SWAP_SELL_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "min_quote_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_base_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_base_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_quote_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "quote_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_fee", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "quote_amount_out_without_lp_fee", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_base_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee_recipient", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee_recipient_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator_fee", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "cashback_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "cashback", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "buyback_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "buyback_fee", + kind: PumpSwapAnchorFieldKind::U64, + }, +]; +const PUMP_SWAP_SET_BONDING_CURVE_COIN_CREATOR_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "bonding_curve", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_SET_METAPLEX_COIN_CREATOR_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_mint", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "metadata", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "total_claimed_tokens_before", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "total_claimed_tokens_after", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, +]; +const PUMP_SWAP_UPDATE_ADMIN_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "admin", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "new_admin", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_UPDATE_FEE_CONFIG_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "admin", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "protocol_fee_recipients", + kind: PumpSwapAnchorFieldKind::PubkeyArray(8), + }, + PumpSwapAnchorFieldDescriptor { + name: "coin_creator_fee_basis_points", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "admin_set_coin_creator_authority", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; +const PUMP_SWAP_WITHDRAW_EVENT_FIELDS: &[PumpSwapAnchorFieldDescriptor] = &[ + PumpSwapAnchorFieldDescriptor { + name: "timestamp", + kind: PumpSwapAnchorFieldKind::I64, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_token_amount_in", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "min_base_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "min_quote_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_base_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_base_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool_quote_token_reserves", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "base_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "quote_amount_out", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "lp_mint_supply", + kind: PumpSwapAnchorFieldKind::U64, + }, + PumpSwapAnchorFieldDescriptor { + name: "pool", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_base_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_quote_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, + PumpSwapAnchorFieldDescriptor { + name: "user_pool_token_account", + kind: PumpSwapAnchorFieldKind::Pubkey, + }, +]; + +#[derive(Debug, Clone, Copy)] +struct PumpSwapAccountLayout { + pool_index: std::option::Option, + token_a_mint_index: std::option::Option, + token_b_mint_index: std::option::Option, + lp_mint_index: std::option::Option, + user_base_token_account_index: std::option::Option, + user_quote_token_account_index: std::option::Option, + pool_base_token_account_index: std::option::Option, + pool_quote_token_account_index: std::option::Option, + global_volume_accumulator_index: std::option::Option, + user_volume_accumulator_index: std::option::Option, } /// Decoded PumpSwap trade event. @@ -43,13 +1015,42 @@ pub struct PumpSwapTradeDecoded { pub payload_json: serde_json::Value, } +/// Decoded PumpSwap non-trade instruction event. +#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] +pub struct PumpSwapInstructionDecoded { + /// Parent transaction id. + pub transaction_id: i64, + /// Parent instruction id. + pub instruction_id: i64, + /// Transaction signature. + pub signature: std::string::String, + /// Program id. + pub program_id: std::string::String, + /// Local decoded event kind. + pub event_kind: std::string::String, + /// Optional heuristic pool account. + pub pool_account: std::option::Option, + /// Optional token A mint. + pub token_a_mint: std::option::Option, + /// Optional token B mint. + pub token_b_mint: std::option::Option, + /// Optional LP mint or pool token mint. + pub lp_mint: std::option::Option, + /// Decoded payload. + pub payload_json: serde_json::Value, +} + /// Decoded PumpSwap event. #[derive(Debug, Clone, serde::Serialize, serde::Deserialize)] pub enum PumpSwapDecodedEvent { /// Buy trade. BuyTrade(PumpSwapTradeDecoded), + /// Buy-exact-quote-in trade. + BuyExactQuoteInTrade(PumpSwapTradeDecoded), /// Sell trade. SellTrade(PumpSwapTradeDecoded), + /// Specialized non-trade instruction retained for coverage and diagnostics. + Instruction(PumpSwapInstructionDecoded), } /// PumpSwap decoder. @@ -91,6 +1092,7 @@ impl PumpSwapDecoder { }; let log_messages = extract_log_messages(&transaction_json); let mut decoded_events = std::vec::Vec::new(); + let mut instruction_links = std::vec::Vec::new(); for instruction in instructions { let program_id_option = &instruction.program_id; let program_id = match program_id_option { @@ -105,39 +1107,6 @@ impl PumpSwapDecoder { Some(instruction_id) => instruction_id, None => continue, }; - let accounts_result = parse_accounts_json(instruction.accounts_json.as_str()); - let accounts = match accounts_result { - Ok(accounts) => accounts, - Err(error) => return Err(error), - }; - let parsed_json_result = parse_optional_parsed_json(instruction.parsed_json.as_ref()); - let parsed_json = match parsed_json_result { - Ok(parsed_json) => parsed_json, - Err(error) => return Err(error), - }; - let pool_account = extract_string_by_candidate_keys( - parsed_json.as_ref(), - &["pool", "poolAccount", "amm", "ammPool", "poolState"], - ) - .or_else(|| return extract_account(&accounts, 0)); - let token_a_mint = extract_string_by_candidate_keys( - parsed_json.as_ref(), - &["tokenAMint", "baseMint", "mintA", "coinMint", "token0Mint", "mint0"], - ) - .or_else(|| return extract_account(&accounts, 3)); - let token_b_mint = extract_string_by_candidate_keys( - parsed_json.as_ref(), - &["tokenBMint", "quoteMint", "mintB", "pcMint", "token1Mint", "mint1"], - ) - .or_else(|| return extract_account(&accounts, 4)); - let pool_v2 = extract_string_by_candidate_keys( - parsed_json.as_ref(), - &["poolV2", "pool_v2", "ammV2", "bondingCurveV2", "bonding_curve_v2"], - ); - let user_base_token_account = extract_account(&accounts, 5); - let user_quote_token_account = extract_account(&accounts, 6); - let pool_base_token_account = extract_account(&accounts, 7); - let pool_quote_token_account = extract_account(&accounts, 8); let instruction_data_result = parse_pump_swap_instruction_data(instruction.data_json.as_ref()); let instruction_data_option = match instruction_data_result { @@ -148,42 +1117,100 @@ impl PumpSwapDecoder { Some(instruction_data) => instruction_data, None => continue, }; - let instruction_kind = match instruction_data.instruction_kind { - PumpSwapInstructionKind::Buy => "buy", - PumpSwapInstructionKind::Sell => "sell", + let accounts_result = parse_accounts_json(instruction.accounts_json.as_str()); + let accounts = match accounts_result { + Ok(accounts) => accounts, + Err(error) => return Err(error), }; - let max_quote_amount_in_raw = match instruction_data.instruction_kind { - PumpSwapInstructionKind::Buy => instruction_data.quote_amount_bound_raw.clone(), - PumpSwapInstructionKind::Sell => None, + let parsed_json_result = parse_optional_parsed_json(instruction.parsed_json.as_ref()); + let parsed_json = match parsed_json_result { + Ok(parsed_json) => parsed_json, + Err(error) => return Err(error), }; - let min_quote_amount_out_raw = match instruction_data.instruction_kind { - PumpSwapInstructionKind::Buy => None, - PumpSwapInstructionKind::Sell => instruction_data.quote_amount_bound_raw.clone(), - }; - let payload_json = serde_json::json!({ - "decoder": "pump_swap", - "signature": transaction.signature, - "instructionId": instruction_id, - "parentInstructionId": instruction.parent_instruction_id, - "instructionIndex": instruction.instruction_index, - "innerInstructionIndex": instruction.inner_instruction_index, - "instructionKind": instruction_kind, - "instructionBaseAmountRaw": instruction_data.base_amount_raw, - "instructionQuoteAmountBoundRaw": instruction_data.quote_amount_bound_raw, - "maxQuoteAmountInRaw": max_quote_amount_in_raw, - "minQuoteAmountOutRaw": min_quote_amount_out_raw, - "userBaseTokenAccount": user_base_token_account, - "userQuoteTokenAccount": user_quote_token_account, - "accounts": accounts, - "parsed": parsed_json, - "logMessages": log_messages, - "poolAccount": pool_account, - "tokenAMint": token_a_mint, - "tokenBMint": token_b_mint, - "poolV2": pool_v2, - "poolBaseTokenAccount": pool_base_token_account, - "poolQuoteTokenAccount": pool_quote_token_account + let layout = account_layout_for_instruction(instruction_data.instruction_kind); + let pool_account = + resolve_pool_account(parsed_json.as_ref(), accounts.as_slice(), layout); + let token_a_mint = + resolve_token_a_mint(parsed_json.as_ref(), accounts.as_slice(), layout); + let token_b_mint = + resolve_token_b_mint(parsed_json.as_ref(), accounts.as_slice(), layout); + let lp_mint = resolve_lp_mint(parsed_json.as_ref(), accounts.as_slice(), layout); + let user_base_token_account = + account_at(accounts.as_slice(), layout.user_base_token_account_index); + let user_quote_token_account = + account_at(accounts.as_slice(), layout.user_quote_token_account_index); + let pool_base_token_account = + account_at(accounts.as_slice(), layout.pool_base_token_account_index); + let pool_quote_token_account = + account_at(accounts.as_slice(), layout.pool_quote_token_account_index); + let global_volume_accumulator = + account_at(accounts.as_slice(), layout.global_volume_accumulator_index); + let user_volume_accumulator = + account_at(accounts.as_slice(), layout.user_volume_accumulator_index); + instruction_links.push(PumpSwapInstructionLink { + instruction_id, + instruction_kind: instruction_data.instruction_kind, + pool_account: pool_account.clone(), }); + let mut payload_json = build_instruction_payload( + transaction, + instruction, + &accounts, + parsed_json, + log_messages.clone(), + &instruction_data, + pool_account.clone(), + token_a_mint.clone(), + token_b_mint.clone(), + lp_mint.clone(), + user_base_token_account, + user_quote_token_account, + pool_base_token_account, + pool_quote_token_account, + global_volume_accumulator, + user_volume_accumulator, + ); + if instruction_data.instruction_kind == PumpSwapInstructionKind::BuyExactQuoteIn { + let anchor_buy_event = find_pump_swap_anchor_buy_event_for_instruction( + log_messages.as_slice(), + pool_account.as_deref(), + "buy_exact_quote_in", + ); + if let Some(anchor_buy_event) = anchor_buy_event { + payload_json = + enrich_payload_with_anchor_buy_event(payload_json, &anchor_buy_event); + decoded_events.push(crate::PumpSwapDecodedEvent::BuyExactQuoteInTrade( + crate::PumpSwapTradeDecoded { + transaction_id, + instruction_id, + signature: transaction.signature.clone(), + program_id: program_id.clone(), + trade_side: crate::SwapTradeSide::BuyBase, + pool_account, + token_a_mint, + token_b_mint, + pool_v2: lp_mint, + payload_json, + }, + )); + continue; + } + decoded_events.push(crate::PumpSwapDecodedEvent::Instruction( + crate::PumpSwapInstructionDecoded { + transaction_id, + instruction_id, + signature: transaction.signature.clone(), + program_id: program_id.clone(), + event_kind: instruction_data.instruction_kind.event_kind(), + pool_account, + token_a_mint, + token_b_mint, + lp_mint, + payload_json, + }, + )); + continue; + } if instruction_data.instruction_kind == PumpSwapInstructionKind::Buy { decoded_events.push(crate::PumpSwapDecodedEvent::BuyTrade( crate::PumpSwapTradeDecoded { @@ -192,15 +1219,16 @@ impl PumpSwapDecoder { signature: transaction.signature.clone(), program_id: program_id.clone(), trade_side: crate::SwapTradeSide::BuyBase, - pool_account: pool_account.clone(), - token_a_mint: token_a_mint.clone(), - token_b_mint: token_b_mint.clone(), - pool_v2: pool_v2.clone(), - payload_json: payload_json.clone(), + pool_account, + token_a_mint, + token_b_mint, + pool_v2: lp_mint, + payload_json, }, )); + continue; } - if instruction_data.instruction_kind == PumpSwapInstructionKind::Sell { + if instruction_data.instruction_kind.is_sell_like_trade() { decoded_events.push(crate::PumpSwapDecodedEvent::SellTrade( crate::PumpSwapTradeDecoded { transaction_id, @@ -211,16 +1239,1436 @@ impl PumpSwapDecoder { pool_account, token_a_mint, token_b_mint, - pool_v2, + pool_v2: lp_mint, payload_json, }, )); + continue; } + decoded_events.push(crate::PumpSwapDecodedEvent::Instruction( + crate::PumpSwapInstructionDecoded { + transaction_id, + instruction_id, + signature: transaction.signature.clone(), + program_id: program_id.clone(), + event_kind: instruction_data.instruction_kind.event_kind(), + pool_account, + token_a_mint, + token_b_mint, + lp_mint, + payload_json, + }, + )); } + let anchor_event_decoded = decode_pump_swap_anchor_event_instruction_events( + transaction, + instruction_links.as_slice(), + log_messages.as_slice(), + ); + decoded_events.extend(anchor_event_decoded); return Ok(decoded_events); } } +fn instruction_id_for_payload(instruction: &crate::ChainInstructionDto) -> i64 { + match instruction.id { + Some(instruction_id) => return instruction_id, + None => return 0, + } +} + +fn account_layout_for_instruction(kind: PumpSwapInstructionKind) -> PumpSwapAccountLayout { + match kind { + PumpSwapInstructionKind::Buy + | PumpSwapInstructionKind::Sell + | PumpSwapInstructionKind::BuyExactQuoteIn => { + return PumpSwapAccountLayout { + pool_index: Some(0), + token_a_mint_index: Some(3), + token_b_mint_index: Some(4), + lp_mint_index: None, + user_base_token_account_index: Some(5), + user_quote_token_account_index: Some(6), + pool_base_token_account_index: Some(7), + pool_quote_token_account_index: Some(8), + global_volume_accumulator_index: Some(19), + user_volume_accumulator_index: Some(20), + }; + }, + PumpSwapInstructionKind::CreatePool + | PumpSwapInstructionKind::Deposit + | PumpSwapInstructionKind::Withdraw => { + return PumpSwapAccountLayout { + pool_index: Some(0), + token_a_mint_index: Some(3), + token_b_mint_index: Some(4), + lp_mint_index: Some(5), + user_base_token_account_index: Some(6), + user_quote_token_account_index: Some(7), + pool_base_token_account_index: Some(9), + pool_quote_token_account_index: Some(10), + global_volume_accumulator_index: None, + user_volume_accumulator_index: None, + }; + }, + PumpSwapInstructionKind::CollectCoinCreatorFee + | PumpSwapInstructionKind::AdminSetCoinCreator + | PumpSwapInstructionKind::MigratePoolCoinCreator + | PumpSwapInstructionKind::SetCoinCreator => { + return PumpSwapAccountLayout { + pool_index: Some(0), + token_a_mint_index: None, + token_b_mint_index: None, + lp_mint_index: None, + user_base_token_account_index: None, + user_quote_token_account_index: None, + pool_base_token_account_index: None, + pool_quote_token_account_index: None, + global_volume_accumulator_index: None, + user_volume_accumulator_index: None, + }; + }, + _ => { + return PumpSwapAccountLayout { + pool_index: None, + token_a_mint_index: None, + token_b_mint_index: None, + lp_mint_index: None, + user_base_token_account_index: None, + user_quote_token_account_index: None, + pool_base_token_account_index: None, + pool_quote_token_account_index: None, + global_volume_accumulator_index: None, + user_volume_accumulator_index: None, + }; + }, + } +} + +#[allow(clippy::too_many_arguments)] +fn build_instruction_payload( + transaction: &crate::ChainTransactionDto, + instruction: &crate::ChainInstructionDto, + accounts: &[std::string::String], + parsed_json: std::option::Option, + log_messages: std::vec::Vec, + instruction_data: &PumpSwapInstructionData, + pool_account: std::option::Option, + token_a_mint: std::option::Option, + token_b_mint: std::option::Option, + lp_mint: std::option::Option, + user_base_token_account: std::option::Option, + user_quote_token_account: std::option::Option, + pool_base_token_account: std::option::Option, + pool_quote_token_account: std::option::Option, + global_volume_accumulator: std::option::Option, + user_volume_accumulator: std::option::Option, +) -> serde_json::Value { + let trade_candidate = instruction_data.instruction_kind.is_materializable_trade_candidate() + && pool_account.is_some() + && token_a_mint.is_some() + && token_b_mint.is_some(); + let mut object = serde_json::Map::new(); + object.insert("decoder".to_string(), serde_json::Value::String("pump_swap".to_string())); + object.insert( + "signature".to_string(), + serde_json::Value::String(transaction.signature.clone()), + ); + object.insert( + "instructionId".to_string(), + serde_json::Value::Number(serde_json::Number::from(instruction_id_for_payload( + instruction, + ))), + ); + insert_optional_i64(&mut object, "parentInstructionId", instruction.parent_instruction_id); + object.insert( + "instructionIndex".to_string(), + serde_json::Value::Number(serde_json::Number::from(instruction.instruction_index)), + ); + insert_optional_u32(&mut object, "innerInstructionIndex", instruction.inner_instruction_index); + object.insert( + "instructionKind".to_string(), + serde_json::Value::String(instruction_data.instruction_kind.instruction_name().to_string()), + ); + object.insert( + "eventKind".to_string(), + serde_json::Value::String(instruction_data.instruction_kind.event_kind()), + ); + object.insert( + "instructionDiscriminatorHex".to_string(), + serde_json::Value::String(instruction_data.discriminator_hex.clone()), + ); + object.insert("args".to_string(), instruction_data.args_json.clone()); + insert_optional_string(&mut object, "poolAccount", pool_account.clone()); + insert_optional_string(&mut object, "pool", pool_account); + insert_optional_string(&mut object, "tokenAMint", token_a_mint.clone()); + insert_optional_string(&mut object, "baseMint", token_a_mint); + insert_optional_string(&mut object, "tokenBMint", token_b_mint.clone()); + insert_optional_string(&mut object, "quoteMint", token_b_mint); + insert_optional_string(&mut object, "lpMint", lp_mint); + insert_optional_string(&mut object, "poolV2", None); + insert_optional_string(&mut object, "userBaseTokenAccount", user_base_token_account); + insert_optional_string(&mut object, "userQuoteTokenAccount", user_quote_token_account); + insert_optional_string(&mut object, "poolBaseTokenAccount", pool_base_token_account); + insert_optional_string(&mut object, "poolQuoteTokenAccount", pool_quote_token_account); + insert_optional_string(&mut object, "globalVolumeAccumulator", global_volume_accumulator); + insert_optional_string(&mut object, "userVolumeAccumulator", user_volume_accumulator); + object.insert("accounts".to_string(), serde_json::json!(accounts)); + insert_optional_value(&mut object, "parsed", parsed_json); + object.insert("logMessages".to_string(), serde_json::json!(log_messages)); + object.insert("accountCount".to_string(), serde_json::json!(accounts.len())); + object.insert("tradeCandidate".to_string(), serde_json::Value::Bool(trade_candidate)); + object.insert("candleCandidate".to_string(), serde_json::Value::Bool(trade_candidate)); + if instruction_data.instruction_kind.requires_exact_amount_skip() { + object.insert( + "amountSource".to_string(), + serde_json::Value::String("instruction_bounds_only".to_string()), + ); + object.insert( + "amountResolutionStatus".to_string(), + serde_json::Value::String("exact_amounts_not_proven".to_string()), + ); + object.insert( + "skipTradeReason".to_string(), + serde_json::Value::String( + "pump_swap_buy_exact_quote_in_exact_amounts_not_proven".to_string(), + ), + ); + object.insert( + "skipCandleReason".to_string(), + serde_json::Value::String( + "pump_swap_buy_exact_quote_in_exact_amounts_not_proven".to_string(), + ), + ); + } else if trade_candidate { + object.insert( + "amountSource".to_string(), + serde_json::Value::String("pump_swap_post_decode_balance_delta_resolution".to_string()), + ); + } else { + object.insert( + "skipTradeReason".to_string(), + serde_json::Value::String( + "pump_swap_non_trade_or_incomplete_trade_instruction".to_string(), + ), + ); + object.insert( + "skipCandleReason".to_string(), + serde_json::Value::String( + "pump_swap_non_trade_or_incomplete_trade_instruction".to_string(), + ), + ); + } + return serde_json::Value::Object(object); +} + +fn enrich_payload_with_anchor_buy_event( + payload_json: serde_json::Value, + anchor_event: &PumpSwapAnchorBuyEvent, +) -> serde_json::Value { + let mut object = match payload_json { + serde_json::Value::Object(object) => object, + other => { + let mut object = serde_json::Map::new(); + object.insert("rawPayload".to_string(), other); + object + }, + }; + object.remove("skipTradeReason"); + object.remove("skipCandleReason"); + object.insert("tradeCandidate".to_string(), serde_json::Value::Bool(true)); + object.insert("candleCandidate".to_string(), serde_json::Value::Bool(true)); + object.insert("tradeSide".to_string(), serde_json::Value::String("BuyBase".to_string())); + object.insert( + "amountSource".to_string(), + serde_json::Value::String("pump_swap_anchor_buy_event".to_string()), + ); + object.insert( + "amountResolutionStatus".to_string(), + serde_json::Value::String("exact_anchor_buy_event".to_string()), + ); + object.insert( + "baseAmountRaw".to_string(), + serde_json::Value::String(anchor_event.base_amount_out_raw.clone()), + ); + object.insert( + "quoteAmountRaw".to_string(), + serde_json::Value::String(anchor_event.user_quote_amount_in_raw.clone()), + ); + object.insert("user".to_string(), serde_json::Value::String(anchor_event.user.clone())); + object.insert("anchorBuyEvent".to_string(), anchor_buy_event_to_json(anchor_event)); + return serde_json::Value::Object(object); +} + +fn anchor_buy_event_to_json(anchor_event: &PumpSwapAnchorBuyEvent) -> serde_json::Value { + let mut object = serde_json::Map::new(); + object.insert( + "anchorEventName".to_string(), + serde_json::Value::String("buy_event".to_string()), + ); + object.insert( + "anchorEventDiscriminatorHex".to_string(), + serde_json::Value::String("67f4521f2cf57777".to_string()), + ); + object.insert( + "anchorEventPayloadSize".to_string(), + serde_json::json!(anchor_event.payload_size), + ); + object.insert("ixName".to_string(), serde_json::Value::String(anchor_event.ix_name.clone())); + object.insert( + "timestampRaw".to_string(), + serde_json::Value::String(anchor_event.timestamp_raw.clone()), + ); + object.insert( + "baseAmountOutRaw".to_string(), + serde_json::Value::String(anchor_event.base_amount_out_raw.clone()), + ); + object.insert( + "maxQuoteAmountInRaw".to_string(), + serde_json::Value::String(anchor_event.max_quote_amount_in_raw.clone()), + ); + object.insert( + "userBaseTokenReservesRaw".to_string(), + serde_json::Value::String(anchor_event.user_base_token_reserves_raw.clone()), + ); + object.insert( + "userQuoteTokenReservesRaw".to_string(), + serde_json::Value::String(anchor_event.user_quote_token_reserves_raw.clone()), + ); + object.insert( + "poolBaseTokenReservesRaw".to_string(), + serde_json::Value::String(anchor_event.pool_base_token_reserves_raw.clone()), + ); + object.insert( + "poolQuoteTokenReservesRaw".to_string(), + serde_json::Value::String(anchor_event.pool_quote_token_reserves_raw.clone()), + ); + object.insert( + "quoteAmountInRaw".to_string(), + serde_json::Value::String(anchor_event.quote_amount_in_raw.clone()), + ); + object.insert( + "lpFeeBasisPointsRaw".to_string(), + serde_json::Value::String(anchor_event.lp_fee_basis_points_raw.clone()), + ); + object.insert( + "lpFeeRaw".to_string(), + serde_json::Value::String(anchor_event.lp_fee_raw.clone()), + ); + object.insert( + "protocolFeeBasisPointsRaw".to_string(), + serde_json::Value::String(anchor_event.protocol_fee_basis_points_raw.clone()), + ); + object.insert( + "protocolFeeRaw".to_string(), + serde_json::Value::String(anchor_event.protocol_fee_raw.clone()), + ); + object.insert( + "quoteAmountInWithLpFeeRaw".to_string(), + serde_json::Value::String(anchor_event.quote_amount_in_with_lp_fee_raw.clone()), + ); + object.insert( + "userQuoteAmountInRaw".to_string(), + serde_json::Value::String(anchor_event.user_quote_amount_in_raw.clone()), + ); + object.insert("pool".to_string(), serde_json::Value::String(anchor_event.pool.clone())); + object.insert("user".to_string(), serde_json::Value::String(anchor_event.user.clone())); + object.insert( + "userBaseTokenAccount".to_string(), + serde_json::Value::String(anchor_event.user_base_token_account.clone()), + ); + object.insert( + "userQuoteTokenAccount".to_string(), + serde_json::Value::String(anchor_event.user_quote_token_account.clone()), + ); + object.insert( + "protocolFeeRecipient".to_string(), + serde_json::Value::String(anchor_event.protocol_fee_recipient.clone()), + ); + object.insert( + "protocolFeeRecipientTokenAccount".to_string(), + serde_json::Value::String(anchor_event.protocol_fee_recipient_token_account.clone()), + ); + object.insert( + "coinCreator".to_string(), + serde_json::Value::String(anchor_event.coin_creator.clone()), + ); + object.insert( + "coinCreatorFeeBasisPointsRaw".to_string(), + serde_json::Value::String(anchor_event.coin_creator_fee_basis_points_raw.clone()), + ); + object.insert( + "coinCreatorFeeRaw".to_string(), + serde_json::Value::String(anchor_event.coin_creator_fee_raw.clone()), + ); + object.insert("trackVolume".to_string(), serde_json::Value::Bool(anchor_event.track_volume)); + object.insert( + "totalUnclaimedTokensRaw".to_string(), + serde_json::Value::String(anchor_event.total_unclaimed_tokens_raw.clone()), + ); + object.insert( + "totalClaimedTokensRaw".to_string(), + serde_json::Value::String(anchor_event.total_claimed_tokens_raw.clone()), + ); + object.insert( + "currentSolVolumeRaw".to_string(), + serde_json::Value::String(anchor_event.current_sol_volume_raw.clone()), + ); + object.insert( + "lastUpdateTimestampRaw".to_string(), + serde_json::Value::String(anchor_event.last_update_timestamp_raw.clone()), + ); + object.insert( + "minBaseAmountOutRaw".to_string(), + serde_json::Value::String(anchor_event.min_base_amount_out_raw.clone()), + ); + insert_optional_string( + &mut object, + "cashbackFeeBasisPointsRaw", + anchor_event.cashback_fee_basis_points_raw.clone(), + ); + insert_optional_string(&mut object, "cashbackRaw", anchor_event.cashback_raw.clone()); + insert_optional_string( + &mut object, + "buybackFeeBasisPointsRaw", + anchor_event.buyback_fee_basis_points_raw.clone(), + ); + insert_optional_string(&mut object, "buybackFeeRaw", anchor_event.buyback_fee_raw.clone()); + return serde_json::Value::Object(object); +} + +fn decode_pump_swap_anchor_event_instruction_events( + transaction: &crate::ChainTransactionDto, + instruction_links: &[PumpSwapInstructionLink], + log_messages: &[std::string::String], +) -> std::vec::Vec { + let transaction_id = match transaction.id { + Some(transaction_id) => transaction_id, + None => return std::vec::Vec::new(), + }; + let mut decoded_events = std::vec::Vec::new(); + let mut used_instruction_event_keys = std::collections::HashSet::::new(); + for message in log_messages { + let encoded = match extract_program_data_base64(message.as_str()) { + Some(encoded) => encoded, + None => continue, + }; + let anchor_event = match decode_pump_swap_anchor_event_from_base64(encoded) { + Some(anchor_event) => anchor_event, + None => continue, + }; + let instruction_id = match resolve_anchor_event_instruction_id( + &anchor_event, + instruction_links, + &mut used_instruction_event_keys, + ) { + Some(instruction_id) => instruction_id, + None => continue, + }; + let payload_json = build_anchor_event_payload(transaction, instruction_id, &anchor_event); + decoded_events.push(crate::PumpSwapDecodedEvent::Instruction( + crate::PumpSwapInstructionDecoded { + transaction_id, + instruction_id, + signature: transaction.signature.clone(), + program_id: crate::PUMP_SWAP_PROGRAM_ID.to_string(), + event_kind: anchor_event.event_kind.to_string(), + pool_account: anchor_event.pool_account.clone(), + token_a_mint: anchor_event.token_a_mint.clone(), + token_b_mint: anchor_event.token_b_mint.clone(), + lp_mint: anchor_event.lp_mint.clone(), + payload_json, + }, + )); + } + return decoded_events; +} + +fn resolve_anchor_event_instruction_id( + anchor_event: &PumpSwapAnchorEventDecoded, + instruction_links: &[PumpSwapInstructionLink], + used_instruction_event_keys: &mut std::collections::HashSet, +) -> std::option::Option { + let expected_kind = expected_instruction_kind_for_anchor_event(anchor_event); + for link in instruction_links { + if let Some(expected_kind) = expected_kind { + if link.instruction_kind != expected_kind { + continue; + } + } + if !anchor_event_pool_matches_link(anchor_event, link) { + continue; + } + let key = format!("{}:{}", link.instruction_id, anchor_event.event_kind); + if used_instruction_event_keys.contains(key.as_str()) { + continue; + } + used_instruction_event_keys.insert(key); + return Some(link.instruction_id); + } + for link in instruction_links { + let key = format!("{}:{}", link.instruction_id, anchor_event.event_kind); + if used_instruction_event_keys.contains(key.as_str()) { + continue; + } + used_instruction_event_keys.insert(key); + return Some(link.instruction_id); + } + return None; +} + +fn anchor_event_pool_matches_link( + anchor_event: &PumpSwapAnchorEventDecoded, + link: &PumpSwapInstructionLink, +) -> bool { + let anchor_pool = match anchor_event.pool_account.as_ref() { + Some(anchor_pool) => anchor_pool, + None => return true, + }; + let link_pool = match link.pool_account.as_ref() { + Some(link_pool) => link_pool, + None => return true, + }; + return anchor_pool == link_pool; +} + +fn expected_instruction_kind_for_anchor_event( + anchor_event: &PumpSwapAnchorEventDecoded, +) -> std::option::Option { + match anchor_event.event_name { + "admin_set_coin_creator_event" => { + return Some(PumpSwapInstructionKind::AdminSetCoinCreator); + }, + "admin_update_token_incentives_event" => { + return Some(PumpSwapInstructionKind::AdminUpdateTokenIncentives); + }, + "buy_event" => { + let ix_name = payload_string_value(&anchor_event.payload_json, "ixName"); + if let Some(ix_name) = ix_name { + if ix_name == "buy_exact_quote_in" { + return Some(PumpSwapInstructionKind::BuyExactQuoteIn); + } + } + return Some(PumpSwapInstructionKind::Buy); + }, + "claim_cashback_event" => return Some(PumpSwapInstructionKind::ClaimCashback), + "claim_token_incentives_event" => { + return Some(PumpSwapInstructionKind::ClaimTokenIncentives); + }, + "close_user_volume_accumulator_event" => { + return Some(PumpSwapInstructionKind::CloseUserVolumeAccumulator); + }, + "collect_coin_creator_fee_event" => { + return Some(PumpSwapInstructionKind::CollectCoinCreatorFee); + }, + "create_config_event" => return Some(PumpSwapInstructionKind::CreateConfig), + "create_pool_event" => return Some(PumpSwapInstructionKind::CreatePool), + "deposit_event" => return Some(PumpSwapInstructionKind::Deposit), + "disable_event" => return Some(PumpSwapInstructionKind::Disable), + "extend_account_event" => return Some(PumpSwapInstructionKind::ExtendAccount), + "init_user_volume_accumulator_event" => { + return Some(PumpSwapInstructionKind::InitUserVolumeAccumulator); + }, + "migrate_pool_coin_creator_event" => { + return Some(PumpSwapInstructionKind::MigratePoolCoinCreator); + }, + "reserved_fee_recipients_event" => { + return Some(PumpSwapInstructionKind::SetReservedFeeRecipients); + }, + "sell_event" => return Some(PumpSwapInstructionKind::Sell), + "set_bonding_curve_coin_creator_event" => { + return Some(PumpSwapInstructionKind::SetCoinCreator); + }, + "set_metaplex_coin_creator_event" => return Some(PumpSwapInstructionKind::SetCoinCreator), + "sync_user_volume_accumulator_event" => { + return Some(PumpSwapInstructionKind::SyncUserVolumeAccumulator); + }, + "update_admin_event" => return Some(PumpSwapInstructionKind::UpdateAdmin), + "update_fee_config_event" => return Some(PumpSwapInstructionKind::UpdateFeeConfig), + "withdraw_event" => return Some(PumpSwapInstructionKind::Withdraw), + _ => return None, + } +} + +fn build_anchor_event_payload( + transaction: &crate::ChainTransactionDto, + instruction_id: i64, + anchor_event: &PumpSwapAnchorEventDecoded, +) -> serde_json::Value { + let mut object = match anchor_event.payload_json.clone() { + serde_json::Value::Object(object) => object, + other => { + let mut object = serde_json::Map::new(); + object.insert("rawAnchorEventPayload".to_string(), other); + object + }, + }; + object.insert("decoder".to_string(), serde_json::Value::String("pump_swap".to_string())); + object.insert( + "signature".to_string(), + serde_json::Value::String(transaction.signature.clone()), + ); + object.insert( + "instructionId".to_string(), + serde_json::Value::Number(serde_json::Number::from(instruction_id)), + ); + object.insert( + "eventKind".to_string(), + serde_json::Value::String(anchor_event.event_kind.to_string()), + ); + object.insert( + "anchorEventName".to_string(), + serde_json::Value::String(anchor_event.event_name.to_string()), + ); + object.insert( + "anchorEventDiscriminatorHex".to_string(), + serde_json::Value::String(anchor_event.discriminator_hex.clone()), + ); + object.insert( + "anchorEventPayloadSize".to_string(), + serde_json::json!(anchor_event.payload_size), + ); + object.insert( + "anchorEventSource".to_string(), + serde_json::Value::String("anchor_program_data".to_string()), + ); + object.insert("protocolName".to_string(), serde_json::Value::String("pump_swap".to_string())); + object.insert( + "programId".to_string(), + serde_json::Value::String(crate::PUMP_SWAP_PROGRAM_ID.to_string()), + ); + add_anchor_event_aliases(anchor_event.event_name, &mut object); + if !is_materializable_pump_swap_anchor_event(anchor_event.event_name) { + object.insert("anchorEventAuditOnly".to_string(), serde_json::Value::Bool(true)); + object.insert( + "skipCatalogReason".to_string(), + serde_json::Value::String("pump_swap_anchor_event_audit_only".to_string()), + ); + if anchor_event.event_name == "buy_event" || anchor_event.event_name == "sell_event" { + object.insert( + "skipTradeReason".to_string(), + serde_json::Value::String("pump_swap_anchor_event_audit_only".to_string()), + ); + object.insert( + "skipCandleReason".to_string(), + serde_json::Value::String("pump_swap_anchor_event_audit_only".to_string()), + ); + } + } else { + object.insert("anchorEventAuditOnly".to_string(), serde_json::Value::Bool(false)); + } + return crate::enrich_dex_decoded_payload( + "pump_swap", + anchor_event.event_kind, + serde_json::Value::Object(object), + ); +} + +fn is_materializable_pump_swap_anchor_event(event_name: &str) -> bool { + if event_name == "claim_token_incentives_event" { + return true; + } + return false; +} + +fn add_anchor_event_aliases( + event_name: &str, + object: &mut serde_json::Map, +) { + clone_string_value(object, "pool", "poolAccount"); + clone_string_value(object, "base_mint", "baseMint"); + clone_string_value(object, "base_mint", "tokenAMint"); + clone_string_value(object, "quote_mint", "quoteMint"); + clone_string_value(object, "quote_mint", "tokenBMint"); + clone_string_value(object, "lp_mint", "lpMint"); + clone_string_value(object, "user", "actorWallet"); + clone_string_value(object, "admin", "actorWallet"); + clone_string_value(object, "payer", "actorWallet"); + clone_string_value(object, "creator", "actorWallet"); + clone_string_value(object, "coin_creator", "actorWallet"); + clone_string_value(object, "mint", "tokenMint"); + clone_string_value(object, "amount", "amountRaw"); + if event_name == "claim_token_incentives_event" { + clone_string_value(object, "mint", "rewardTokenMint"); + clone_string_value(object, "amount", "rewardAmountRaw"); + object.insert( + "anchorEventMaterializationRole".to_string(), + serde_json::Value::String("reward".to_string()), + ); + } + if event_name == "claim_cashback_event" { + clone_string_value(object, "amount", "rewardAmountRaw"); + } + if event_name == "collect_coin_creator_fee_event" { + clone_string_value(object, "coin_creator_fee", "feeAmountRaw"); + clone_string_value(object, "coin_creator", "actorWallet"); + } + if event_name == "deposit_event" { + clone_string_value(object, "base_amount_in", "baseAmountRaw"); + clone_string_value(object, "quote_amount_in", "quoteAmountRaw"); + clone_string_value(object, "lp_token_amount_out", "lpAmountRaw"); + } + if event_name == "withdraw_event" { + clone_string_value(object, "base_amount_out", "baseAmountRaw"); + clone_string_value(object, "quote_amount_out", "quoteAmountRaw"); + clone_string_value(object, "lp_token_amount_in", "lpAmountRaw"); + } + if event_name == "buy_event" { + clone_string_value(object, "base_amount_out", "baseAmountRaw"); + clone_string_value(object, "baseAmountOutRaw", "baseAmountRaw"); + clone_string_value(object, "user_quote_amount_in", "quoteAmountRaw"); + clone_string_value(object, "userQuoteAmountInRaw", "quoteAmountRaw"); + } + if event_name == "sell_event" { + clone_string_value(object, "base_amount_in", "baseAmountRaw"); + clone_string_value(object, "user_quote_amount_out", "quoteAmountRaw"); + } +} + +fn clone_string_value( + object: &mut serde_json::Map, + source_key: &str, + target_key: &str, +) { + if object.contains_key(target_key) { + return; + } + let value = match object.get(source_key) { + Some(value) => value.clone(), + None => return, + }; + match value { + serde_json::Value::String(text) => { + if !text.trim().is_empty() { + object.insert(target_key.to_string(), serde_json::Value::String(text)); + } + }, + serde_json::Value::Number(number) => { + object.insert(target_key.to_string(), serde_json::Value::String(number.to_string())); + }, + _ => {}, + } +} + +fn payload_string_value( + value: &serde_json::Value, + key: &str, +) -> std::option::Option { + let object = match value.as_object() { + Some(object) => object, + None => return None, + }; + let candidate = match object.get(key) { + Some(candidate) => candidate, + None => return None, + }; + if let Some(text) = candidate.as_str() { + if !text.trim().is_empty() { + return Some(text.to_string()); + } + } + return None; +} + +fn decode_pump_swap_anchor_event_from_base64( + encoded: &str, +) -> std::option::Option { + let decoded = match decode_base64_standard(encoded) { + Some(decoded) => decoded, + None => return None, + }; + let first_discriminator = read_8_byte_array(decoded.as_slice(), 0); + if decoded.len() >= 16 + && first_discriminator == Some(PUMP_SWAP_ANCHOR_SELF_CPI_LOG_DISCRIMINATOR) + { + return decode_pump_swap_anchor_event_data(&decoded[8..]); + } + return decode_pump_swap_anchor_event_data(decoded.as_slice()); +} + +fn decode_pump_swap_anchor_event_data( + data: &[u8], +) -> std::option::Option { + let discriminator = match read_8_byte_array(data, 0) { + Some(discriminator) => discriminator, + None => return None, + }; + if discriminator == PUMP_SWAP_BUY_EVENT_DISCRIMINATOR { + let buy_event = match decode_pump_swap_anchor_buy_event_data(data) { + Some(buy_event) => buy_event, + None => return None, + }; + let mut payload = anchor_buy_event_to_json(&buy_event); + payload = snake_alias_anchor_buy_event_payload(payload); + return Some(PumpSwapAnchorEventDecoded { + event_name: "buy_event", + event_kind: "pump_swap.buy_event", + discriminator_hex: bytes_to_lower_hex(&PUMP_SWAP_BUY_EVENT_DISCRIMINATOR), + payload_size: buy_event.payload_size, + payload_json: payload, + pool_account: Some(buy_event.pool), + token_a_mint: None, + token_b_mint: None, + lp_mint: None, + }); + } + let descriptor = match pump_swap_anchor_event_descriptor(discriminator) { + Some(descriptor) => descriptor, + None => return None, + }; + let payload = match decode_pump_swap_anchor_event_fields(data, &descriptor) { + Some(payload) => payload, + None => return None, + }; + let pool_account = payload_string_value(&payload, "pool"); + let token_a_mint = payload_string_value(&payload, "base_mint"); + let token_b_mint = payload_string_value(&payload, "quote_mint"); + let lp_mint = payload_string_value(&payload, "lp_mint"); + return Some(PumpSwapAnchorEventDecoded { + event_name: descriptor.event_name, + event_kind: descriptor.event_kind, + discriminator_hex: bytes_to_lower_hex(&descriptor.discriminator), + payload_size: data.len().saturating_sub(8), + payload_json: payload, + pool_account, + token_a_mint, + token_b_mint, + lp_mint, + }); +} + +fn snake_alias_anchor_buy_event_payload(payload: serde_json::Value) -> serde_json::Value { + let mut object = match payload { + serde_json::Value::Object(object) => object, + other => { + let mut object = serde_json::Map::new(); + object.insert("rawAnchorEventPayload".to_string(), other); + object + }, + }; + clone_string_value(&mut object, "ixName", "ix_name"); + return serde_json::Value::Object(object); +} + +fn pump_swap_anchor_event_descriptor( + discriminator: [u8; 8], +) -> std::option::Option { + let descriptors: &[PumpSwapAnchorEventDescriptor] = &[ + PumpSwapAnchorEventDescriptor { + event_name: "admin_set_coin_creator_event", + event_kind: "pump_swap.admin_set_coin_creator_event", + discriminator: PUMP_SWAP_ADMIN_SET_COIN_CREATOR_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_ADMIN_SET_COIN_CREATOR_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "admin_update_token_incentives_event", + event_kind: "pump_swap.admin_update_token_incentives_event", + discriminator: PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "claim_cashback_event", + event_kind: "pump_swap.claim_cashback_event", + discriminator: PUMP_SWAP_CLAIM_CASHBACK_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_CLAIM_CASHBACK_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "claim_token_incentives_event", + event_kind: "pump_swap.claim_token_incentives_event", + discriminator: PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "close_user_volume_accumulator_event", + event_kind: "pump_swap.close_user_volume_accumulator_event", + discriminator: PUMP_SWAP_CLOSE_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_CLOSE_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "collect_coin_creator_fee_event", + event_kind: "pump_swap.collect_coin_creator_fee_event", + discriminator: PUMP_SWAP_COLLECT_COIN_CREATOR_FEE_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_COLLECT_COIN_CREATOR_FEE_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "create_config_event", + event_kind: "pump_swap.create_config_event", + discriminator: PUMP_SWAP_CREATE_CONFIG_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_CREATE_CONFIG_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "create_pool_event", + event_kind: "pump_swap.create_pool_event", + discriminator: PUMP_SWAP_CREATE_POOL_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_CREATE_POOL_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "deposit_event", + event_kind: "pump_swap.deposit_event", + discriminator: PUMP_SWAP_DEPOSIT_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_DEPOSIT_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "disable_event", + event_kind: "pump_swap.disable_event", + discriminator: PUMP_SWAP_DISABLE_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_DISABLE_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "extend_account_event", + event_kind: "pump_swap.extend_account_event", + discriminator: PUMP_SWAP_EXTEND_ACCOUNT_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_EXTEND_ACCOUNT_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "init_user_volume_accumulator_event", + event_kind: "pump_swap.init_user_volume_accumulator_event", + discriminator: PUMP_SWAP_INIT_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_INIT_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "migrate_pool_coin_creator_event", + event_kind: "pump_swap.migrate_pool_coin_creator_event", + discriminator: PUMP_SWAP_MIGRATE_POOL_COIN_CREATOR_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_MIGRATE_POOL_COIN_CREATOR_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "reserved_fee_recipients_event", + event_kind: "pump_swap.reserved_fee_recipients_event", + discriminator: PUMP_SWAP_RESERVED_FEE_RECIPIENTS_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_RESERVED_FEE_RECIPIENTS_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "sell_event", + event_kind: "pump_swap.sell_event", + discriminator: PUMP_SWAP_SELL_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_SELL_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "set_bonding_curve_coin_creator_event", + event_kind: "pump_swap.set_bonding_curve_coin_creator_event", + discriminator: PUMP_SWAP_SET_BONDING_CURVE_COIN_CREATOR_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_SET_BONDING_CURVE_COIN_CREATOR_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "set_metaplex_coin_creator_event", + event_kind: "pump_swap.set_metaplex_coin_creator_event", + discriminator: PUMP_SWAP_SET_METAPLEX_COIN_CREATOR_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_SET_METAPLEX_COIN_CREATOR_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "sync_user_volume_accumulator_event", + event_kind: "pump_swap.sync_user_volume_accumulator_event", + discriminator: PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "update_admin_event", + event_kind: "pump_swap.update_admin_event", + discriminator: PUMP_SWAP_UPDATE_ADMIN_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_UPDATE_ADMIN_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "update_fee_config_event", + event_kind: "pump_swap.update_fee_config_event", + discriminator: PUMP_SWAP_UPDATE_FEE_CONFIG_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_UPDATE_FEE_CONFIG_EVENT_FIELDS, + }, + PumpSwapAnchorEventDescriptor { + event_name: "withdraw_event", + event_kind: "pump_swap.withdraw_event", + discriminator: PUMP_SWAP_WITHDRAW_EVENT_DISCRIMINATOR, + fields: PUMP_SWAP_WITHDRAW_EVENT_FIELDS, + }, + ]; + for descriptor in descriptors { + if descriptor.discriminator == discriminator { + return Some(*descriptor); + } + } + return None; +} + +fn decode_pump_swap_anchor_event_fields( + data: &[u8], + descriptor: &PumpSwapAnchorEventDescriptor, +) -> std::option::Option { + let mut offset = 8usize; + let mut object = serde_json::Map::new(); + for field in descriptor.fields { + let decoded = match decode_anchor_field(data, offset, field.kind) { + Some(decoded) => decoded, + None => return None, + }; + offset = decoded.1; + object.insert(field.name.to_string(), decoded.0); + } + return Some(serde_json::Value::Object(object)); +} + +fn decode_anchor_field( + data: &[u8], + offset: usize, + kind: PumpSwapAnchorFieldKind, +) -> std::option::Option<(serde_json::Value, usize)> { + match kind { + PumpSwapAnchorFieldKind::U8 => { + if data.len() < offset + 1 { + return None; + } + return Some((serde_json::json!(data[offset]), offset + 1)); + }, + PumpSwapAnchorFieldKind::U16 => { + if data.len() < offset + 2 { + return None; + } + let value = u16::from_le_bytes([data[offset], data[offset + 1]]); + return Some((serde_json::json!(value), offset + 2)); + }, + PumpSwapAnchorFieldKind::U64 => { + let value = match decode_u64_le_as_string(data, offset) { + Some(value) => value, + None => return None, + }; + return Some((serde_json::Value::String(value), offset + 8)); + }, + PumpSwapAnchorFieldKind::I64 => { + let value = match decode_i64_le_as_string(data, offset) { + Some(value) => value, + None => return None, + }; + return Some((serde_json::Value::String(value), offset + 8)); + }, + PumpSwapAnchorFieldKind::Bool => { + let value = match read_bool(data, offset) { + Some(value) => value, + None => return None, + }; + return Some((serde_json::Value::Bool(value), offset + 1)); + }, + PumpSwapAnchorFieldKind::Pubkey => { + let value = match decode_pubkey32_as_string(data, offset) { + Some(value) => value, + None => return None, + }; + return Some((serde_json::Value::String(value), offset + 32)); + }, + PumpSwapAnchorFieldKind::PubkeyArray(count) => { + let mut values = std::vec::Vec::new(); + let mut current_offset = offset; + for _ in 0..count { + let value = match decode_pubkey32_as_string(data, current_offset) { + Some(value) => value, + None => return None, + }; + values.push(serde_json::Value::String(value)); + current_offset = current_offset.saturating_add(32); + } + return Some((serde_json::Value::Array(values), current_offset)); + }, + } +} + +fn find_pump_swap_anchor_buy_event_for_instruction( + log_messages: &[std::string::String], + pool_account: std::option::Option<&str>, + ix_name: &str, +) -> std::option::Option { + for message in log_messages { + let data_text = extract_program_data_base64(message.as_str()); + let data_text = match data_text { + Some(data_text) => data_text, + None => continue, + }; + let anchor_event = decode_pump_swap_anchor_buy_event_from_base64(data_text); + let anchor_event = match anchor_event { + Some(anchor_event) => anchor_event, + None => continue, + }; + if anchor_event.ix_name != ix_name { + continue; + } + if let Some(pool_account) = pool_account { + if anchor_event.pool != pool_account { + continue; + } + } + return Some(anchor_event); + } + return None; +} + +fn extract_program_data_base64(message: &str) -> std::option::Option<&str> { + let trimmed = message.trim(); + if let Some(rest) = trimmed.strip_prefix("Program data: ") { + return Some(rest.trim()); + } + return None; +} + +fn decode_pump_swap_anchor_buy_event_from_base64( + encoded: &str, +) -> std::option::Option { + let decoded = decode_base64_standard(encoded); + let decoded = match decoded { + Some(decoded) => decoded, + None => return None, + }; + let first_discriminator = read_8_byte_array(decoded.as_slice(), 0); + if decoded.len() >= 16 + && first_discriminator == Some(PUMP_SWAP_ANCHOR_SELF_CPI_LOG_DISCRIMINATOR) + { + return decode_pump_swap_anchor_buy_event_data(&decoded[8..]); + } + return decode_pump_swap_anchor_buy_event_data(decoded.as_slice()); +} + +fn decode_pump_swap_anchor_buy_event_data( + data: &[u8], +) -> std::option::Option { + if data.len() < 405 { + return None; + } + let discriminator = match read_8_byte_array(data, 0) { + Some(discriminator) => discriminator, + None => return None, + }; + if discriminator != PUMP_SWAP_BUY_EVENT_DISCRIMINATOR { + return None; + } + let string_result = match read_borsh_string(data, 401) { + Some(string_result) => string_result, + None => return None, + }; + let ix_name = string_result.0; + let trailing_offset = string_result.1; + let timestamp_raw = match decode_i64_le_as_string(data, 8) { + Some(value) => value, + None => return None, + }; + let base_amount_out_raw = match decode_u64_le_as_string(data, 16) { + Some(value) => value, + None => return None, + }; + let max_quote_amount_in_raw = match decode_u64_le_as_string(data, 24) { + Some(value) => value, + None => return None, + }; + let user_base_token_reserves_raw = match decode_u64_le_as_string(data, 32) { + Some(value) => value, + None => return None, + }; + let user_quote_token_reserves_raw = match decode_u64_le_as_string(data, 40) { + Some(value) => value, + None => return None, + }; + let pool_base_token_reserves_raw = match decode_u64_le_as_string(data, 48) { + Some(value) => value, + None => return None, + }; + let pool_quote_token_reserves_raw = match decode_u64_le_as_string(data, 56) { + Some(value) => value, + None => return None, + }; + let quote_amount_in_raw = match decode_u64_le_as_string(data, 64) { + Some(value) => value, + None => return None, + }; + let lp_fee_basis_points_raw = match decode_u64_le_as_string(data, 72) { + Some(value) => value, + None => return None, + }; + let lp_fee_raw = match decode_u64_le_as_string(data, 80) { + Some(value) => value, + None => return None, + }; + let protocol_fee_basis_points_raw = match decode_u64_le_as_string(data, 88) { + Some(value) => value, + None => return None, + }; + let protocol_fee_raw = match decode_u64_le_as_string(data, 96) { + Some(value) => value, + None => return None, + }; + let quote_amount_in_with_lp_fee_raw = match decode_u64_le_as_string(data, 104) { + Some(value) => value, + None => return None, + }; + let user_quote_amount_in_raw = match decode_u64_le_as_string(data, 112) { + Some(value) => value, + None => return None, + }; + let pool = match decode_pubkey32_as_string(data, 120) { + Some(value) => value, + None => return None, + }; + let user = match decode_pubkey32_as_string(data, 152) { + Some(value) => value, + None => return None, + }; + let user_base_token_account = match decode_pubkey32_as_string(data, 184) { + Some(value) => value, + None => return None, + }; + let user_quote_token_account = match decode_pubkey32_as_string(data, 216) { + Some(value) => value, + None => return None, + }; + let protocol_fee_recipient = match decode_pubkey32_as_string(data, 248) { + Some(value) => value, + None => return None, + }; + let protocol_fee_recipient_token_account = match decode_pubkey32_as_string(data, 280) { + Some(value) => value, + None => return None, + }; + let coin_creator = match decode_pubkey32_as_string(data, 312) { + Some(value) => value, + None => return None, + }; + let coin_creator_fee_basis_points_raw = match decode_u64_le_as_string(data, 344) { + Some(value) => value, + None => return None, + }; + let coin_creator_fee_raw = match decode_u64_le_as_string(data, 352) { + Some(value) => value, + None => return None, + }; + let track_volume = match read_bool(data, 360) { + Some(value) => value, + None => return None, + }; + let total_unclaimed_tokens_raw = match decode_u64_le_as_string(data, 361) { + Some(value) => value, + None => return None, + }; + let total_claimed_tokens_raw = match decode_u64_le_as_string(data, 369) { + Some(value) => value, + None => return None, + }; + let current_sol_volume_raw = match decode_u64_le_as_string(data, 377) { + Some(value) => value, + None => return None, + }; + let last_update_timestamp_raw = match decode_i64_le_as_string(data, 385) { + Some(value) => value, + None => return None, + }; + let min_base_amount_out_raw = match decode_u64_le_as_string(data, 393) { + Some(value) => value, + None => return None, + }; + return Some(PumpSwapAnchorBuyEvent { + payload_size: data.len().saturating_sub(8), + timestamp_raw, + base_amount_out_raw, + max_quote_amount_in_raw, + user_base_token_reserves_raw, + user_quote_token_reserves_raw, + pool_base_token_reserves_raw, + pool_quote_token_reserves_raw, + quote_amount_in_raw, + lp_fee_basis_points_raw, + lp_fee_raw, + protocol_fee_basis_points_raw, + protocol_fee_raw, + quote_amount_in_with_lp_fee_raw, + user_quote_amount_in_raw, + pool, + user, + user_base_token_account, + user_quote_token_account, + protocol_fee_recipient, + protocol_fee_recipient_token_account, + coin_creator, + coin_creator_fee_basis_points_raw, + coin_creator_fee_raw, + track_volume, + total_unclaimed_tokens_raw, + total_claimed_tokens_raw, + current_sol_volume_raw, + last_update_timestamp_raw, + min_base_amount_out_raw, + ix_name, + cashback_fee_basis_points_raw: decode_u64_le_as_string(data, trailing_offset), + cashback_raw: decode_u64_le_as_string(data, trailing_offset.saturating_add(8)), + buyback_fee_basis_points_raw: decode_u64_le_as_string( + data, + trailing_offset.saturating_add(16), + ), + buyback_fee_raw: decode_u64_le_as_string(data, trailing_offset.saturating_add(24)), + }); +} + +fn read_8_byte_array(data: &[u8], offset: usize) -> std::option::Option<[u8; 8]> { + if data.len() < offset + 8 { + return None; + } + return Some([ + data[offset], + data[offset + 1], + data[offset + 2], + data[offset + 3], + data[offset + 4], + data[offset + 5], + data[offset + 6], + data[offset + 7], + ]); +} + +fn read_bool(data: &[u8], offset: usize) -> std::option::Option { + if data.len() <= offset { + return None; + } + return Some(data[offset] != 0); +} + +fn read_borsh_string( + data: &[u8], + offset: usize, +) -> std::option::Option<(std::string::String, usize)> { + if data.len() < offset + 4 { + return None; + } + let len = + u32::from_le_bytes([data[offset], data[offset + 1], data[offset + 2], data[offset + 3]]); + let len_usize = len as usize; + let start = offset + 4; + let end = start.saturating_add(len_usize); + if data.len() < end { + return None; + } + let text_result = std::str::from_utf8(&data[start..end]); + let text = match text_result { + Ok(text) => text, + Err(_) => return None, + }; + return Some((text.to_string(), end)); +} + +fn decode_base64_standard(encoded: &str) -> std::option::Option> { + use base64::Engine as _; + let decoded = base64::engine::general_purpose::STANDARD.decode(encoded.as_bytes()); + match decoded { + Ok(decoded) => return Some(decoded), + Err(_) => return None, + } +} + +fn insert_optional_string( + object: &mut serde_json::Map, + key: &str, + value: std::option::Option, +) { + if let Some(value) = value { + object.insert(key.to_string(), serde_json::Value::String(value)); + } +} + +fn insert_optional_i64( + object: &mut serde_json::Map, + key: &str, + value: std::option::Option, +) { + if let Some(value) = value { + object.insert(key.to_string(), serde_json::Value::Number(serde_json::Number::from(value))); + } +} + +fn insert_optional_u32( + object: &mut serde_json::Map, + key: &str, + value: std::option::Option, +) { + if let Some(value) = value { + object.insert(key.to_string(), serde_json::Value::Number(serde_json::Number::from(value))); + } +} + +fn insert_optional_value( + object: &mut serde_json::Map, + key: &str, + value: std::option::Option, +) { + if let Some(value) = value { + object.insert(key.to_string(), value); + } +} + +fn resolve_pool_account( + parsed_json: std::option::Option<&serde_json::Value>, + accounts: &[std::string::String], + layout: PumpSwapAccountLayout, +) -> std::option::Option { + let parsed = extract_string_by_candidate_keys( + parsed_json, + &["pool", "poolAccount", "amm", "ammPool", "poolState"], + ); + if parsed.is_some() { + return parsed; + } + return account_at(accounts, layout.pool_index); +} + +fn resolve_token_a_mint( + parsed_json: std::option::Option<&serde_json::Value>, + accounts: &[std::string::String], + layout: PumpSwapAccountLayout, +) -> std::option::Option { + let parsed = extract_string_by_candidate_keys( + parsed_json, + &["tokenAMint", "baseMint", "mintA", "coinMint", "token0Mint", "mint0"], + ); + if parsed.is_some() { + return parsed; + } + return account_at(accounts, layout.token_a_mint_index); +} + +fn resolve_token_b_mint( + parsed_json: std::option::Option<&serde_json::Value>, + accounts: &[std::string::String], + layout: PumpSwapAccountLayout, +) -> std::option::Option { + let parsed = extract_string_by_candidate_keys( + parsed_json, + &["tokenBMint", "quoteMint", "mintB", "pcMint", "token1Mint", "mint1"], + ); + if parsed.is_some() { + return parsed; + } + return account_at(accounts, layout.token_b_mint_index); +} + +fn resolve_lp_mint( + parsed_json: std::option::Option<&serde_json::Value>, + accounts: &[std::string::String], + layout: PumpSwapAccountLayout, +) -> std::option::Option { + let parsed = extract_string_by_candidate_keys( + parsed_json, + &["poolV2", "pool_v2", "lpMint", "lp_mint", "poolTokenMint"], + ); + if parsed.is_some() { + return parsed; + } + return account_at(accounts, layout.lp_mint_index); +} + +fn account_at( + accounts: &[std::string::String], + index: std::option::Option, +) -> std::option::Option { + let index = match index { + Some(index) => index, + None => return None, + }; + if index >= accounts.len() { + return None; + } + return Some(accounts[index].clone()); +} + fn extract_log_messages( transaction_json: &serde_json::Value, ) -> std::vec::Vec { @@ -265,22 +2713,31 @@ fn parse_accounts_json( }; let mut accounts = std::vec::Vec::new(); for value in values { - let text_option = value.as_str(); + let text_option = extract_account_value_text(&value); if let Some(text) = text_option { - accounts.push(text.to_string()); + accounts.push(text); } } return Ok(accounts); } -fn extract_account( - extract_account: &[std::string::String], - index: usize, +fn extract_account_value_text( + value: &serde_json::Value, ) -> std::option::Option { - if index >= extract_account.len() { - return None; + if let Some(text) = value.as_str() { + return Some(text.to_string()); } - return Some(extract_account[index].clone()); + if let Some(object) = value.as_object() { + for key in ["pubkey", "account", "address", "mint"] { + let field = object.get(key); + if let Some(field) = field { + if let Some(text) = field.as_str() { + return Some(text.to_string()); + } + } + } + } + return None; } fn parse_optional_parsed_json( @@ -380,22 +2837,272 @@ fn parse_pump_swap_instruction_data( decoded[0], decoded[1], decoded[2], decoded[3], decoded[4], decoded[5], decoded[6], decoded[7], ]; - let instruction_kind = if discriminator == PUMP_SWAP_BUY_DISCRIMINATOR { - PumpSwapInstructionKind::Buy - } else if discriminator == PUMP_SWAP_SELL_DISCRIMINATOR { - PumpSwapInstructionKind::Sell - } else { - return Ok(None); + let instruction_kind_option = pump_swap_instruction_kind_from_discriminator(discriminator); + let instruction_kind = match instruction_kind_option { + Some(instruction_kind) => instruction_kind, + None => return Ok(None), }; - let base_amount_raw = decode_u64_le_as_string(&decoded, 8); - let quote_amount_bound_raw = decode_u64_le_as_string(&decoded, 16); + let discriminator_hex = bytes_to_lower_hex(&discriminator); + let args_json = decode_instruction_args(instruction_kind, decoded.as_slice()); return Ok(Some(PumpSwapInstructionData { instruction_kind, - base_amount_raw, - quote_amount_bound_raw, + discriminator_hex, + args_json, })); } +fn pump_swap_instruction_kind_from_discriminator( + discriminator: [u8; 8], +) -> std::option::Option { + if discriminator == PUMP_SWAP_BUY_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::Buy); + } + if discriminator == PUMP_SWAP_SELL_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::Sell); + } + if discriminator == PUMP_SWAP_BUY_EXACT_QUOTE_IN_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::BuyExactQuoteIn); + } + if discriminator == PUMP_SWAP_ADMIN_SET_COIN_CREATOR_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::AdminSetCoinCreator); + } + if discriminator == PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::AdminUpdateTokenIncentives); + } + if discriminator == PUMP_SWAP_CLAIM_CASHBACK_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::ClaimCashback); + } + if discriminator == PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::ClaimTokenIncentives); + } + if discriminator == PUMP_SWAP_CLOSE_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::CloseUserVolumeAccumulator); + } + if discriminator == PUMP_SWAP_COLLECT_COIN_CREATOR_FEE_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::CollectCoinCreatorFee); + } + if discriminator == PUMP_SWAP_CREATE_CONFIG_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::CreateConfig); + } + if discriminator == PUMP_SWAP_CREATE_POOL_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::CreatePool); + } + if discriminator == PUMP_SWAP_DEPOSIT_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::Deposit); + } + if discriminator == PUMP_SWAP_DISABLE_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::Disable); + } + if discriminator == PUMP_SWAP_EXTEND_ACCOUNT_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::ExtendAccount); + } + if discriminator == PUMP_SWAP_INIT_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::InitUserVolumeAccumulator); + } + if discriminator == PUMP_SWAP_MIGRATE_POOL_COIN_CREATOR_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::MigratePoolCoinCreator); + } + if discriminator == PUMP_SWAP_SET_COIN_CREATOR_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::SetCoinCreator); + } + if discriminator == PUMP_SWAP_SET_RESERVED_FEE_RECIPIENTS_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::SetReservedFeeRecipients); + } + if discriminator == PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::SyncUserVolumeAccumulator); + } + if discriminator == PUMP_SWAP_TOGGLE_CASHBACK_ENABLED_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::ToggleCashbackEnabled); + } + if discriminator == PUMP_SWAP_TOGGLE_MAYHEM_MODE_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::ToggleMayhemMode); + } + if discriminator == PUMP_SWAP_TRANSFER_CREATOR_FEES_TO_PUMP_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::TransferCreatorFeesToPump); + } + if discriminator == PUMP_SWAP_UPDATE_ADMIN_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::UpdateAdmin); + } + if discriminator == PUMP_SWAP_UPDATE_FEE_CONFIG_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::UpdateFeeConfig); + } + if discriminator == PUMP_SWAP_WITHDRAW_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::Withdraw); + } + if discriminator == PUMP_SWAP_TRANSFER_CREATOR_FEES_TO_PUMP_V2_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::TransferCreatorFeesToPumpV2); + } + if discriminator == PUMP_SWAP_UPDATE_BUYBACK_CONFIG_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::UpdateBuybackConfig); + } + if discriminator == PUMP_SWAP_SET_RESERVED_FEE_RECIPIENT_DISCRIMINATOR { + return Some(PumpSwapInstructionKind::SetReservedFeeRecipient); + } + return None; +} + +fn decode_instruction_args(kind: PumpSwapInstructionKind, data: &[u8]) -> serde_json::Value { + let mut object = serde_json::Map::new(); + let raw_u64_args = decode_u64_arg_array(data); + object.insert("rawU64Args".to_string(), raw_u64_args); + match kind { + PumpSwapInstructionKind::Buy => { + insert_optional_string( + &mut object, + "baseAmountOutRaw", + decode_u64_le_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "maxQuoteAmountInRaw", + decode_u64_le_as_string(data, 16), + ); + insert_optional_bool(&mut object, "trackVolume", decode_anchor_option_bool(data, 24)); + }, + PumpSwapInstructionKind::Sell => { + insert_optional_string( + &mut object, + "baseAmountInRaw", + decode_u64_le_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "minQuoteAmountOutRaw", + decode_u64_le_as_string(data, 16), + ); + insert_optional_bool(&mut object, "trackVolume", decode_anchor_option_bool(data, 24)); + }, + PumpSwapInstructionKind::BuyExactQuoteIn => { + insert_optional_string( + &mut object, + "spendableQuoteAmountInRaw", + decode_u64_le_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "minBaseAmountOutRaw", + decode_u64_le_as_string(data, 16), + ); + insert_optional_bool(&mut object, "trackVolume", decode_anchor_option_bool(data, 24)); + }, + PumpSwapInstructionKind::CreatePool => { + insert_optional_string(&mut object, "poolIndexRaw", decode_u16_le_as_string(data, 8)); + insert_optional_string( + &mut object, + "baseAmountInRaw", + decode_u64_le_as_string(data, 10), + ); + insert_optional_string( + &mut object, + "quoteAmountInRaw", + decode_u64_le_as_string(data, 18), + ); + }, + PumpSwapInstructionKind::Deposit => { + insert_optional_string( + &mut object, + "lpTokenAmountOutRaw", + decode_u64_le_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "maxBaseAmountInRaw", + decode_u64_le_as_string(data, 16), + ); + insert_optional_string( + &mut object, + "maxQuoteAmountInRaw", + decode_u64_le_as_string(data, 24), + ); + }, + PumpSwapInstructionKind::Withdraw => { + insert_optional_string( + &mut object, + "lpTokenAmountInRaw", + decode_u64_le_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "minBaseAmountOutRaw", + decode_u64_le_as_string(data, 16), + ); + insert_optional_string( + &mut object, + "minQuoteAmountOutRaw", + decode_u64_le_as_string(data, 24), + ); + }, + PumpSwapInstructionKind::CreateConfig => { + insert_optional_string( + &mut object, + "lpFeeBasisPointsRaw", + decode_u64_le_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "protocolFeeBasisPointsRaw", + decode_u64_le_as_string(data, 16), + ); + }, + PumpSwapInstructionKind::UpdateFeeConfig => { + insert_optional_string( + &mut object, + "lpFeeBasisPointsRaw", + decode_u64_le_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "protocolFeeBasisPointsRaw", + decode_u64_le_as_string(data, 16), + ); + }, + PumpSwapInstructionKind::UpdateBuybackConfig => { + insert_optional_string( + &mut object, + "buybackConfigRaw", + decode_u64_le_as_string(data, 8), + ); + }, + PumpSwapInstructionKind::SetReservedFeeRecipient => { + insert_optional_string( + &mut object, + "rawPubkeyArg0", + decode_pubkey32_as_string(data, 8), + ); + insert_optional_string( + &mut object, + "rawPubkeyArg1", + decode_pubkey32_as_string(data, 40), + ); + }, + _ => {}, + } + return serde_json::Value::Object(object); +} + +fn insert_optional_bool( + object: &mut serde_json::Map, + key: &str, + value: std::option::Option, +) { + if let Some(value) = value { + object.insert(key.to_string(), serde_json::Value::Bool(value)); + } +} + +fn decode_u64_arg_array(data: &[u8]) -> serde_json::Value { + let mut values = std::vec::Vec::new(); + let mut offset = 8_usize; + while offset + 8 <= data.len() { + let value = decode_u64_le_as_string(data, offset); + if let Some(value) = value { + values.push(serde_json::Value::String(value)); + } + offset += 8; + } + return serde_json::Value::Array(values); +} + fn parse_instruction_data_text(data_json: &str) -> Result { let trimmed = data_json.trim(); if trimmed.starts_with('"') { @@ -411,6 +3118,14 @@ fn parse_instruction_data_text(data_json: &str) -> Result std::option::Option { + if data.len() < offset + 2 { + return None; + } + let value = u16::from_le_bytes([data[offset], data[offset + 1]]); + return Some(value.to_string()); +} + fn decode_u64_le_as_string(data: &[u8], offset: usize) -> std::option::Option { if data.len() < offset + 8 { return None; @@ -428,12 +3143,80 @@ fn decode_u64_le_as_string(data: &[u8], offset: usize) -> std::option::Option std::option::Option { + if data.len() < offset + 8 { + return None; + } + let value = i64::from_le_bytes([ + data[offset], + data[offset + 1], + data[offset + 2], + data[offset + 3], + data[offset + 4], + data[offset + 5], + data[offset + 6], + data[offset + 7], + ]); + return Some(value.to_string()); +} + +fn decode_pubkey32_as_string( + data: &[u8], + offset: usize, +) -> std::option::Option { + if data.len() < offset + 32 { + return None; + } + return Some(bs58::encode(&data[offset..offset + 32]).into_string()); +} + +fn decode_anchor_option_bool(data: &[u8], offset: usize) -> std::option::Option { + if data.len() < offset + 2 { + return None; + } + if data[offset] == 0 { + return None; + } + return Some(data[offset + 1] != 0); +} + +fn bytes_to_lower_hex(bytes: &[u8]) -> std::string::String { + let mut text = std::string::String::new(); + for byte in bytes { + push_hex_nibble(&mut text, byte >> 4); + push_hex_nibble(&mut text, byte & 15); + } + return text; +} + +fn push_hex_nibble(text: &mut std::string::String, value: u8) { + let byte = if value < 10 { b'0' + value } else { b'a' + value - 10 }; + text.push(char::from(byte)); +} + #[cfg(test)] mod tests { fn make_pump_swap_buy_instruction_data_json() -> std::string::String { return serde_json::json!("AJTQ2h9DXrBfqJi53PDQG2Fvki5tkaTU3").to_string(); } + fn make_pump_swap_buy_exact_quote_in_instruction_data_json() -> std::string::String { + let mut data = std::vec::Vec::new(); + data.extend_from_slice(&[198, 46, 21, 82, 180, 217, 232, 112]); + data.extend_from_slice(&123_u64.to_le_bytes()); + data.extend_from_slice(&45_u64.to_le_bytes()); + return serde_json::json!(bs58::encode(data).into_string()).to_string(); + } + + fn make_pump_swap_deposit_instruction_data_json() -> std::string::String { + let mut data = std::vec::Vec::new(); + data.extend_from_slice(&[242, 35, 198, 137, 82, 225, 242, 182]); + data.extend_from_slice(&11_u64.to_le_bytes()); + data.extend_from_slice(&22_u64.to_le_bytes()); + data.extend_from_slice(&33_u64.to_le_bytes()); + return serde_json::json!(bs58::encode(data).into_string()).to_string(); + } + fn make_transaction_with_buy_log() -> crate::ChainTransactionDto { let mut dto = crate::ChainTransactionDto::new( "sig-pump-swap-test-1".to_string(), @@ -480,7 +3263,19 @@ mod tests { "UserBaseAta111", "UserQuoteAta111", "PoolBaseVault111", - "PoolQuoteVault111" + "PoolQuoteVault111", + "ProtocolFee111", + "ProtocolFeeAta111", + "BaseProgram111", + "QuoteProgram111", + "System111", + "Assoc111", + "EventAuth111", + crate::PUMP_SWAP_PROGRAM_ID, + "CoinCreatorVaultAta111", + "CoinCreatorVaultAuth111", + "GlobalVolumeAccumulator111", + "UserVolumeAccumulator111" ]) .to_string(), Some(make_pump_swap_buy_instruction_data_json()), @@ -528,23 +3323,168 @@ mod tests { event.payload_json.get("poolQuoteTokenAccount"), Some(&serde_json::Value::String("PoolQuoteVault111".to_string())) ); + assert_eq!( + event.payload_json.get("globalVolumeAccumulator"), + Some(&serde_json::Value::String("GlobalVolumeAccumulator111".to_string())) + ); assert_eq!(event.trade_side, crate::SwapTradeSide::BuyBase); }, - crate::PumpSwapDecodedEvent::SellTrade(_) => { - panic!("unexpected sell event") + _ => { + panic!("unexpected event") }, } } #[test] - fn pump_swap_returns_none_without_buy_or_sell_log() { + fn pump_swap_buy_exact_quote_in_is_decoded_only_until_exact_amounts_are_proven() { let decoder = crate::PumpSwapDecoder::new(); - let mut transaction = make_transaction_with_buy_log(); - transaction.transaction_json = serde_json::json!({ + let transaction = make_transaction_with_buy_log(); + let mut instruction = make_instruction(); + instruction.data_json = Some(make_pump_swap_buy_exact_quote_in_instruction_data_json()); + let instructions = vec![instruction]; + let decoded_result = decoder.decode_transaction(&transaction, &instructions); + let decoded = match decoded_result { + Ok(decoded) => decoded, + Err(error) => panic!("decode must succeed: {}", error), + }; + assert_eq!(decoded.len(), 1); + match &decoded[0] { + crate::PumpSwapDecodedEvent::Instruction(event) => { + assert_eq!(event.event_kind, "pump_swap.buy_exact_quote_in"); + assert_eq!( + event.payload_json.get("tradeCandidate"), + Some(&serde_json::Value::Bool(false)) + ); + assert_eq!( + event.payload_json.get("skipTradeReason"), + Some(&serde_json::Value::String( + "pump_swap_buy_exact_quote_in_exact_amounts_not_proven".to_string() + )) + ); + }, + _ => panic!("unexpected event"), + } + } + + fn make_pump_swap_anchor_buy_event_base64(ix_name: &str) -> std::string::String { + let mut data = std::vec::Vec::new(); + data.extend_from_slice(&super::PUMP_SWAP_BUY_EVENT_DISCRIMINATOR); + data.extend_from_slice(&1700000000_i64.to_le_bytes()); + data.extend_from_slice(&45_u64.to_le_bytes()); + data.extend_from_slice(&123_u64.to_le_bytes()); + data.extend_from_slice(&1000_u64.to_le_bytes()); + data.extend_from_slice(&2000_u64.to_le_bytes()); + data.extend_from_slice(&3000_u64.to_le_bytes()); + data.extend_from_slice(&4000_u64.to_le_bytes()); + data.extend_from_slice(&120_u64.to_le_bytes()); + data.extend_from_slice(&30_u64.to_le_bytes()); + data.extend_from_slice(&3_u64.to_le_bytes()); + data.extend_from_slice(&20_u64.to_le_bytes()); + data.extend_from_slice(&2_u64.to_le_bytes()); + data.extend_from_slice(&123_u64.to_le_bytes()); + data.extend_from_slice(&125_u64.to_le_bytes()); + append_pubkey_bytes(&mut data, 1); + append_pubkey_bytes(&mut data, 2); + append_pubkey_bytes(&mut data, 3); + append_pubkey_bytes(&mut data, 4); + append_pubkey_bytes(&mut data, 5); + append_pubkey_bytes(&mut data, 6); + append_pubkey_bytes(&mut data, 7); + data.extend_from_slice(&10_u64.to_le_bytes()); + data.extend_from_slice(&1_u64.to_le_bytes()); + data.push(1); + data.extend_from_slice(&8_u64.to_le_bytes()); + data.extend_from_slice(&9_u64.to_le_bytes()); + data.extend_from_slice(&10_u64.to_le_bytes()); + data.extend_from_slice(&1700000001_i64.to_le_bytes()); + data.extend_from_slice(&45_u64.to_le_bytes()); + let ix_name_bytes = ix_name.as_bytes(); + data.extend_from_slice(&(ix_name_bytes.len() as u32).to_le_bytes()); + data.extend_from_slice(ix_name_bytes); + data.extend_from_slice(&11_u64.to_le_bytes()); + data.extend_from_slice(&12_u64.to_le_bytes()); + data.extend_from_slice(&13_u64.to_le_bytes()); + data.extend_from_slice(&14_u64.to_le_bytes()); + use base64::Engine as _; + return base64::engine::general_purpose::STANDARD.encode(data); + } + + fn append_pubkey_bytes(data: &mut std::vec::Vec, seed: u8) { + for _ in 0..32 { + data.push(seed); + } + } + + fn make_pump_swap_instruction_data_json_for_discriminator( + discriminator: [u8; 8], + ) -> std::string::String { + let mut data = std::vec::Vec::new(); + data.extend_from_slice(&discriminator); + return serde_json::json!(bs58::encode(data).into_string()).to_string(); + } + + fn make_pump_swap_anchor_event_base64_from_fields( + discriminator: [u8; 8], + fields: &[super::PumpSwapAnchorFieldDescriptor], + ) -> std::string::String { + let mut data = std::vec::Vec::new(); + data.extend_from_slice(&discriminator); + let mut seed = 11_u8; + let mut scalar = 1000_u64; + for field in fields { + append_anchor_field_value(&mut data, field.kind, seed, scalar); + seed = seed.wrapping_add(1); + scalar = scalar.saturating_add(17); + } + use base64::Engine as _; + return base64::engine::general_purpose::STANDARD.encode(data); + } + + fn append_anchor_field_value( + data: &mut std::vec::Vec, + kind: super::PumpSwapAnchorFieldKind, + seed: u8, + scalar: u64, + ) { + match kind { + super::PumpSwapAnchorFieldKind::U8 => { + data.push(seed); + }, + super::PumpSwapAnchorFieldKind::U16 => { + data.extend_from_slice(&(u16::from(seed) + 257_u16).to_le_bytes()); + }, + super::PumpSwapAnchorFieldKind::U64 => { + data.extend_from_slice(&scalar.to_le_bytes()); + }, + super::PumpSwapAnchorFieldKind::I64 => { + let value = 1_700_000_000_i64 + i64::from(seed); + data.extend_from_slice(&value.to_le_bytes()); + }, + super::PumpSwapAnchorFieldKind::Bool => { + data.push(seed % 2); + }, + super::PumpSwapAnchorFieldKind::Pubkey => { + append_pubkey_bytes(data, seed); + }, + super::PumpSwapAnchorFieldKind::PubkeyArray(count) => { + let mut current_seed = seed; + for _ in 0..count { + append_pubkey_bytes(data, current_seed); + current_seed = current_seed.wrapping_add(1); + } + }, + } + } + + fn make_transaction_with_program_data_log( + encoded: std::string::String, + ) -> crate::ChainTransactionDto { + let mut dto = make_transaction_with_buy_log(); + dto.transaction_json = serde_json::json!({ "slot": 777002, "meta": { "logMessages": [ - "Program log: Instruction: Deposit" + format!("Program data: {}", encoded) ] }, "transaction": { @@ -554,6 +3494,331 @@ mod tests { } }) .to_string(); + return dto; + } + + fn decoded_instruction_event_kind( + decoder: &crate::PumpSwapDecoder, + discriminator: [u8; 8], + ) -> std::string::String { + let transaction = make_transaction_with_buy_log(); + let mut instruction = make_instruction(); + instruction.data_json = + Some(make_pump_swap_instruction_data_json_for_discriminator(discriminator)); + let instructions = vec![instruction]; + let decoded_result = decoder.decode_transaction(&transaction, &instructions); + let decoded = match decoded_result { + Ok(decoded) => decoded, + Err(error) => panic!("decode must succeed: {}", error), + }; + assert_eq!(decoded.len(), 1); + match &decoded[0] { + crate::PumpSwapDecodedEvent::Instruction(event) => return event.event_kind.clone(), + _ => panic!("expected decoded PumpSwap instruction"), + } + } + + #[test] + fn pump_swap_synthetic_unobserved_instruction_discriminators_decode_by_idl() { + let decoder = crate::PumpSwapDecoder::new(); + let cases = [ + ( + super::PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_DISCRIMINATOR, + "pump_swap.admin_update_token_incentives", + ), + (super::PUMP_SWAP_DISABLE_DISCRIMINATOR, "pump_swap.disable"), + ]; + for case in cases { + let event_kind = decoded_instruction_event_kind(&decoder, case.0); + assert_eq!(event_kind, case.1); + } + } + + #[test] + fn pump_swap_synthetic_unobserved_anchor_events_decode_by_idl_layout() { + let cases = [ + ( + super::PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_EVENT_DISCRIMINATOR, + super::PUMP_SWAP_ADMIN_UPDATE_TOKEN_INCENTIVES_EVENT_FIELDS, + "admin_update_token_incentives_event", + "pump_swap.admin_update_token_incentives_event", + "token_supply_per_day", + ), + ( + super::PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_DISCRIMINATOR, + super::PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_FIELDS, + "claim_token_incentives_event", + "pump_swap.claim_token_incentives_event", + "amount", + ), + ( + super::PUMP_SWAP_CREATE_CONFIG_EVENT_DISCRIMINATOR, + super::PUMP_SWAP_CREATE_CONFIG_EVENT_FIELDS, + "create_config_event", + "pump_swap.create_config_event", + "protocol_fee_recipients", + ), + ( + super::PUMP_SWAP_DISABLE_EVENT_DISCRIMINATOR, + super::PUMP_SWAP_DISABLE_EVENT_FIELDS, + "disable_event", + "pump_swap.disable_event", + "disable_buy", + ), + ( + super::PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR, + super::PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS, + "sync_user_volume_accumulator_event", + "pump_swap.sync_user_volume_accumulator_event", + "total_claimed_tokens_before", + ), + ]; + for case in cases { + let encoded = make_pump_swap_anchor_event_base64_from_fields(case.0, case.1); + let decoded_option = super::decode_pump_swap_anchor_event_from_base64(encoded.as_str()); + let decoded = match decoded_option { + Some(decoded) => decoded, + None => panic!("synthetic anchor event must decode: {}", case.2), + }; + assert_eq!(decoded.event_name, case.2); + assert_eq!(decoded.event_kind, case.3); + assert!(decoded.payload_json.get(case.4).is_some()); + } + } + + #[test] + fn pump_swap_claim_token_incentives_anchor_event_is_materializable_reward() { + let decoder = crate::PumpSwapDecoder::new(); + let encoded = make_pump_swap_anchor_event_base64_from_fields( + super::PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_DISCRIMINATOR, + super::PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_EVENT_FIELDS, + ); + let transaction = make_transaction_with_program_data_log(encoded); + let mut instruction = make_instruction(); + instruction.data_json = Some(make_pump_swap_instruction_data_json_for_discriminator( + super::PUMP_SWAP_CLAIM_TOKEN_INCENTIVES_DISCRIMINATOR, + )); + let instructions = vec![instruction]; + let decoded_result = decoder.decode_transaction(&transaction, &instructions); + let decoded = match decoded_result { + Ok(decoded) => decoded, + Err(error) => panic!("decode must succeed: {}", error), + }; + let mut found_anchor_event = false; + for event in decoded { + if let crate::PumpSwapDecodedEvent::Instruction(event) = event { + if event.event_kind == "pump_swap.claim_token_incentives_event" { + found_anchor_event = true; + assert_eq!( + event.payload_json.get("anchorEventAuditOnly"), + Some(&serde_json::Value::Bool(false)) + ); + assert!(event.payload_json.get("rewardTokenMint").is_some()); + assert!(event.payload_json.get("rewardAmountRaw").is_some()); + } + } + } + assert!(found_anchor_event); + } + + #[test] + fn pump_swap_sync_user_volume_accumulator_anchor_event_is_decoded_audit_only_when_present() { + let decoder = crate::PumpSwapDecoder::new(); + let encoded = make_pump_swap_anchor_event_base64_from_fields( + super::PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_DISCRIMINATOR, + super::PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_EVENT_FIELDS, + ); + let transaction = make_transaction_with_program_data_log(encoded); + let mut instruction = make_instruction(); + instruction.data_json = Some(make_pump_swap_instruction_data_json_for_discriminator( + super::PUMP_SWAP_SYNC_USER_VOLUME_ACCUMULATOR_DISCRIMINATOR, + )); + let instructions = vec![instruction]; + let decoded_result = decoder.decode_transaction(&transaction, &instructions); + let decoded = match decoded_result { + Ok(decoded) => decoded, + Err(error) => panic!("decode must succeed: {}", error), + }; + let mut found_anchor_event = false; + for event in decoded { + if let crate::PumpSwapDecodedEvent::Instruction(event) = event { + if event.event_kind == "pump_swap.sync_user_volume_accumulator_event" { + found_anchor_event = true; + assert_eq!( + event.payload_json.get("anchorEventAuditOnly"), + Some(&serde_json::Value::Bool(true)) + ); + assert_eq!( + event.payload_json.get("skipCatalogReason"), + Some(&serde_json::Value::String( + "pump_swap_anchor_event_audit_only".to_string() + )) + ); + } + } + } + assert!(found_anchor_event); + } + + fn make_transaction_with_anchor_buy_event_log() -> crate::ChainTransactionDto { + let mut dto = make_transaction_with_buy_log(); + let event_base64 = make_pump_swap_anchor_buy_event_base64("buy_exact_quote_in"); + dto.transaction_json = serde_json::json!({ + "slot": 777002, + "meta": { + "logMessages": [ + "Program log: Instruction: BuyExactQuoteIn", + format!("Program data: {}", event_base64) + ] + }, + "transaction": { + "message": { + "instructions": [] + } + } + }) + .to_string(); + return dto; + } + + #[test] + fn pump_swap_buy_exact_quote_in_uses_anchor_buy_event_when_available() { + let decoder = crate::PumpSwapDecoder::new(); + let transaction = make_transaction_with_anchor_buy_event_log(); + let mut instruction = make_instruction(); + instruction.data_json = Some(make_pump_swap_buy_exact_quote_in_instruction_data_json()); + let anchor_pool = bs58::encode([1_u8; 32]).into_string(); + instruction.accounts_json = serde_json::json!([ + anchor_pool, + "User111", + "GlobalConfig111", + "TokenA111", + "TokenB111", + "UserBaseAta111", + "UserQuoteAta111", + "PoolBaseVault111", + "PoolQuoteVault111", + "ProtocolFee111", + "ProtocolFeeAta111", + "BaseProgram111", + "QuoteProgram111", + "System111", + "Assoc111", + "EventAuth111", + crate::PUMP_SWAP_PROGRAM_ID, + "CoinCreatorVaultAta111", + "CoinCreatorVaultAuth111", + "GlobalVolumeAccumulator111", + "UserVolumeAccumulator111" + ]) + .to_string(); + instruction.parsed_json = None; + let instructions = vec![instruction]; + let decoded_result = decoder.decode_transaction(&transaction, &instructions); + let decoded = match decoded_result { + Ok(decoded) => decoded, + Err(error) => panic!("decode must succeed: {}", error), + }; + assert_eq!(decoded.len(), 2); + let mut found_buy_exact_trade = false; + let mut found_buy_anchor_event = false; + for decoded_event in &decoded { + match decoded_event { + crate::PumpSwapDecodedEvent::BuyExactQuoteInTrade(event) => { + found_buy_exact_trade = true; + assert_eq!(event.trade_side, crate::SwapTradeSide::BuyBase); + assert_eq!( + event.payload_json.get("amountSource"), + Some(&serde_json::Value::String("pump_swap_anchor_buy_event".to_string())) + ); + assert_eq!( + event.payload_json.get("baseAmountRaw"), + Some(&serde_json::Value::String("45".to_string())) + ); + assert_eq!( + event.payload_json.get("quoteAmountRaw"), + Some(&serde_json::Value::String("125".to_string())) + ); + assert_eq!(event.payload_json.get("skipTradeReason"), None); + }, + crate::PumpSwapDecodedEvent::Instruction(event) => { + if event.event_kind == "pump_swap.buy_event" { + found_buy_anchor_event = true; + assert_eq!( + event.payload_json.get("anchorEventAuditOnly"), + Some(&serde_json::Value::Bool(true)) + ); + } + }, + _ => {}, + } + } + assert!(found_buy_exact_trade); + assert!(found_buy_anchor_event); + } + + #[test] + fn pump_swap_deposit_is_specialized_non_trade() { + let decoder = crate::PumpSwapDecoder::new(); + let transaction = make_transaction_with_buy_log(); + let mut instruction = make_instruction(); + instruction.data_json = Some(make_pump_swap_deposit_instruction_data_json()); + let instructions = vec![instruction]; + let decoded_result = decoder.decode_transaction(&transaction, &instructions); + let decoded = match decoded_result { + Ok(decoded) => decoded, + Err(error) => panic!("decode must succeed: {}", error), + }; + assert_eq!(decoded.len(), 1); + match &decoded[0] { + crate::PumpSwapDecodedEvent::Instruction(event) => { + assert_eq!(event.event_kind, "pump_swap.deposit"); + assert_eq!( + event.payload_json.get("tradeCandidate"), + Some(&serde_json::Value::Bool(false)) + ); + }, + _ => panic!("unexpected event"), + } + } + + #[test] + fn pump_swap_transfer_creator_fees_to_pump_v2_discriminator_is_decoded_fee() { + let decoder = crate::PumpSwapDecoder::new(); + let transaction = make_transaction_with_buy_log(); + let mut instruction = make_instruction(); + instruction.data_json = Some( + serde_json::json!( + bs58::encode(super::PUMP_SWAP_TRANSFER_CREATOR_FEES_TO_PUMP_V2_DISCRIMINATOR) + .into_string() + ) + .to_string(), + ); + let instructions = vec![instruction]; + let decoded_result = decoder.decode_transaction(&transaction, &instructions); + let decoded = match decoded_result { + Ok(decoded) => decoded, + Err(error) => panic!("decode must succeed: {}", error), + }; + assert_eq!(decoded.len(), 1); + match &decoded[0] { + crate::PumpSwapDecodedEvent::Instruction(event) => { + assert_eq!(event.event_kind, "pump_swap.transfer_creator_fees_to_pump_v2"); + assert_eq!( + event.payload_json.get("skipTradeReason"), + Some(&serde_json::Value::String( + "pump_swap_non_trade_or_incomplete_trade_instruction".to_string() + )) + ); + }, + _ => panic!("expected decoded PumpSwap fee instruction"), + } + } + + #[test] + fn pump_swap_returns_none_without_known_discriminator() { + let decoder = crate::PumpSwapDecoder::new(); + let transaction = make_transaction_with_buy_log(); let mut instruction = make_instruction(); instruction.data_json = None; let instructions = vec![instruction]; @@ -595,8 +3860,8 @@ mod tests { Some(&serde_json::Value::Number(serde_json::Number::from(0))) ); }, - crate::PumpSwapDecodedEvent::SellTrade(_) => { - panic!("unexpected sell event") + _ => { + panic!("unexpected event") }, } } diff --git a/kb_lib/src/dex_decode.rs b/kb_lib/src/dex_decode.rs index 28f0588..ba5a1e3 100644 --- a/kb_lib/src/dex_decode.rs +++ b/kb_lib/src/dex_decode.rs @@ -82,7 +82,8 @@ impl DexDecodeService { } let append_result = append_persisted_events_result( &mut persisted, - self.decode_and_persist_raydium_stable_swap_events(&transaction, &instructions).await, + self.decode_and_persist_raydium_stable_swap_events(&transaction, &instructions) + .await, ); if let Err(error) = append_result { return Err(error); @@ -1679,6 +1680,17 @@ impl DexDecodeService { ) .await; }, + crate::PumpSwapDecodedEvent::BuyExactQuoteInTrade(event) => { + return self + .persist_pump_swap_trade_event( + transaction, + event, + "pump_swap.buy_exact_quote_in", + "signal.dex.pump_swap.buy_exact_quote_in", + "dex.pump_swap.buy_exact_quote_in", + ) + .await; + }, crate::PumpSwapDecodedEvent::SellTrade(event) => { return self .persist_pump_swap_trade_event( @@ -1690,9 +1702,35 @@ impl DexDecodeService { ) .await; }, + crate::PumpSwapDecodedEvent::Instruction(event) => { + return self.persist_pump_swap_instruction_event(transaction, event).await; + }, } } + async fn persist_pump_swap_instruction_event( + &self, + transaction: &crate::ChainTransactionDto, + event: &crate::PumpSwapInstructionDecoded, + ) -> Result { + return self + .materialize_named_dex_event( + transaction, + event.transaction_id, + event.instruction_id, + "pump_swap", + event.program_id.clone(), + event.event_kind.as_str(), + event.pool_account.clone(), + None, + event.token_a_mint.clone(), + event.token_b_mint.clone(), + event.lp_mint.clone(), + event.payload_json.clone(), + ) + .await; + } + async fn persist_pump_swap_trade_event( &self, transaction: &crate::ChainTransactionDto, @@ -1781,18 +1819,16 @@ impl DexDecodeService { transaction: &crate::ChainTransactionDto, instructions: &[crate::ChainInstructionDto], ) -> Result, crate::Error> { - let decoded_result = self - .raydium_stable_swap_decoder - .decode_transaction(transaction, instructions); + let decoded_result = + self.raydium_stable_swap_decoder.decode_transaction(transaction, instructions); let decoded_events = match decoded_result { Ok(decoded_events) => decoded_events, Err(error) => return Err(error), }; let mut persisted = std::vec::Vec::new(); for decoded_event in &decoded_events { - let persist_result = self - .persist_raydium_stable_swap_event(transaction, decoded_event) - .await; + let persist_result = + self.persist_raydium_stable_swap_event(transaction, decoded_event).await; let persisted_event = match persist_result { Ok(persisted_event) => persisted_event, Err(error) => return Err(error), @@ -3686,7 +3722,10 @@ fn insert_raydium_mapped_amounts( ); } if let Some(open_time) = read_u64_le_from_bytes(data, 2) { - object.insert("openTime".to_string(), serde_json::Value::String(open_time.to_string())); + object.insert( + "openTime".to_string(), + serde_json::Value::String(open_time.to_string()), + ); } }, RaydiumMappedNonTradeAmountLayout::AmmV4Initialize2 => { @@ -3697,7 +3736,10 @@ fn insert_raydium_mapped_amounts( ); } if let Some(open_time) = read_u64_le_from_bytes(data, 2) { - object.insert("openTime".to_string(), serde_json::Value::String(open_time.to_string())); + object.insert( + "openTime".to_string(), + serde_json::Value::String(open_time.to_string()), + ); } if let Some(init_pc_amount) = read_u64_le_from_bytes(data, 10) { object.insert( @@ -3762,7 +3804,10 @@ fn insert_raydium_mapped_amounts( ); } if let Some(base_side) = read_u64_le_from_bytes(data, 17) { - object.insert("baseSide".to_string(), serde_json::Value::String(base_side.to_string())); + object.insert( + "baseSide".to_string(), + serde_json::Value::String(base_side.to_string()), + ); } if let Some(other_amount_min) = read_u64_le_from_bytes(data, 25) { object.insert( @@ -3773,8 +3818,14 @@ fn insert_raydium_mapped_amounts( }, RaydiumMappedNonTradeAmountLayout::AmmV4Withdraw => { if let Some(lp_amount) = read_u64_le_from_bytes(data, 1) { - object.insert("lpAmountRaw".to_string(), serde_json::Value::String(lp_amount.to_string())); - object.insert("liquidity".to_string(), serde_json::Value::String(lp_amount.to_string())); + object.insert( + "lpAmountRaw".to_string(), + serde_json::Value::String(lp_amount.to_string()), + ); + object.insert( + "liquidity".to_string(), + serde_json::Value::String(lp_amount.to_string()), + ); } if let Some(min_coin_amount) = read_u64_le_from_bytes(data, 9) { object.insert( @@ -3797,7 +3848,10 @@ fn insert_raydium_mapped_amounts( ); } if let Some(value) = read_u64_le_from_bytes(data, 2) { - object.insert("configValue".to_string(), serde_json::Value::String(value.to_string())); + object.insert( + "configValue".to_string(), + serde_json::Value::String(value.to_string()), + ); } if let Some(last_order_denominator) = read_u64_le_from_bytes(data, 10) { object.insert( @@ -3808,7 +3862,8 @@ fn insert_raydium_mapped_amounts( }, RaydiumMappedNonTradeAmountLayout::AmmV4WithdrawSrm => { if let Some(amount) = read_u64_le_from_bytes(data, 1) { - object.insert("amountRaw".to_string(), serde_json::Value::String(amount.to_string())); + object + .insert("amountRaw".to_string(), serde_json::Value::String(amount.to_string())); } }, RaydiumMappedNonTradeAmountLayout::AmmV4PreInitialize => { @@ -3833,10 +3888,16 @@ fn insert_raydium_mapped_amounts( ); } if let Some(amount_in) = read_u64_le_from_bytes(data, 2) { - object.insert("amountIn".to_string(), serde_json::Value::String(amount_in.to_string())); + object.insert( + "amountIn".to_string(), + serde_json::Value::String(amount_in.to_string()), + ); } if let Some(amount_out) = read_u64_le_from_bytes(data, 10) { - object.insert("amountOutOrMinimumAmountOut".to_string(), serde_json::Value::String(amount_out.to_string())); + object.insert( + "amountOutOrMinimumAmountOut".to_string(), + serde_json::Value::String(amount_out.to_string()), + ); } }, RaydiumMappedNonTradeAmountLayout::AmmV4AdminCancelOrders => { @@ -4078,7 +4139,8 @@ fn build_meteora_instruction_audit_payload( }; let data_base58 = parse_instruction_data_base58(instruction.data_json.as_deref()); let data_bytes = instruction_data_bytes_from_base58(data_base58.as_deref()); - let discriminator_hex = raydium_instruction_discriminator_hex(protocol_name, data_bytes.as_deref(), 0); + let discriminator_hex = + raydium_instruction_discriminator_hex(protocol_name, data_bytes.as_deref(), 0); let anchor_self_cpi_log = discriminator_hex.as_deref() == Some(METEORA_ANCHOR_SELF_CPI_LOG_SELECTOR_HEX); let anchor_event_discriminator_hex = if anchor_self_cpi_log { @@ -4617,7 +4679,8 @@ fn build_raydium_instruction_audit_payload( }; let data_base58 = parse_instruction_data_base58(instruction.data_json.as_deref()); let data_bytes = instruction_data_bytes_from_base58(data_base58.as_deref()); - let discriminator_hex = raydium_instruction_discriminator_hex(protocol_name, data_bytes.as_deref(), 0); + let discriminator_hex = + raydium_instruction_discriminator_hex(protocol_name, data_bytes.as_deref(), 0); let anchor_self_cpi_log = discriminator_hex.as_deref() == Some(METEORA_ANCHOR_SELF_CPI_LOG_SELECTOR_HEX); let anchor_event_discriminator_hex = if anchor_self_cpi_log { @@ -5266,6 +5329,8 @@ fn prepare_pump_swap_trade_payload_for_classification( }; if event.pool_account.is_some() && event.token_a_mint.is_some() && event.token_b_mint.is_some() { + object.insert("tradeCandidate".to_string(), serde_json::Value::Bool(true)); + object.insert("candleCandidate".to_string(), serde_json::Value::Bool(true)); return serde_json::Value::Object(object); } object.insert("tradeCandidate".to_string(), serde_json::Value::Bool(false)); diff --git a/kb_lib/src/dex_detection_route.rs b/kb_lib/src/dex_detection_route.rs index 13a1c42..3d751d4 100644 --- a/kb_lib/src/dex_detection_route.rs +++ b/kb_lib/src/dex_detection_route.rs @@ -127,6 +127,14 @@ pub(crate) fn dex_detection_route( } return Some(crate::dex_detection_route::DexDetectionRoute::PumpSwapTrade); }, + ("pump_swap", "pump_swap.buy_exact_quote_in") => { + if crate::dex_detection_route::is_incomplete_pump_swap_decoded_event(decoded_event) { + return Some( + crate::dex_detection_route::DexDetectionRoute::SkipIncompletePumpSwapTrade, + ); + } + return Some(crate::dex_detection_route::DexDetectionRoute::PumpSwapTrade); + }, ("pump_swap", "pump_swap.sell") => { if crate::dex_detection_route::is_incomplete_pump_swap_decoded_event(decoded_event) { return Some( @@ -301,6 +309,47 @@ mod tests { )); } + + #[test] + fn pump_swap_buy_exact_quote_in_routes_to_pool_detection_when_complete() { + let event = make_decoded_event( + "pump_swap", + "pump_swap.buy_exact_quote_in", + Some("PumpSwapPool111"), + Some("TokenA111"), + Some("TokenB111"), + ); + let route_option = crate::dex_detection_route::dex_detection_route(&event); + let route = match route_option { + Some(route) => route, + None => panic!("route must be selected"), + }; + assert_eq!(route, crate::dex_detection_route::DexDetectionRoute::PumpSwapTrade); + assert!(crate::dex_detection_route::dex_detection_route_requires_full_pool_context( + route + )); + } + + #[test] + fn pump_swap_buy_exact_quote_in_incomplete_route_is_skipped() { + let event = make_decoded_event( + "pump_swap", + "pump_swap.buy_exact_quote_in", + Some("PumpSwapPool111"), + Some("TokenA111"), + None, + ); + let route_option = crate::dex_detection_route::dex_detection_route(&event); + let route = match route_option { + Some(route) => route, + None => panic!("route must be selected"), + }; + assert_eq!( + route, + crate::dex_detection_route::DexDetectionRoute::SkipIncompletePumpSwapTrade + ); + } + #[test] fn pump_fun_create_token_route_does_not_require_full_pool_context() { let event = make_decoded_event( diff --git a/kb_lib/src/dex_event_classification.rs b/kb_lib/src/dex_event_classification.rs index bbfd837..a3d9887 100644 --- a/kb_lib/src/dex_event_classification.rs +++ b/kb_lib/src/dex_event_classification.rs @@ -329,6 +329,12 @@ pub fn is_dex_trade_event_kind(event_kind: &str) -> bool { if event_kind.ends_with(".sell") { return true; } + if event_kind.contains(".buy_exact") { + return true; + } + if event_kind.contains(".sell_exact") { + return true; + } if event_kind.ends_with(".swap") { return true; } @@ -484,6 +490,12 @@ pub fn is_dex_fee_event_kind(event_kind: &str) -> bool { if event_kind.contains("collect_creator_fee") { return true; } + if event_kind.contains("collect_coin_creator_fee") { + return true; + } + if event_kind.contains("transfer_creator_fees") { + return true; + } if event_kind.contains("collect_protocol_fee") { return true; } @@ -519,6 +531,18 @@ pub fn is_dex_reward_event_kind(event_kind: &str) -> bool { if event_kind.contains("emission") { return true; } + if event_kind.contains("incentive") { + return true; + } + if event_kind.contains("toggle_cashback_enabled") { + return false; + } + if event_kind.contains("cashback") { + return true; + } + if event_kind.contains("volume_accumulator") { + return true; + } return false; } @@ -657,6 +681,9 @@ pub fn is_dex_migration_event_kind(event_kind: &str) -> bool { if event_kind.contains(".migrate_to_open_book") { return false; } + if event_kind.contains(".migrate_pool_coin_creator") { + return false; + } if event_kind.contains(".migrate") { return true; } @@ -759,6 +786,9 @@ pub fn is_dex_admin_event_kind(event_kind: &str) -> bool { if event_kind.contains(".migrate_to_open_book") { return false; } + if event_kind.contains(".migrate_pool_coin_creator") { + return true; + } if event_kind.contains(".close_platform_global_access") { return true; } @@ -789,6 +819,15 @@ pub fn is_dex_admin_event_kind(event_kind: &str) -> bool { if event_kind.contains("set_") { return true; } + if event_kind.contains("toggle_") { + return true; + } + if event_kind.contains(".disable") { + return true; + } + if event_kind.contains(".extend_account") { + return true; + } if event_kind.contains("update_") { return true; } @@ -1154,6 +1193,19 @@ mod tests { super::classify_dex_event_category_code("raydium_clmm.set_reward_params"), "reward" ); + assert_eq!( + super::classify_dex_event_category_code("pump_swap.toggle_cashback_enabled"), + "admin" + ); + assert!(!super::is_dex_reward_event_kind("pump_swap.toggle_cashback_enabled")); + assert!(super::is_dex_admin_event_kind("pump_swap.toggle_cashback_enabled")); + assert_eq!( + super::classify_dex_event_category_code("pump_swap.migrate_pool_coin_creator"), + "admin" + ); + assert!(!super::is_dex_pool_lifecycle_event_kind( + "pump_swap.migrate_pool_coin_creator" + )); assert_eq!( super::classify_dex_event_category_code("raydium_clmm.increase_liquidity_v2"), "liquidity" diff --git a/kb_lib/src/dex_event_coverage.rs b/kb_lib/src/dex_event_coverage.rs index f4f82ca..acf6533 100644 --- a/kb_lib/src/dex_event_coverage.rs +++ b/kb_lib/src/dex_event_coverage.rs @@ -89,6 +89,16 @@ impl DexEventCoverageService { Ok(sync_counts) => sync_counts, Err(error) => return Err(error), }; + let cleanup_result = + self.cleanup_deprecated_pump_swap_observed_unknown_rows(&decoder_code).await; + if let Err(error) = cleanup_result { + return Err(error); + } + let duplicate_cleanup_result = + self.cleanup_duplicate_pump_swap_logical_coverage_rows(&decoder_code).await; + if let Err(error) = duplicate_cleanup_result { + return Err(error); + } let refreshed_entry_count = match &decoder_code { Some(decoder_code) => { let refresh_result = @@ -139,6 +149,16 @@ impl DexEventCoverageService { Ok(sync_counts) => sync_counts, Err(error) => return Err(error), }; + let cleanup_result = + self.cleanup_deprecated_pump_swap_observed_unknown_rows(&decoder_code).await; + if let Err(error) = cleanup_result { + return Err(error); + } + let duplicate_cleanup_result = + self.cleanup_duplicate_pump_swap_logical_coverage_rows(&decoder_code).await; + if let Err(error) = duplicate_cleanup_result { + return Err(error); + } let refreshed_entry_count = match &decoder_code { Some(decoder_code) => { let refresh_result = @@ -178,6 +198,86 @@ impl DexEventCoverageService { summaries, }); } + + async fn cleanup_deprecated_pump_swap_observed_unknown_rows( + &self, + decoder_code: &std::option::Option, + ) -> Result { + if let Some(decoder_code) = decoder_code { + if decoder_code != "pump_swap" { + return Ok(0); + } + } + match self.database.connection() { + crate::DatabaseConnection::Sqlite(pool) => { + let query_result = sqlx::query( + r#" +DELETE FROM k_sol_dex_event_coverage_entries +WHERE decoder_code = 'pump_swap' + AND ( + entry_name LIKE 'observed_unknown_%' + OR local_event_kind LIKE 'pump_swap.observed_unknown_%' + ) + "#, + ) + .execute(pool) + .await; + match query_result { + Ok(query_result) => return Ok(query_result.rows_affected()), + Err(error) => { + return Err(crate::Error::Db(format!( + "cannot delete deprecated PumpSwap observed_unknown coverage rows on sqlite: {}", + error + ))); + }, + } + }, + } + } + + async fn cleanup_duplicate_pump_swap_logical_coverage_rows( + &self, + decoder_code: &std::option::Option, + ) -> Result { + if let Some(decoder_code) = decoder_code { + if decoder_code != "pump_swap" { + return Ok(0); + } + } + match self.database.connection() { + crate::DatabaseConnection::Sqlite(pool) => { + let query_result = sqlx::query( + r#" +DELETE FROM k_sol_dex_event_coverage_entries +WHERE decoder_code = 'pump_swap' + AND id NOT IN ( + SELECT MIN(id) + FROM k_sol_dex_event_coverage_entries + WHERE decoder_code = 'pump_swap' + GROUP BY + decoder_code, + COALESCE(program_id, ''), + entry_kind, + entry_name, + COALESCE(discriminator_hex, ''), + COALESCE(local_event_kind, '') + ) + "#, + ) + .execute(pool) + .await; + match query_result { + Ok(query_result) => return Ok(query_result.rows_affected()), + Err(error) => { + return Err(crate::Error::Db(format!( + "cannot delete duplicate PumpSwap logical coverage rows on sqlite: {}", + error + ))); + }, + } + }, + } + } } fn build_coverage_entry_from_upstream( @@ -215,6 +315,9 @@ fn infer_expected_db_target_for_entry( event_family: std::option::Option<&str>, entry_kind: &str, ) -> std::option::Option { + if decoder_code == "pump_swap" { + return infer_pump_swap_expected_db_target(entry_name, entry_kind); + } if decoder_code == "raydium_cpmm" && (entry_name == "swap_event" || entry_name == "anchor_idl_instruction") { @@ -421,11 +524,201 @@ fn infer_expected_db_target( return Some(target.to_string()); } +fn infer_pump_swap_expected_db_target( + entry_name: &str, + entry_kind: &str, +) -> std::option::Option { + if entry_kind == crate::ENTRY_KIND_PROGRAM { + return None; + } + if entry_name == "buy" || entry_name == "sell" || entry_name == "buy_exact_quote_in" { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_TRADE_EVENTS.to_string()); + } + if entry_name.starts_with("observed_unknown_") { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_DECODED_EVENTS_ONLY.to_string()); + } + if entry_name.ends_with("_event") && entry_name != "claim_token_incentives_event" { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_DECODED_EVENTS_ONLY.to_string()); + } + if entry_name == "deposit" + || entry_name == "deposit_event" + || entry_name == "withdraw" + || entry_name == "withdraw_event" + { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_LIQUIDITY_EVENTS.to_string()); + } + if entry_name == "create_pool" || entry_name == "create_pool_event" { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_POOL_LIFECYCLE_EVENTS.to_string()); + } + if entry_name == "collect_coin_creator_fee" + || entry_name == "collect_coin_creator_fee_event" + || entry_name == "transfer_creator_fees_to_pump" + || entry_name == "transfer_creator_fees_to_pump_v2" + { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_FEE_EVENTS.to_string()); + } + if entry_name == "claim_cashback" + || entry_name == "claim_cashback_event" + || entry_name == "claim_token_incentives" + || entry_name == "claim_token_incentives_event" + || entry_name == "admin_update_token_incentives" + || entry_name == "admin_update_token_incentives_event" + || entry_name == "init_user_volume_accumulator" + || entry_name == "init_user_volume_accumulator_event" + || entry_name == "sync_user_volume_accumulator" + || entry_name == "sync_user_volume_accumulator_event" + || entry_name == "close_user_volume_accumulator" + || entry_name == "close_user_volume_accumulator_event" + { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_REWARD_EVENTS.to_string()); + } + if entry_name == "admin_set_coin_creator" + || entry_name == "admin_set_coin_creator_event" + || entry_name == "create_config" + || entry_name == "create_config_event" + || entry_name == "disable" + || entry_name == "disable_event" + || entry_name == "extend_account" + || entry_name == "extend_account_event" + || entry_name == "migrate_pool_coin_creator" + || entry_name == "migrate_pool_coin_creator_event" + || entry_name == "reserved_fee_recipients_event" + || entry_name == "set_bonding_curve_coin_creator_event" + || entry_name == "set_coin_creator" + || entry_name == "set_metaplex_coin_creator_event" + || entry_name == "set_reserved_fee_recipient" + || entry_name == "set_reserved_fee_recipients" + || entry_name == "toggle_cashback_enabled" + || entry_name == "toggle_mayhem_mode" + || entry_name == "update_admin" + || entry_name == "update_buyback_config" + || entry_name == "update_admin_event" + || entry_name == "update_fee_config" + || entry_name == "update_fee_config_event" + { + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_POOL_ADMIN_EVENTS.to_string()); + } + return Some(crate::DexEventCoverageEntryDto::DB_TARGET_DECODED_EVENTS_ONLY.to_string()); +} + +fn infer_pump_swap_event_family( + entry_name: &str, + entry_kind: &str, +) -> std::option::Option { + if entry_kind == crate::ENTRY_KIND_PROGRAM { + return None; + } + if entry_name == "buy" || entry_name == "sell" || entry_name == "buy_exact_quote_in" { + return Some("swap".to_string()); + } + if entry_name == "buy_event" || entry_name == "sell_event" { + return Some("swap_event_audit".to_string()); + } + if entry_name == "deposit" || entry_name == "deposit_event" { + return Some("liquidity_add".to_string()); + } + if entry_name == "withdraw" || entry_name == "withdraw_event" { + return Some("liquidity_remove".to_string()); + } + if entry_name == "create_pool" || entry_name == "create_pool_event" { + return Some("pool_create".to_string()); + } + if entry_name.starts_with("observed_unknown_") { + return Some("observed_unknown_instruction".to_string()); + } + if entry_name == "toggle_cashback_enabled" + || entry_name == "set_reserved_fee_recipient" + || entry_name == "set_reserved_fee_recipients" + || entry_name == "reserved_fee_recipients_event" + { + return Some("admin_config".to_string()); + } + if entry_name.contains("creator_fee") || entry_name.contains("fee_recipient") { + return Some("fee".to_string()); + } + if entry_name.contains("cashback") + || entry_name.contains("incentive") + || entry_name.contains("volume_accumulator") + { + return Some("reward".to_string()); + } + if entry_name.contains("config") + || entry_name.contains("admin") + || entry_name.contains("disable") + || entry_name.contains("toggle") + || entry_name.contains("coin_creator") + || entry_name.contains("extend_account") + { + return Some("admin_config".to_string()); + } + return infer_event_family(entry_name, entry_kind); +} + +fn pump_swap_local_event_kind(entry_name: &str) -> std::option::Option { + if entry_name.ends_with("_event") { + return Some(format!("pump_swap.{}", entry_name)); + } + match entry_name { + "admin_set_coin_creator" => return Some("pump_swap.admin_set_coin_creator".to_string()), + "admin_update_token_incentives" => { + return Some("pump_swap.admin_update_token_incentives".to_string()); + }, + "buy" => return Some("pump_swap.buy".to_string()), + "buy_exact_quote_in" => return Some("pump_swap.buy_exact_quote_in".to_string()), + "claim_cashback" => return Some("pump_swap.claim_cashback".to_string()), + "claim_token_incentives" => return Some("pump_swap.claim_token_incentives".to_string()), + "close_user_volume_accumulator" => { + return Some("pump_swap.close_user_volume_accumulator".to_string()); + }, + "collect_coin_creator_fee" => { + return Some("pump_swap.collect_coin_creator_fee".to_string()); + }, + "create_config" => return Some("pump_swap.create_config".to_string()), + "create_pool" => return Some("pump_swap.create_pool".to_string()), + "deposit" => return Some("pump_swap.deposit".to_string()), + "disable" => return Some("pump_swap.disable".to_string()), + "extend_account" => return Some("pump_swap.extend_account".to_string()), + "init_user_volume_accumulator" => { + return Some("pump_swap.init_user_volume_accumulator".to_string()); + }, + "migrate_pool_coin_creator" => { + return Some("pump_swap.migrate_pool_coin_creator".to_string()); + }, + "sell" => return Some("pump_swap.sell".to_string()), + "set_coin_creator" => return Some("pump_swap.set_coin_creator".to_string()), + "set_reserved_fee_recipients" => { + return Some("pump_swap.set_reserved_fee_recipients".to_string()); + }, + "sync_user_volume_accumulator" => { + return Some("pump_swap.sync_user_volume_accumulator".to_string()); + }, + "toggle_cashback_enabled" => return Some("pump_swap.toggle_cashback_enabled".to_string()), + "toggle_mayhem_mode" => return Some("pump_swap.toggle_mayhem_mode".to_string()), + "transfer_creator_fees_to_pump" => { + return Some("pump_swap.transfer_creator_fees_to_pump".to_string()); + }, + "transfer_creator_fees_to_pump_v2" => { + return Some("pump_swap.transfer_creator_fees_to_pump_v2".to_string()); + }, + "update_admin" => return Some("pump_swap.update_admin".to_string()), + "update_buyback_config" => return Some("pump_swap.update_buyback_config".to_string()), + "update_fee_config" => return Some("pump_swap.update_fee_config".to_string()), + "withdraw" => return Some("pump_swap.withdraw".to_string()), + "set_reserved_fee_recipient" => { + return Some("pump_swap.set_reserved_fee_recipient".to_string()); + }, + _ => return None, + } +} + fn infer_event_family_for_entry( decoder_code: &str, entry_name: &str, entry_kind: &str, ) -> std::option::Option { + if decoder_code == "pump_swap" { + return infer_pump_swap_event_family(entry_name, entry_kind); + } if decoder_code == "raydium_launchpad" { return infer_raydium_launchpad_event_family(entry_name, entry_kind); } @@ -488,7 +781,6 @@ fn infer_raydium_cpmm_event_family( } } - fn infer_raydium_stable_swap_event_family( entry_name: &str, entry_kind: &str, @@ -789,7 +1081,6 @@ fn raydium_amm_v4_local_event_kind(entry_name: &str) -> std::option::Option std::option::Option { @@ -819,6 +1110,9 @@ pub(crate) fn known_local_event_kind( decoder_code: &str, entry_name: &str, ) -> std::option::Option { + if decoder_code == "pump_swap" { + return pump_swap_local_event_kind(entry_name); + } if decoder_code == "raydium_amm_v4" { return raydium_amm_v4_local_event_kind(entry_name); } diff --git a/kb_lib/src/instruction_observation_index.rs b/kb_lib/src/instruction_observation_index.rs index 4b2951b..0c6c1ef 100644 --- a/kb_lib/src/instruction_observation_index.rs +++ b/kb_lib/src/instruction_observation_index.rs @@ -319,6 +319,63 @@ fn resolve_instruction_name( }; return Some(format!("raydium_launchpad.{}", layout.instruction_name)); } + if program_id == crate::PUMP_SWAP_PROGRAM_ID || decoder_code == Some("pump_swap") { + let name = match discriminator_hex { + "e445a52e51cb9a1d" => "anchor_self_cpi_log", + "f228759149606968" => "admin_set_coin_creator", + "d10b7357d5177ccc" => "admin_update_token_incentives", + "66063d1201daebea" => "buy", + "c62e1552b4d9e870" => "buy_exact_quote_in", + "253a237ebe35e4c5" => "claim_cashback", + "1004471ccc01281b" => "claim_token_incentives", + "f945a4da9667548a" => "close_user_volume_accumulator", + "a039592ab58b2b42" => "collect_coin_creator_fee", + "c9cff3724b6f2fbd" => "create_config", + "e992d18ecf6840bc" => "create_pool", + "f223c68952e1f2b6" => "deposit", + "b9adbb5ad80feee9" => "disable", + "ea66c2cb96483ee5" => "extend_account", + "5e06ca73ff60e8b7" => "init_user_volume_accumulator", + "d0089f044aaf103a" => "migrate_pool_coin_creator", + "33e685a4017f83ad" => "sell", + "d295802dbc3a4eaf" => "set_coin_creator", + "6faca2e87259d58e" => "set_reserved_fee_recipients", + "561fc057a3574fee" => "sync_user_volume_accumulator", + "7367e0ffbd5956c3" => "toggle_cashback_enabled", + "01096fd0641fffa3" => "toggle_mayhem_mode", + "8b348655e4e56cf1" => "transfer_creator_fees_to_pump", + "01214eb921432c5c" => "transfer_creator_fees_to_pump_v2", + "a1b028d53cb8b3e4" => "update_admin", + "fbe0ab92a01a71e9" => "update_buyback_config", + "68b867f258976b14" => "update_fee_config", + "b712469c946da122" => "withdraw", + "cfbdb247a77a44b4" => "set_reserved_fee_recipient", + "2ddc5d181961ac68" => "admin_set_coin_creator_event", + "93fa6c78f71d43de" => "admin_update_token_incentives_event", + "67f4521f2cf57777" => "buy_event", + "e2d6f62107f293e5" => "claim_cashback_event", + "4facf631cd5bcee8" => "claim_token_incentives_event", + "929fbdac925838f4" => "close_user_volume_accumulator_event", + "e8f5c2eeeada3a59" => "collect_coin_creator_fee_event", + "6b34598137e25116" => "create_config_event", + "b1310cd2a076a774" => "create_pool_event", + "78f83d531f8e6b90" => "deposit_event", + "6bfdc14ce4ca1b68" => "disable_event", + "6161d7905d92167c" => "extend_account_event", + "86240d48e86582d8" => "init_user_volume_accumulator_event", + "aadd52c793a5f72e" => "migrate_pool_coin_creator_event", + "2bbcfa12dd4bbb5f" => "reserved_fee_recipients_event", + "3e2f370aa503dc2a" => "sell_event", + "f2e7eb664163bdd3" => "set_bonding_curve_coin_creator_event", + "966bc77b7ccf66e4" => "set_metaplex_coin_creator_event", + "c57aa77c74515bff" => "sync_user_volume_accumulator_event", + "e198ab57f63f42ea" => "update_admin_event", + "5a1741233ef4bcd0" => "update_fee_config_event", + "1609851aa02c47c0" => "withdraw_event", + _ => return None, + }; + return Some(name.to_string()); + } return None; } diff --git a/kb_lib/src/lib.rs b/kb_lib/src/lib.rs index ce2ee77..62be54f 100644 --- a/kb_lib/src/lib.rs +++ b/kb_lib/src/lib.rs @@ -1183,6 +1183,8 @@ pub use dex::PumpFunTradeDecoded; pub use dex::PumpSwapDecodedEvent; /// PumpSwap decoder. pub use dex::PumpSwapDecoder; +/// Decoded PumpSwap non-trade instruction event. +pub use dex::PumpSwapInstructionDecoded; /// Decoded PumpSwap trade event. pub use dex::PumpSwapTradeDecoded; /// Decoded Raydium AmmV4 event. diff --git a/kb_lib/src/non_trade_event_materialization.rs b/kb_lib/src/non_trade_event_materialization.rs index c13d109..730c621 100644 --- a/kb_lib/src/non_trade_event_materialization.rs +++ b/kb_lib/src/non_trade_event_materialization.rs @@ -109,6 +109,9 @@ impl NonTradeEventMaterializationService { continue; }, }; + if is_anchor_event_audit_only(&payload) { + continue; + } if crate::is_dex_pool_lifecycle_event_kind(decoded_event.event_kind.as_str()) { let cleanup_result = self.delete_stale_pool_admin_event_for_lifecycle(decoded_event).await; @@ -1935,6 +1938,18 @@ fn extract_first_bool( return None; } +fn is_anchor_event_audit_only(payload: &serde_json::Value) -> bool { + if let Some(object) = payload.as_object() { + let flag = object.get("anchorEventAuditOnly"); + if let Some(flag) = flag { + if flag.as_bool() == Some(true) { + return true; + } + } + } + return false; +} + fn transaction_has_effective_error(transaction: &crate::ChainTransactionDto) -> bool { let err_json = match transaction.err_json.as_ref() { Some(err_json) => err_json.trim(), diff --git a/kb_lib/src/trade_aggregation.rs b/kb_lib/src/trade_aggregation.rs index 48a23da..e418ab9 100644 --- a/kb_lib/src/trade_aggregation.rs +++ b/kb_lib/src/trade_aggregation.rs @@ -47,9 +47,10 @@ impl TradeAggregationService { Err(error) => return Err(error), }; let transaction = transaction_context.transaction; - if transaction.err_json.is_some() { + if crate::trade_aggregation::transaction_has_effective_error(&transaction) { tracing::debug!( signature = %transaction.signature, + err_json = ?transaction.err_json, "skipping trade aggregation for failed transaction" ); return Ok(std::vec::Vec::new()); @@ -199,6 +200,21 @@ impl TradeAggregationService { } } + +fn transaction_has_effective_error(transaction: &crate::ChainTransactionDto) -> bool { + let err_json = match transaction.err_json.as_ref() { + Some(err_json) => err_json.trim(), + None => return false, + }; + if err_json.is_empty() { + return false; + } + if err_json == "null" { + return false; + } + return true; +} + #[cfg(test)] mod tests { async fn make_database() -> std::sync::Arc { @@ -416,6 +432,51 @@ mod tests { assert_eq!(pair_metric.trade_count, 1); } + #[test] + fn transaction_null_err_json_is_not_effective_error() { + let transaction = crate::ChainTransactionDto::new( + "sig-null-err".to_string(), + Some(1), + None, + Some("test".to_string()), + Some("0".to_string()), + Some("null".to_string()), + None, + serde_json::json!({"meta":{"err":null}}).to_string(), + ); + assert!(!super::transaction_has_effective_error(&transaction)); + } + + #[test] + fn transaction_empty_err_json_is_not_effective_error() { + let transaction = crate::ChainTransactionDto::new( + "sig-empty-err".to_string(), + Some(1), + None, + Some("test".to_string()), + Some("0".to_string()), + Some("".to_string()), + None, + serde_json::json!({"meta":{"err":null}}).to_string(), + ); + assert!(!super::transaction_has_effective_error(&transaction)); + } + + #[test] + fn transaction_non_null_err_json_is_effective_error() { + let transaction = crate::ChainTransactionDto::new( + "sig-real-err".to_string(), + Some(1), + None, + Some("test".to_string()), + Some("0".to_string()), + Some(serde_json::json!({"InstructionError":[0,{"Custom":1}]}).to_string()), + None, + serde_json::json!({"meta":{"err":{"InstructionError":[0,{"Custom":1}]}}}).to_string(), + ); + assert!(super::transaction_has_effective_error(&transaction)); + } + #[tokio::test] async fn record_transaction_by_signature_skips_failed_transaction() { let database = make_database().await; diff --git a/kb_lib/src/trade_amount_resolution.rs b/kb_lib/src/trade_amount_resolution.rs index 5481654..de3a760 100644 --- a/kb_lib/src/trade_amount_resolution.rs +++ b/kb_lib/src/trade_amount_resolution.rs @@ -138,6 +138,14 @@ pub(crate) async fn resolve_trade_amounts( return Err(error); } } + if input.decoded_event.event_kind == "pump_swap.buy_exact_quote_in" { + crate::trade_amount_resolution::normalize_pump_swap_anchor_buy_exact_quote_in_amounts( + input, + &mut base_amount_raw, + &mut quote_amount_raw, + &mut resolved_trade_side, + ); + } if input.decoded_event.event_kind.starts_with("raydium_launchpad.") && (base_amount_raw.is_none() || quote_amount_raw.is_none() @@ -442,7 +450,12 @@ async fn apply_pump_swap_amount_fallbacks( None => payload_pool_quote_token_account.as_deref(), }; let (input_vault_address, output_vault_address, input_token_account, output_token_account) = - if input.decoded_event.event_kind.ends_with(".buy") { + if input.decoded_event.event_kind.ends_with(".buy") + || input + .decoded_event + .event_kind + .ends_with(".buy_exact_quote_in") + { ( effective_quote_vault_address, effective_base_vault_address, @@ -1401,6 +1414,74 @@ async fn load_decoded_instruction( return Ok(instruction_option); } + +fn normalize_pump_swap_anchor_buy_exact_quote_in_amounts( + input: &crate::trade_amount_resolution::TradeAmountResolutionInput<'_>, + base_amount_raw: &mut std::option::Option, + quote_amount_raw: &mut std::option::Option, + resolved_trade_side: &mut std::option::Option, +) { + let amount_source = crate::trade_amount_resolution::extract_string_by_candidate_keys( + input.payload, + &["amountSource", "amount_source"], + ); + if amount_source.as_deref() != Some("pump_swap_anchor_buy_event") { + return; + } + let token_a_mint = crate::trade_amount_resolution::extract_string_by_candidate_keys( + input.payload, + &["tokenAMint", "token_a_mint"], + ); + let token_b_mint = crate::trade_amount_resolution::extract_string_by_candidate_keys( + input.payload, + &["tokenBMint", "token_b_mint"], + ); + let token_a_mint = match token_a_mint.as_deref() { + Some(token_a_mint) => token_a_mint, + None => return, + }; + let token_b_mint = match token_b_mint.as_deref() { + Some(token_b_mint) => token_b_mint, + None => return, + }; + let pair_base_mint = match input.base_token_mint { + Some(pair_base_mint) => pair_base_mint, + None => return, + }; + let pair_quote_mint = match input.quote_token_mint { + Some(pair_quote_mint) => pair_quote_mint, + None => return, + }; + let anchor_base_amount_raw = crate::trade_amount_resolution::extract_amount_string( + input.payload, + &["baseAmountRaw", "baseAmountOutRaw", "base_amount_out_raw"], + ); + let anchor_quote_amount_raw = crate::trade_amount_resolution::extract_amount_string( + input.payload, + &["quoteAmountRaw", "userQuoteAmountInRaw", "user_quote_amount_in_raw"], + ); + let anchor_base_amount_raw = match anchor_base_amount_raw { + Some(anchor_base_amount_raw) => anchor_base_amount_raw, + None => return, + }; + let anchor_quote_amount_raw = match anchor_quote_amount_raw { + Some(anchor_quote_amount_raw) => anchor_quote_amount_raw, + None => return, + }; + if pair_base_mint == token_a_mint && pair_quote_mint == token_b_mint { + *base_amount_raw = Some(anchor_base_amount_raw); + *quote_amount_raw = Some(anchor_quote_amount_raw); + *resolved_trade_side = Some(crate::SwapTradeSide::BuyBase); + return; + } + if pair_base_mint == token_b_mint && pair_quote_mint == token_a_mint { + *base_amount_raw = Some(anchor_quote_amount_raw); + *quote_amount_raw = Some(anchor_base_amount_raw); + *resolved_trade_side = Some(crate::SwapTradeSide::SellBase); + return; + } +} + fn extract_amount_string( payload: &serde_json::Value, candidate_keys: &[&str], diff --git a/kb_lib/src/trade_side_resolution.rs b/kb_lib/src/trade_side_resolution.rs index 7f383e2..2ec273d 100644 --- a/kb_lib/src/trade_side_resolution.rs +++ b/kb_lib/src/trade_side_resolution.rs @@ -23,10 +23,10 @@ pub(crate) fn extract_trade_side( Some("SELL") => return crate::SwapTradeSide::SellBase, _ => {}, } - if event_kind.ends_with(".buy") { + if event_kind.ends_with(".buy") || event_kind.contains(".buy_exact") { return crate::SwapTradeSide::BuyBase; } - if event_kind.ends_with(".sell") { + if event_kind.ends_with(".sell") || event_kind.contains(".sell_exact") { return crate::SwapTradeSide::SellBase; } return crate::SwapTradeSide::Unknown; @@ -109,6 +109,13 @@ mod tests { assert_eq!(side, crate::SwapTradeSide::SellBase); } + #[test] + fn buy_exact_suffix_is_resolved_as_buy_base() { + let payload = serde_json::json!({}); + let side = super::extract_trade_side("pump_swap.buy_exact_quote_in", &payload); + assert_eq!(side, crate::SwapTradeSide::BuyBase); + } + #[test] fn unknown_side_is_returned_when_no_hint_exists() { let payload = serde_json::json!({}); diff --git a/kb_lib/src/upstream_registry_generated.rs b/kb_lib/src/upstream_registry_generated.rs index 67c324d..9ea0ddc 100644 --- a/kb_lib/src/upstream_registry_generated.rs +++ b/kb_lib/src/upstream_registry_generated.rs @@ -14,9 +14,8 @@ const UPSTREAM_GIT_ALIAS_PROGRAM_NOTES: &str = "upstream Git decoder name kept a const RAYDIUM_IDL_SOURCE_REPO: &str = "raydium-io/raydium-idl"; const MANUAL_SOLSCAN_SOURCE_REPO: &str = "manual-solscan"; - const RAYDIUM_IDL_DISCRIMINATOR_NOTES: &str = "entry name and discriminator extracted from Raydium official IDL snapshot; not corpus-verified; no trade/candle/materialization proof"; -const MANUAL_SOLSCAN_DISCRIMINATOR_NOTES: &str = "entry name and discriminator derived from local corpus plus manual Solscan transaction-log inspection; no trade/candle/materialization proof"; +const MANUAL_SOLSCAN_DISCRIMINATOR_NOTES: &str = "entry name and discriminator derived from manual Solscan program IDL or Solscan transaction-log inspection; no trade/candle/materialization proof"; const fn manual_solscan_discriminator_entry( decoder_code: &'static str, @@ -10735,6 +10734,39 @@ pub(crate) const UPSTREAM_REGISTRY_ENTRIES: &[crate::UpstreamRegistryEntry] = &[ 8, "decoders/pump-swap-decoder/src/instructions/withdraw.rs", ), + manual_solscan_discriminator_entry( + "pump_swap", + Some(crate::PUMP_SWAP_PROGRAM_ID), + "pump", + "amm", + crate::ENTRY_KIND_INSTRUCTION, + "transfer_creator_fees_to_pump_v2", + "01214eb921432c5c", + 8, + "solscan.io/account/pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA#programIdl:transfer_creator_fees_to_pump_v2", + ), + manual_solscan_discriminator_entry( + "pump_swap", + Some(crate::PUMP_SWAP_PROGRAM_ID), + "pump", + "amm", + crate::ENTRY_KIND_INSTRUCTION, + "update_buyback_config", + "fbe0ab92a01a71e9", + 8, + "solscan.io/account/pAMMBay6oceH9fJKBRHGP5D4bD4sWpmSwMn52FMfXEA#programIdl:update_buyback_config", + ), + manual_solscan_discriminator_entry( + "pump_swap", + Some(crate::PUMP_SWAP_PROGRAM_ID), + "pump", + "amm", + crate::ENTRY_KIND_INSTRUCTION, + "set_reserved_fee_recipient", + "cfbdb247a77a44b4", + 8, + "validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql#local_log_instruction_names", + ), upstream_git_discriminator_entry( "pump_swap", Some(crate::PUMP_SWAP_PROGRAM_ID), diff --git a/validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql b/validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql new file mode 100644 index 0000000..825e865 --- /dev/null +++ b/validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql @@ -0,0 +1,274 @@ +-- file: validation_sql/SQL_VALIDATION_DEX_COVERAGE_GLOBAL_0_7_53.sql + +-- Global DEX coverage watchlist for the 0.7.53 PumpSwap closure. +-- Run after a forced local replay when the goal is to detect: +-- - decoded local events without coverage entries; +-- - upstream_git fallbacks that still need a local decoder or an explicit deferral; +-- - instruction observations not covered by k_sol_dex_event_coverage_entries; +-- - unattributed discriminators that need program-id classification; +-- - PumpSwap/Raydium non-regression after future backfills. + +-- 01. Local decoded events without coverage. +-- Expected after 0.7.53 closure: no pump_swap or validated Raydium rows. +-- Known deferred rows at closure time: small Meteora gaps, intentionally not fixed in 0.7.53. +SELECT + de.protocol_name, + de.event_kind, + COUNT(*) AS decoded_count, + COUNT(DISTINCT de.transaction_id) AS tx_count, + MIN(tx.signature) AS sample_signature +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_chain_transactions tx + ON tx.id = de.transaction_id +LEFT JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = de.protocol_name + AND ce.local_event_kind = de.event_kind +WHERE de.protocol_name <> 'upstream_git' + AND ce.id IS NULL +GROUP BY + de.protocol_name, + de.event_kind +ORDER BY + decoded_count DESC, + de.protocol_name, + de.event_kind; + +-- 02. Upstream fallback backlog to promote or defer. +-- This is a roadmap queue, not a local decoder error by itself. +SELECT + json_extract(de.payload_json, '$.upstreamDecoderCode') AS upstream_decoder_code, + json_extract(de.payload_json, '$.upstreamEntryName') AS upstream_entry_name, + json_extract(de.payload_json, '$.upstreamDiscriminatorHex') AS upstream_discriminator_hex, + COUNT(*) AS decoded_count, + COUNT(DISTINCT de.transaction_id) AS tx_count, + MIN(tx.signature) AS sample_signature +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_chain_transactions tx + ON tx.id = de.transaction_id +WHERE de.protocol_name = 'upstream_git' + AND de.event_kind = 'upstream_git.instruction_match' +GROUP BY + upstream_decoder_code, + upstream_entry_name, + upstream_discriminator_hex +ORDER BY + decoded_count DESC, + upstream_decoder_code, + upstream_entry_name; + +-- 03. Instruction observations with decoder_code but no coverage, normalized. +-- Handles both instruction_name='swap_base_input' and instruction_name='raydium_cpmm.swap_base_input'. +WITH normalized_io AS ( + SELECT + io.decoder_code, + io.instruction_name, + CASE + WHEN io.decoder_code IS NOT NULL + AND TRIM(io.decoder_code) <> '' + AND io.instruction_name LIKE (io.decoder_code || '.%') + THEN SUBSTR(io.instruction_name, LENGTH(io.decoder_code) + 2) + ELSE io.instruction_name + END AS normalized_entry_name, + io.discriminator_hex, + io.signature + FROM k_sol_instruction_observations io + WHERE io.discriminator_hex IS NOT NULL + AND io.discriminator_hex <> '' + AND io.discriminator_hex <> 'e445a52e51cb9a1d' + AND io.decoder_code IS NOT NULL + AND TRIM(io.decoder_code) <> '' +) +SELECT + nio.decoder_code, + nio.instruction_name, + nio.normalized_entry_name, + nio.discriminator_hex, + COUNT(*) AS observed_count, + COUNT(DISTINCT nio.signature) AS tx_count, + MIN(nio.signature) AS sample_signature +FROM normalized_io nio +LEFT JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = nio.decoder_code + AND COALESCE(ce.discriminator_hex, '') = COALESCE(nio.discriminator_hex, '') + AND ( + ce.entry_name = nio.instruction_name + OR ce.entry_name = nio.normalized_entry_name + OR ce.local_event_kind = nio.instruction_name + OR ce.local_event_kind = (nio.decoder_code || '.' || nio.normalized_entry_name) + ) +WHERE ce.id IS NULL +GROUP BY + nio.decoder_code, + nio.instruction_name, + nio.normalized_entry_name, + nio.discriminator_hex +ORDER BY + observed_count DESC, + nio.decoder_code, + nio.discriminator_hex; + +-- 04. Unattributed instruction observations. +-- Treat as classification backlog: discriminator alone is not enough; inspect sample_signature/program_id first. +SELECT + io.discriminator_hex, + COUNT(*) AS observed_count, + COUNT(DISTINCT io.signature) AS tx_count, + MIN(io.signature) AS sample_signature +FROM k_sol_instruction_observations io +WHERE io.discriminator_hex IS NOT NULL + AND io.discriminator_hex <> '' + AND io.discriminator_hex <> 'e445a52e51cb9a1d' + AND ( + io.decoder_code IS NULL + OR TRIM(io.decoder_code) = '' + ) +GROUP BY + io.discriminator_hex +ORDER BY + observed_count DESC, + io.discriminator_hex; + +-- 05. PumpSwap local closure check. +-- Expected result: empty. +WITH normalized_io AS ( + SELECT + io.decoder_code, + io.instruction_name, + CASE + WHEN io.instruction_name LIKE 'pump_swap.%' + THEN SUBSTR(io.instruction_name, LENGTH('pump_swap') + 2) + ELSE io.instruction_name + END AS normalized_entry_name, + io.discriminator_hex, + io.signature + FROM k_sol_instruction_observations io + WHERE io.decoder_code = 'pump_swap' + AND io.discriminator_hex IS NOT NULL + AND io.discriminator_hex <> '' + AND io.discriminator_hex <> 'e445a52e51cb9a1d' +) +SELECT + nio.decoder_code, + nio.instruction_name, + nio.normalized_entry_name, + nio.discriminator_hex, + COUNT(*) AS observed_count, + COUNT(DISTINCT nio.signature) AS tx_count, + MIN(nio.signature) AS sample_signature +FROM normalized_io nio +LEFT JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = 'pump_swap' + AND COALESCE(ce.discriminator_hex, '') = COALESCE(nio.discriminator_hex, '') + AND ( + ce.entry_name = nio.instruction_name + OR ce.entry_name = nio.normalized_entry_name + OR ce.local_event_kind = nio.instruction_name + OR ce.local_event_kind = ('pump_swap.' || nio.normalized_entry_name) + ) +WHERE ce.id IS NULL +GROUP BY + nio.decoder_code, + nio.instruction_name, + nio.normalized_entry_name, + nio.discriminator_hex +ORDER BY observed_count DESC; + +-- 06. Raydium AMM v4 / CLMM / CPMM targeted non-regression. +-- Expected result after 0.7.53 closure: empty. +WITH normalized_io AS ( + SELECT + io.decoder_code, + io.instruction_name, + CASE + WHEN io.decoder_code IS NOT NULL + AND TRIM(io.decoder_code) <> '' + AND io.instruction_name LIKE (io.decoder_code || '.%') + THEN SUBSTR(io.instruction_name, LENGTH(io.decoder_code) + 2) + ELSE io.instruction_name + END AS normalized_entry_name, + io.discriminator_hex, + io.signature + FROM k_sol_instruction_observations io + WHERE io.decoder_code IN ( + 'raydium_amm_v4', + 'raydium_clmm', + 'raydium_cpmm' + ) + AND io.discriminator_hex IS NOT NULL + AND io.discriminator_hex <> '' +) +SELECT + nio.decoder_code, + nio.instruction_name, + nio.normalized_entry_name, + nio.discriminator_hex, + COUNT(*) AS observed_count, + COUNT(DISTINCT nio.signature) AS tx_count, + MIN(nio.signature) AS sample_signature +FROM normalized_io nio +LEFT JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = nio.decoder_code + AND COALESCE(ce.discriminator_hex, '') = COALESCE(nio.discriminator_hex, '') + AND ( + ce.entry_name = nio.instruction_name + OR ce.entry_name = nio.normalized_entry_name + OR ce.local_event_kind = nio.instruction_name + OR ce.local_event_kind = (nio.decoder_code || '.' || nio.normalized_entry_name) + ) +WHERE ce.id IS NULL +GROUP BY + nio.decoder_code, + nio.instruction_name, + nio.normalized_entry_name, + nio.discriminator_hex +ORDER BY + observed_count DESC, + nio.decoder_code, + nio.discriminator_hex; + +-- 07. Raydium swap/trade coverage overview. +-- This is informational. Entries with observed_count=0 are unobserved registry coverage, not failures. +SELECT + decoder_code, + entry_kind, + entry_name, + event_family, + local_event_kind, + discriminator_hex, + expected_db_target, + proof_status, + observed_count, + materialized_count, + trade_count +FROM k_sol_dex_event_coverage_entries +WHERE decoder_code IN ( + 'raydium_amm_v4', + 'raydium_clmm', + 'raydium_cpmm', + 'raydium_stable_swap', + 'raydium_launchpad' +) + AND ( + event_family IN ('swap', 'swap_event_audit') + OR expected_db_target = 'k_sol_trade_events' + ) +ORDER BY + decoder_code, + entry_kind, + entry_name, + discriminator_hex; + +-- 08. Upstream backlog by decoder_code. +SELECT + json_extract(de.payload_json, '$.upstreamDecoderCode') AS upstream_decoder_code, + COUNT(*) AS decoded_count, + COUNT(DISTINCT de.transaction_id) AS tx_count, + COUNT(DISTINCT json_extract(de.payload_json, '$.upstreamEntryName')) AS distinct_entry_count, + MIN(tx.signature) AS sample_signature +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_chain_transactions tx + ON tx.id = de.transaction_id +WHERE de.protocol_name = 'upstream_git' + AND de.event_kind = 'upstream_git.instruction_match' +GROUP BY upstream_decoder_code +ORDER BY decoded_count DESC, upstream_decoder_code; diff --git a/validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql b/validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql new file mode 100644 index 0000000..cb490da --- /dev/null +++ b/validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql @@ -0,0 +1,325 @@ +-- file: validation_sql/SQL_VALIDATION_PUMP_SWAP_0_7_53.sql + +-- 0.7.53 pump_swap validation checklist. +-- Run on a dedicated fresh SQLite database after corpus construction and replay with: +-- skipDexDecode=no, forceDexDecode=yes, deferInstructionObservations=yes. + +-- 01. Coverage pump_swap. +SELECT + entry_name, + entry_kind, + event_family, + expected_db_target, + proof_status, + local_event_kind, + discriminator_hex, + observed_count, + materialized_count, + trade_count +FROM k_sol_dex_event_coverage_entries +WHERE decoder_code = 'pump_swap' +ORDER BY entry_kind, entry_name, discriminator_hex; + +-- 02. Instruction observations. +SELECT + instruction_name, + discriminator_hex, + COUNT(*) AS observed_count, + COUNT(DISTINCT signature) AS tx_count +FROM k_sol_instruction_observations +WHERE decoder_code = 'pump_swap' +GROUP BY instruction_name, discriminator_hex +ORDER BY observed_count DESC, instruction_name, discriminator_hex; + +-- 03. Residual local instruction audit. +SELECT + json_extract(payload_json, '$.discriminatorHex') AS discriminator_hex, + COUNT(*) AS audit_count, + COUNT(DISTINCT transaction_id) AS tx_count +FROM k_sol_dex_decoded_events +WHERE protocol_name = 'pump_swap' + AND event_kind = 'pump_swap.instruction_audit' +GROUP BY discriminator_hex +ORDER BY audit_count DESC, discriminator_hex; + +-- 04. Residual upstream fallback for covered local entries. +SELECT + json_extract(ug.payload_json, '$.upstreamDecoderCode') AS upstream_decoder_code, + json_extract(ug.payload_json, '$.upstreamEntryName') AS entry_name, + json_extract(ug.payload_json, '$.upstreamDiscriminatorHex') AS discriminator_hex, + json_extract(ug.payload_json, '$.upstreamSourceRepo') AS source_repo, + COUNT(*) AS fallback_count, + COUNT(DISTINCT ug.transaction_id) AS tx_count +FROM k_sol_dex_decoded_events ug +JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = json_extract(ug.payload_json, '$.upstreamDecoderCode') + AND ce.entry_name = json_extract(ug.payload_json, '$.upstreamEntryName') + AND ce.discriminator_hex = json_extract(ug.payload_json, '$.upstreamDiscriminatorHex') + AND ce.local_event_kind IS NOT NULL + AND ce.local_event_kind <> '' +WHERE ug.protocol_name = 'upstream_git' + AND ug.event_kind = 'upstream_git.instruction_match' + AND json_extract(ug.payload_json, '$.upstreamDecoderCode') = 'pump_swap' +GROUP BY upstream_decoder_code, entry_name, discriminator_hex, source_repo +ORDER BY fallback_count DESC, entry_name; + +-- 05. Non-swap safety: non-swap event must not materialize as trade. +SELECT + de.event_kind, + ce.event_family, + COUNT(*) AS decoded_count, + COUNT(te.id) AS trade_count +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = 'pump_swap' + AND ce.local_event_kind = de.event_kind +LEFT JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +WHERE de.protocol_name = 'pump_swap' +GROUP BY de.event_kind, ce.event_family +HAVING ce.event_family <> 'swap' + AND COUNT(te.id) > 0 +ORDER BY trade_count DESC, de.event_kind; + +-- 06. Failed transaction safety: failed tx must not materialize as business trade. +SELECT + de.event_kind, + COUNT(*) AS decoded_failed_count, + COUNT(te.id) AS trade_count +FROM k_sol_dex_decoded_events de +JOIN k_sol_chain_transactions tx + ON tx.id = de.transaction_id +LEFT JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +WHERE de.protocol_name = 'pump_swap' + AND tx.err_json IS NOT NULL + AND tx.err_json <> '' + AND tx.err_json <> 'null' +GROUP BY de.event_kind +HAVING COUNT(te.id) > 0 +ORDER BY trade_count DESC, de.event_kind; + +-- 07. Decoded without coverage entry. +SELECT + de.event_kind, + COUNT(*) AS decoded_count +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = 'pump_swap' + AND ce.local_event_kind = de.event_kind +WHERE de.protocol_name = 'pump_swap' + AND ce.id IS NULL +GROUP BY de.event_kind +ORDER BY decoded_count DESC, de.event_kind; + +-- 08. Multi-target materialization. +SELECT + de.event_kind, + COUNT(DISTINCT de.id) AS decoded_count, + COUNT(DISTINCT te.id) AS trade_count, + COUNT(DISTINCT le.id) AS liquidity_count, + COUNT(DISTINCT pe.id) AS lifecycle_count, + COUNT(DISTINCT fe.id) AS fee_count, + COUNT(DISTINCT re.id) AS reward_count, + COUNT(DISTINCT ae.id) AS admin_count, + COUNT(DISTINCT oe.id) AS orderbook_count, + ( + CASE WHEN COUNT(DISTINCT te.id) > 0 THEN 1 ELSE 0 END + + CASE WHEN COUNT(DISTINCT le.id) > 0 THEN 1 ELSE 0 END + + CASE WHEN COUNT(DISTINCT pe.id) > 0 THEN 1 ELSE 0 END + + CASE WHEN COUNT(DISTINCT fe.id) > 0 THEN 1 ELSE 0 END + + CASE WHEN COUNT(DISTINCT re.id) > 0 THEN 1 ELSE 0 END + + CASE WHEN COUNT(DISTINCT ae.id) > 0 THEN 1 ELSE 0 END + + CASE WHEN COUNT(DISTINCT oe.id) > 0 THEN 1 ELSE 0 END + ) AS materialized_target_count +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +LEFT JOIN k_sol_liquidity_events le + ON le.decoded_event_id = de.id +LEFT JOIN k_sol_pool_lifecycle_events pe + ON pe.decoded_event_id = de.id +LEFT JOIN k_sol_fee_events fe + ON fe.decoded_event_id = de.id +LEFT JOIN k_sol_reward_events re + ON re.decoded_event_id = de.id +LEFT JOIN k_sol_pool_admin_events ae + ON ae.decoded_event_id = de.id +LEFT JOIN k_sol_orderbook_events oe + ON oe.decoded_event_id = de.id +WHERE de.protocol_name = 'pump_swap' +GROUP BY de.event_kind +HAVING materialized_target_count > 1 +ORDER BY materialized_target_count DESC, de.event_kind; + +-- 09. Unexplained successful non-materialized events. +SELECT + de.event_kind, + COUNT(*) AS unexplained_count +FROM k_sol_dex_decoded_events de +JOIN k_sol_chain_transactions tx + ON tx.id = de.transaction_id +LEFT JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +LEFT JOIN k_sol_liquidity_events le + ON le.decoded_event_id = de.id +LEFT JOIN k_sol_pool_lifecycle_events pe + ON pe.decoded_event_id = de.id +LEFT JOIN k_sol_fee_events fe + ON fe.decoded_event_id = de.id +LEFT JOIN k_sol_reward_events re + ON re.decoded_event_id = de.id +LEFT JOIN k_sol_pool_admin_events ae + ON ae.decoded_event_id = de.id +LEFT JOIN k_sol_orderbook_events oe + ON oe.decoded_event_id = de.id +LEFT JOIN k_sol_token_account_events tae + ON tae.decoded_event_id = de.id +WHERE de.protocol_name = 'pump_swap' + AND ( + tx.err_json IS NULL + OR tx.err_json = '' + OR tx.err_json = 'null' + ) + AND te.id IS NULL + AND le.id IS NULL + AND pe.id IS NULL + AND fe.id IS NULL + AND re.id IS NULL + AND ae.id IS NULL + AND oe.id IS NULL + AND tae.id IS NULL + AND COALESCE(TRIM(json_extract(de.payload_json, '$.skipTradeReason')), '') = '' + AND COALESCE(TRIM(json_extract(de.payload_json, '$.skipLiquidityReason')), '') = '' + AND COALESCE(TRIM(json_extract(de.payload_json, '$.skipLifecycleReason')), '') = '' + AND COALESCE(TRIM(json_extract(de.payload_json, '$.skipCatalogReason')), '') = '' +GROUP BY de.event_kind +ORDER BY unexplained_count DESC, de.event_kind; + +-- 10. Materialization summary. +SELECT + de.event_kind, + COUNT(DISTINCT de.id) AS decoded_count, + COUNT(DISTINCT te.id) AS trade_count, + COUNT(DISTINCT le.id) AS liquidity_count, + COUNT(DISTINCT pe.id) AS lifecycle_count, + COUNT(DISTINCT fe.id) AS fee_count, + COUNT(DISTINCT re.id) AS reward_count, + COUNT(DISTINCT ae.id) AS admin_count, + COUNT(DISTINCT oe.id) AS orderbook_count +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +LEFT JOIN k_sol_liquidity_events le + ON le.decoded_event_id = de.id +LEFT JOIN k_sol_pool_lifecycle_events pe + ON pe.decoded_event_id = de.id +LEFT JOIN k_sol_fee_events fe + ON fe.decoded_event_id = de.id +LEFT JOIN k_sol_reward_events re + ON re.decoded_event_id = de.id +LEFT JOIN k_sol_pool_admin_events ae + ON ae.decoded_event_id = de.id +LEFT JOIN k_sol_orderbook_events oe + ON oe.decoded_event_id = de.id +WHERE de.protocol_name = 'pump_swap' +GROUP BY de.event_kind +ORDER BY de.event_kind; + + + +-- 11. PumpSwap local instruction discriminator coverage. +-- Expected result after Solscan IDL/log-name promotion: covered rows only, except the Anchor self-CPI log carrier. +-- Rows tagged coverage_gap must be promoted to an explicit local decoder status or excluded with proof. +SELECT + io.instruction_name, + io.discriminator_hex, + COUNT(*) AS observed_count, + COUNT(DISTINCT io.signature) AS tx_count, + CASE + WHEN io.discriminator_hex = 'e445a52e51cb9a1d' THEN 'technical_anchor_self_cpi_log' + WHEN ce.id IS NULL THEN 'coverage_gap' + ELSE 'covered' + END AS observation_coverage_status, + ce.local_event_kind, + ce.expected_db_target, + ce.proof_status +FROM k_sol_instruction_observations io +LEFT JOIN k_sol_dex_event_coverage_entries ce + ON ce.decoder_code = 'pump_swap' + AND ce.discriminator_hex = io.discriminator_hex + AND ( + ce.entry_name = io.instruction_name + OR ce.local_event_kind = ('pump_swap.' || io.instruction_name) + ) +WHERE io.decoder_code = 'pump_swap' +GROUP BY + io.instruction_name, + io.discriminator_hex, + observation_coverage_status, + ce.local_event_kind, + ce.expected_db_target, + ce.proof_status +ORDER BY observed_count DESC, io.instruction_name, io.discriminator_hex; + +-- 12. PumpSwap successful trade candidates without materialized trade. +-- Expected result: empty unless skipTradeReason explicitly documents why amounts/direction are incomplete. +SELECT + de.event_kind, + json_extract(de.payload_json, '$.skipTradeReason') AS skip_trade_reason, + COUNT(*) AS decoded_count, + COUNT(te.id) AS trade_count +FROM k_sol_dex_decoded_events de +JOIN k_sol_chain_transactions tx + ON tx.id = de.transaction_id +LEFT JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +WHERE de.protocol_name = 'pump_swap' + AND de.event_kind IN ( + 'pump_swap.buy', + 'pump_swap.sell', + 'pump_swap.buy_exact_quote_in' + ) + AND ( + tx.err_json IS NULL + OR tx.err_json = '' + OR tx.err_json = 'null' + ) +GROUP BY de.event_kind, skip_trade_reason +HAVING COUNT(te.id) = 0 + AND COALESCE(TRIM(skip_trade_reason), '') = '' +ORDER BY decoded_count DESC, de.event_kind; + +-- 13. PumpSwap exact amount-source summary. +-- Trades must come from transaction/vault deltas or another exact amount source, never from instruction bounds alone. +SELECT + de.event_kind, + json_extract(de.payload_json, '$.amountSource') AS amount_source, + COUNT(*) AS decoded_count, + COUNT(te.id) AS trade_count +FROM k_sol_dex_decoded_events de +LEFT JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +WHERE de.protocol_name = 'pump_swap' + AND de.event_kind IN ( + 'pump_swap.buy', + 'pump_swap.sell', + 'pump_swap.buy_exact_quote_in' + ) +GROUP BY de.event_kind, amount_source +ORDER BY de.event_kind, amount_source; + +-- 14. PumpSwap trade/candle parity. +-- Expected result: no trade without at least one candle row after candle aggregation. +SELECT + de.event_kind, + COUNT(DISTINCT te.id) AS trade_count, + COUNT(DISTINCT pc.id) AS candle_count +FROM k_sol_dex_decoded_events de +JOIN k_sol_trade_events te + ON te.decoded_event_id = de.id +LEFT JOIN k_sol_pair_candles pc + ON pc.pair_id = te.pair_id +WHERE de.protocol_name = 'pump_swap' +GROUP BY de.event_kind +ORDER BY de.event_kind;